EntityFramework.psm1 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. # Copyright (c) Microsoft Corporation. All rights reserved.
  2. $InitialDatabase = '0'
  3. $knownExceptions = @(
  4. 'System.Data.Entity.Migrations.Infrastructure.MigrationsException',
  5. 'System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException',
  6. 'System.Data.Entity.Migrations.Infrastructure.AutomaticDataLossException',
  7. 'System.Data.Entity.Migrations.Infrastructure.MigrationsPendingException',
  8. 'System.Data.Entity.Migrations.ProjectTypeNotSupportedException'
  9. )
  10. <#
  11. .SYNOPSIS
  12. Adds or updates an Entity Framework provider entry in the project config
  13. file.
  14. .DESCRIPTION
  15. Adds an entry into the 'entityFramework' section of the project config
  16. file for the specified provider invariant name and provider type. If an
  17. entry for the given invariant name already exists, then that entry is
  18. updated with the given type name, unless the given type name already
  19. matches, in which case no action is taken. The 'entityFramework'
  20. section is added if it does not exist. The config file is automatically
  21. saved if and only if a change was made.
  22. This command is typically used only by Entity Framework provider NuGet
  23. packages and is run from the 'install.ps1' script.
  24. .PARAMETER Project
  25. The Visual Studio project to update. When running in the NuGet install.ps1
  26. script the '$project' variable provided as part of that script should be
  27. used.
  28. .PARAMETER InvariantName
  29. The provider invariant name that uniquely identifies this provider. For
  30. example, the Microsoft SQL Server provider is registered with the invariant
  31. name 'System.Data.SqlClient'.
  32. .PARAMETER TypeName
  33. The assembly-qualified type name of the provider-specific type that
  34. inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. For
  35. example, for the Microsoft SQL Server provider, this type is
  36. 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'.
  37. #>
  38. function Add-EFProvider
  39. {
  40. param (
  41. [parameter(Position = 0,
  42. Mandatory = $true)]
  43. $Project,
  44. [parameter(Position = 1,
  45. Mandatory = $true)]
  46. [string] $InvariantName,
  47. [parameter(Position = 2,
  48. Mandatory = $true)]
  49. [string] $TypeName
  50. )
  51. Check-Project $project
  52. $runner = New-EFConfigRunner $Project
  53. try
  54. {
  55. Invoke-RunnerCommand $runner System.Data.Entity.ConnectionFactoryConfig.AddProviderCommand @( $InvariantName, $TypeName )
  56. $error = Get-RunnerError $runner
  57. if ($error)
  58. {
  59. if ($knownExceptions -notcontains $error.TypeName)
  60. {
  61. Write-Host $error.StackTrace
  62. }
  63. else
  64. {
  65. Write-Verbose $error.StackTrace
  66. }
  67. throw $error.Message
  68. }
  69. }
  70. finally
  71. {
  72. Remove-Runner $runner
  73. }
  74. }
  75. <#
  76. .SYNOPSIS
  77. Adds or updates an Entity Framework default connection factory in the
  78. project config file.
  79. .DESCRIPTION
  80. Adds an entry into the 'entityFramework' section of the project config
  81. file for the connection factory that Entity Framework will use by default
  82. when creating new connections by convention. Any existing entry will be
  83. overridden if it does not match. The 'entityFramework' section is added if
  84. it does not exist. The config file is automatically saved if and only if
  85. a change was made.
  86. This command is typically used only by Entity Framework provider NuGet
  87. packages and is run from the 'install.ps1' script.
  88. .PARAMETER Project
  89. The Visual Studio project to update. When running in the NuGet install.ps1
  90. script the '$project' variable provided as part of that script should be
  91. used.
  92. .PARAMETER TypeName
  93. The assembly-qualified type name of the connection factory type that
  94. implements the 'System.Data.Entity.Infrastructure.IDbConnectionFactory'
  95. interface. For example, for the Microsoft SQL Server Express provider
  96. connection factory, this type is
  97. 'System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework'.
  98. .PARAMETER ConstructorArguments
  99. An optional array of strings that will be passed as arguments to the
  100. connection factory type constructor.
  101. #>
  102. function Add-EFDefaultConnectionFactory
  103. {
  104. param (
  105. [parameter(Position = 0,
  106. Mandatory = $true)]
  107. $Project,
  108. [parameter(Position = 1,
  109. Mandatory = $true)]
  110. [string] $TypeName,
  111. [string[]] $ConstructorArguments
  112. )
  113. Check-Project $project
  114. $runner = New-EFConfigRunner $Project
  115. try
  116. {
  117. Invoke-RunnerCommand $runner System.Data.Entity.ConnectionFactoryConfig.AddDefaultConnectionFactoryCommand @( $TypeName, $ConstructorArguments )
  118. $error = Get-RunnerError $runner
  119. if ($error)
  120. {
  121. if ($knownExceptions -notcontains $error.TypeName)
  122. {
  123. Write-Host $error.StackTrace
  124. }
  125. else
  126. {
  127. Write-Verbose $error.StackTrace
  128. }
  129. throw $error.Message
  130. }
  131. }
  132. finally
  133. {
  134. Remove-Runner $runner
  135. }
  136. }
  137. <#
  138. .SYNOPSIS
  139. Initializes the Entity Framework section in the project config file
  140. and sets defaults.
  141. .DESCRIPTION
  142. Creates the 'entityFramework' section of the project config file and sets
  143. the default connection factory to use SQL Express if it is running on the
  144. machine, or LocalDb otherwise. Note that installing a different provider
  145. may change the default connection factory. The config file is
  146. automatically saved if and only if a change was made.
  147. In addition, any reference to 'System.Data.Entity.dll' in the project is
  148. removed.
  149. This command is typically used only by Entity Framework provider NuGet
  150. packages and is run from the 'install.ps1' script.
  151. .PARAMETER Project
  152. The Visual Studio project to update. When running in the NuGet install.ps1
  153. script the '$project' variable provided as part of that script should be
  154. used.
  155. #>
  156. function Initialize-EFConfiguration
  157. {
  158. param (
  159. [parameter(Position = 0,
  160. Mandatory = $true)]
  161. $Project
  162. )
  163. Check-Project $project
  164. $runner = New-EFConfigRunner $Project
  165. try
  166. {
  167. Invoke-RunnerCommand $runner System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand
  168. $error = Get-RunnerError $runner
  169. if ($error)
  170. {
  171. if ($knownExceptions -notcontains $error.TypeName)
  172. {
  173. Write-Host $error.StackTrace
  174. }
  175. else
  176. {
  177. Write-Verbose $error.StackTrace
  178. }
  179. throw $error.Message
  180. }
  181. }
  182. finally
  183. {
  184. Remove-Runner $runner
  185. }
  186. }
  187. <#
  188. .SYNOPSIS
  189. Enables Code First Migrations in a project.
  190. .DESCRIPTION
  191. Enables Migrations by scaffolding a migrations configuration class in the project. If the
  192. target database was created by an initializer, an initial migration will be created (unless
  193. automatic migrations are enabled via the EnableAutomaticMigrations parameter).
  194. .PARAMETER ContextTypeName
  195. Specifies the context to use. If omitted, migrations will attempt to locate a
  196. single context type in the target project.
  197. .PARAMETER EnableAutomaticMigrations
  198. Specifies whether automatic migrations will be enabled in the scaffolded migrations configuration.
  199. If omitted, automatic migrations will be disabled.
  200. .PARAMETER MigrationsDirectory
  201. Specifies the name of the directory that will contain migrations code files.
  202. If omitted, the directory will be named "Migrations".
  203. .PARAMETER ProjectName
  204. Specifies the project that the scaffolded migrations configuration class will
  205. be added to. If omitted, the default project selected in package manager
  206. console is used.
  207. .PARAMETER StartUpProjectName
  208. Specifies the configuration file to use for named connection strings. If
  209. omitted, the specified project's configuration file is used.
  210. .PARAMETER ContextProjectName
  211. Specifies the project which contains the DbContext class to use. If omitted,
  212. the context is assumed to be in the same project used for migrations.
  213. .PARAMETER ConnectionStringName
  214. Specifies the name of a connection string to use from the application's
  215. configuration file.
  216. .PARAMETER ConnectionString
  217. Specifies the the connection string to use. If omitted, the context's
  218. default connection will be used.
  219. .PARAMETER ConnectionProviderName
  220. Specifies the provider invariant name of the connection string.
  221. .PARAMETER Force
  222. Specifies that the migrations configuration be overwritten when running more
  223. than once for a given project.
  224. #>
  225. function Enable-Migrations
  226. {
  227. [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
  228. param (
  229. [string] $ContextTypeName,
  230. [alias('Auto')]
  231. [switch] $EnableAutomaticMigrations,
  232. [string] $MigrationsDirectory,
  233. [string] $ProjectName,
  234. [string] $StartUpProjectName,
  235. [string] $ContextProjectName,
  236. [parameter(ParameterSetName = 'ConnectionStringName')]
  237. [string] $ConnectionStringName,
  238. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  239. Mandatory = $true)]
  240. [string] $ConnectionString,
  241. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  242. Mandatory = $true)]
  243. [string] $ConnectionProviderName,
  244. [switch] $Force
  245. )
  246. $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ContextProjectName $null $ConnectionStringName $ConnectionString $ConnectionProviderName
  247. try
  248. {
  249. Invoke-RunnerCommand $runner System.Data.Entity.Migrations.EnableMigrationsCommand @( $EnableAutomaticMigrations.IsPresent, $Force.IsPresent ) @{ 'ContextTypeName' = $ContextTypeName; 'MigrationsDirectory' = $MigrationsDirectory }
  250. $error = Get-RunnerError $runner
  251. if ($error)
  252. {
  253. if ($knownExceptions -notcontains $error.TypeName)
  254. {
  255. Write-Host $error.StackTrace
  256. }
  257. else
  258. {
  259. Write-Verbose $error.StackTrace
  260. }
  261. throw $error.Message
  262. }
  263. $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()
  264. }
  265. finally
  266. {
  267. Remove-Runner $runner
  268. }
  269. }
  270. <#
  271. .SYNOPSIS
  272. Scaffolds a migration script for any pending model changes.
  273. .DESCRIPTION
  274. Scaffolds a new migration script and adds it to the project.
  275. .PARAMETER Name
  276. Specifies the name of the custom script.
  277. .PARAMETER Force
  278. Specifies that the migration user code be overwritten when re-scaffolding an
  279. existing migration.
  280. .PARAMETER ProjectName
  281. Specifies the project that contains the migration configuration type to be
  282. used. If omitted, the default project selected in package manager console
  283. is used.
  284. .PARAMETER StartUpProjectName
  285. Specifies the configuration file to use for named connection strings. If
  286. omitted, the specified project's configuration file is used.
  287. .PARAMETER ConfigurationTypeName
  288. Specifies the migrations configuration to use. If omitted, migrations will
  289. attempt to locate a single migrations configuration type in the target
  290. project.
  291. .PARAMETER ConnectionStringName
  292. Specifies the name of a connection string to use from the application's
  293. configuration file.
  294. .PARAMETER ConnectionString
  295. Specifies the the connection string to use. If omitted, the context's
  296. default connection will be used.
  297. .PARAMETER ConnectionProviderName
  298. Specifies the provider invariant name of the connection string.
  299. .PARAMETER IgnoreChanges
  300. Scaffolds an empty migration ignoring any pending changes detected in the current model.
  301. This can be used to create an initial, empty migration to enable Migrations for an existing
  302. database. N.B. Doing this assumes that the target database schema is compatible with the
  303. current model.
  304. #>
  305. function Add-Migration
  306. {
  307. [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
  308. param (
  309. [parameter(Position = 0,
  310. Mandatory = $true)]
  311. [string] $Name,
  312. [switch] $Force,
  313. [string] $ProjectName,
  314. [string] $StartUpProjectName,
  315. [string] $ConfigurationTypeName,
  316. [parameter(ParameterSetName = 'ConnectionStringName')]
  317. [string] $ConnectionStringName,
  318. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  319. Mandatory = $true)]
  320. [string] $ConnectionString,
  321. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  322. Mandatory = $true)]
  323. [string] $ConnectionProviderName,
  324. [switch] $IgnoreChanges)
  325. $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $null $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
  326. try
  327. {
  328. Invoke-RunnerCommand $runner System.Data.Entity.Migrations.AddMigrationCommand @( $Name, $Force.IsPresent, $IgnoreChanges.IsPresent )
  329. $error = Get-RunnerError $runner
  330. if ($error)
  331. {
  332. if ($knownExceptions -notcontains $error.TypeName)
  333. {
  334. Write-Host $error.StackTrace
  335. }
  336. else
  337. {
  338. Write-Verbose $error.StackTrace
  339. }
  340. throw $error.Message
  341. }
  342. $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()
  343. }
  344. finally
  345. {
  346. Remove-Runner $runner
  347. }
  348. }
  349. <#
  350. .SYNOPSIS
  351. Applies any pending migrations to the database.
  352. .DESCRIPTION
  353. Updates the database to the current model by applying pending migrations.
  354. .PARAMETER SourceMigration
  355. Only valid with -Script. Specifies the name of a particular migration to use
  356. as the update's starting point. If omitted, the last applied migration in
  357. the database will be used.
  358. .PARAMETER TargetMigration
  359. Specifies the name of a particular migration to update the database to. If
  360. omitted, the current model will be used.
  361. .PARAMETER Script
  362. Generate a SQL script rather than executing the pending changes directly.
  363. .PARAMETER Force
  364. Specifies that data loss is acceptable during automatic migration of the
  365. database.
  366. .PARAMETER ProjectName
  367. Specifies the project that contains the migration configuration type to be
  368. used. If omitted, the default project selected in package manager console
  369. is used.
  370. .PARAMETER StartUpProjectName
  371. Specifies the configuration file to use for named connection strings. If
  372. omitted, the specified project's configuration file is used.
  373. .PARAMETER ConfigurationTypeName
  374. Specifies the migrations configuration to use. If omitted, migrations will
  375. attempt to locate a single migrations configuration type in the target
  376. project.
  377. .PARAMETER ConnectionStringName
  378. Specifies the name of a connection string to use from the application's
  379. configuration file.
  380. .PARAMETER ConnectionString
  381. Specifies the the connection string to use. If omitted, the context's
  382. default connection will be used.
  383. .PARAMETER ConnectionProviderName
  384. Specifies the provider invariant name of the connection string.
  385. #>
  386. function Update-Database
  387. {
  388. [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
  389. param (
  390. [string] $SourceMigration,
  391. [string] $TargetMigration,
  392. [switch] $Script,
  393. [switch] $Force,
  394. [string] $ProjectName,
  395. [string] $StartUpProjectName,
  396. [string] $ConfigurationTypeName,
  397. [parameter(ParameterSetName = 'ConnectionStringName')]
  398. [string] $ConnectionStringName,
  399. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  400. Mandatory = $true)]
  401. [string] $ConnectionString,
  402. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  403. Mandatory = $true)]
  404. [string] $ConnectionProviderName)
  405. $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $null $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
  406. try
  407. {
  408. Invoke-RunnerCommand $runner System.Data.Entity.Migrations.UpdateDatabaseCommand @( $SourceMigration, $TargetMigration, $Script.IsPresent, $Force.IsPresent, $Verbose.IsPresent )
  409. $error = Get-RunnerError $runner
  410. if ($error)
  411. {
  412. if ($knownExceptions -notcontains $error.TypeName)
  413. {
  414. Write-Host $error.StackTrace
  415. }
  416. else
  417. {
  418. Write-Verbose $error.StackTrace
  419. }
  420. throw $error.Message
  421. }
  422. $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()
  423. }
  424. finally
  425. {
  426. Remove-Runner $runner
  427. }
  428. }
  429. <#
  430. .SYNOPSIS
  431. Displays the migrations that have been applied to the target database.
  432. .DESCRIPTION
  433. Displays the migrations that have been applied to the target database.
  434. .PARAMETER ProjectName
  435. Specifies the project that contains the migration configuration type to be
  436. used. If omitted, the default project selected in package manager console
  437. is used.
  438. .PARAMETER StartUpProjectName
  439. Specifies the configuration file to use for named connection strings. If
  440. omitted, the specified project's configuration file is used.
  441. .PARAMETER ConfigurationTypeName
  442. Specifies the migrations configuration to use. If omitted, migrations will
  443. attempt to locate a single migrations configuration type in the target
  444. project.
  445. .PARAMETER ConnectionStringName
  446. Specifies the name of a connection string to use from the application's
  447. configuration file.
  448. .PARAMETER ConnectionString
  449. Specifies the the connection string to use. If omitted, the context's
  450. default connection will be used.
  451. .PARAMETER ConnectionProviderName
  452. Specifies the provider invariant name of the connection string.
  453. #>
  454. function Get-Migrations
  455. {
  456. [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
  457. param (
  458. [string] $ProjectName,
  459. [string] $StartUpProjectName,
  460. [string] $ConfigurationTypeName,
  461. [parameter(ParameterSetName = 'ConnectionStringName')]
  462. [string] $ConnectionStringName,
  463. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  464. Mandatory = $true)]
  465. [string] $ConnectionString,
  466. [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
  467. Mandatory = $true)]
  468. [string] $ConnectionProviderName)
  469. $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $null $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
  470. try
  471. {
  472. Invoke-RunnerCommand $runner System.Data.Entity.Migrations.GetMigrationsCommand
  473. $error = Get-RunnerError $runner
  474. if ($error)
  475. {
  476. if ($knownExceptions -notcontains $error.TypeName)
  477. {
  478. Write-Host $error.StackTrace
  479. }
  480. else
  481. {
  482. Write-Verbose $error.StackTrace
  483. }
  484. throw $error.Message
  485. }
  486. }
  487. finally
  488. {
  489. Remove-Runner $runner
  490. }
  491. }
  492. function New-MigrationsRunner($ProjectName, $StartUpProjectName, $ContextProjectName, $ConfigurationTypeName, $ConnectionStringName, $ConnectionString, $ConnectionProviderName)
  493. {
  494. $startUpProject = Get-MigrationsStartUpProject $StartUpProjectName $ProjectName
  495. Build-Project $startUpProject
  496. $project = Get-MigrationsProject $ProjectName
  497. Build-Project $project
  498. $contextProject = $project
  499. if ($ContextProjectName)
  500. {
  501. $contextProject = Get-SingleProject $ContextProjectName
  502. Build-Project $contextProject
  503. }
  504. $installPath = Get-EntityFrameworkInstallPath $project
  505. $toolsPath = Join-Path $installPath tools
  506. $info = New-AppDomainSetup $project $installPath
  507. $domain = [AppDomain]::CreateDomain('Migrations', $null, $info)
  508. $domain.SetData('project', $project)
  509. $domain.SetData('contextProject', $contextProject)
  510. $domain.SetData('startUpProject', $startUpProject)
  511. $domain.SetData('configurationTypeName', $ConfigurationTypeName)
  512. $domain.SetData('connectionStringName', $ConnectionStringName)
  513. $domain.SetData('connectionString', $ConnectionString)
  514. $domain.SetData('connectionProviderName', $ConnectionProviderName)
  515. $dispatcher = New-DomainDispatcher $toolsPath
  516. $domain.SetData('efDispatcher', $dispatcher)
  517. return @{
  518. Domain = $domain;
  519. ToolsPath = $toolsPath
  520. }
  521. }
  522. function New-EFConfigRunner($Project)
  523. {
  524. $installPath = Get-EntityFrameworkInstallPath $Project
  525. $toolsPath = Join-Path $installPath tools
  526. $info = New-AppDomainSetup $Project $installPath
  527. $domain = [AppDomain]::CreateDomain('EFConfig', $null, $info)
  528. $domain.SetData('project', $Project)
  529. $dispatcher = New-DomainDispatcher $toolsPath
  530. $domain.SetData('efDispatcher', $dispatcher)
  531. return @{
  532. Domain = $domain;
  533. ToolsPath = $toolsPath
  534. }
  535. }
  536. function New-AppDomainSetup($Project, $InstallPath)
  537. {
  538. $info = New-Object System.AppDomainSetup -Property @{
  539. ShadowCopyFiles = 'true';
  540. ApplicationBase = $InstallPath;
  541. PrivateBinPath = 'tools';
  542. ConfigurationFile = ([AppDomain]::CurrentDomain.SetupInformation.ConfigurationFile)
  543. }
  544. $targetFrameworkVersion = (New-Object System.Runtime.Versioning.FrameworkName ($Project.Properties.Item('TargetFrameworkMoniker').Value)).Version
  545. if ($targetFrameworkVersion -lt (New-Object Version @( 4, 5 )))
  546. {
  547. $info.PrivateBinPath += ';lib\net40'
  548. }
  549. else
  550. {
  551. $info.PrivateBinPath += ';lib\net45'
  552. }
  553. return $info
  554. }
  555. function New-DomainDispatcher($ToolsPath)
  556. {
  557. $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsPath EntityFramework.PowerShell.Utility.dll))
  558. $dispatcher = $utilityAssembly.CreateInstance(
  559. 'System.Data.Entity.Migrations.Utilities.DomainDispatcher',
  560. $false,
  561. [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::Public,
  562. $null,
  563. $PSCmdlet,
  564. $null,
  565. $null)
  566. return $dispatcher
  567. }
  568. function Remove-Runner($runner)
  569. {
  570. [AppDomain]::Unload($runner.Domain)
  571. }
  572. function Invoke-RunnerCommand($runner, $command, $parameters, $anonymousArguments)
  573. {
  574. $domain = $runner.Domain
  575. if ($anonymousArguments)
  576. {
  577. $anonymousArguments.GetEnumerator() | %{
  578. $domain.SetData($_.Name, $_.Value)
  579. }
  580. }
  581. $domain.CreateInstanceFrom(
  582. (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
  583. $command,
  584. $false,
  585. 0,
  586. $null,
  587. $parameters,
  588. $null,
  589. $null) | Out-Null
  590. }
  591. function Get-RunnerError($runner)
  592. {
  593. $domain = $runner.Domain
  594. if (!$domain.GetData('wasError'))
  595. {
  596. return $null
  597. }
  598. return @{
  599. Message = $domain.GetData('error.Message');
  600. TypeName = $domain.GetData('error.TypeName');
  601. StackTrace = $domain.GetData('error.StackTrace')
  602. }
  603. }
  604. function Get-MigrationsProject($name, $hideMessage)
  605. {
  606. if ($name)
  607. {
  608. return Get-SingleProject $name
  609. }
  610. $project = Get-Project
  611. $projectName = $project.Name
  612. if (!$hideMessage)
  613. {
  614. Write-Verbose "Using NuGet project '$projectName'."
  615. }
  616. return $project
  617. }
  618. function Get-MigrationsStartUpProject($name, $fallbackName)
  619. {
  620. $startUpProject = $null
  621. if ($name)
  622. {
  623. $startUpProject = Get-SingleProject $name
  624. }
  625. else
  626. {
  627. $startupProjectPaths = $DTE.Solution.SolutionBuild.StartupProjects
  628. if ($startupProjectPaths)
  629. {
  630. if ($startupProjectPaths.Length -eq 1)
  631. {
  632. $startupProjectPath = $startupProjectPaths[0]
  633. if (!(Split-Path -IsAbsolute $startupProjectPath))
  634. {
  635. $solutionPath = Split-Path $DTE.Solution.Properties.Item('Path').Value
  636. $startupProjectPath = Join-Path $solutionPath $startupProjectPath -Resolve
  637. }
  638. $startupProject = Get-SolutionProjects | ?{
  639. try
  640. {
  641. $fullName = $_.FullName
  642. }
  643. catch [NotImplementedException]
  644. {
  645. return $false
  646. }
  647. if ($fullName -and $fullName.EndsWith('\'))
  648. {
  649. $fullName = $fullName.Substring(0, $fullName.Length - 1)
  650. }
  651. return $fullName -eq $startupProjectPath
  652. }
  653. }
  654. else
  655. {
  656. Write-Verbose 'More than one start-up project found.'
  657. }
  658. }
  659. else
  660. {
  661. Write-Verbose 'No start-up project found.'
  662. }
  663. }
  664. if (!($startUpProject -and (Test-StartUpProject $startUpProject)))
  665. {
  666. $startUpProject = Get-MigrationsProject $fallbackName $true
  667. $startUpProjectName = $startUpProject.Name
  668. Write-Warning "Cannot determine a valid start-up project. Using project '$startUpProjectName' instead. Your configuration file and working directory may not be set as expected. Use the -StartUpProjectName parameter to set one explicitly. Use the -Verbose switch for more information."
  669. }
  670. else
  671. {
  672. $startUpProjectName = $startUpProject.Name
  673. Write-Verbose "Using StartUp project '$startUpProjectName'."
  674. }
  675. return $startUpProject
  676. }
  677. function Get-SolutionProjects()
  678. {
  679. $projects = New-Object System.Collections.Stack
  680. $DTE.Solution.Projects | %{
  681. $projects.Push($_)
  682. }
  683. while ($projects.Count -ne 0)
  684. {
  685. $project = $projects.Pop();
  686. # NOTE: This line is similar to doing a "yield return" in C#
  687. $project
  688. if ($project.ProjectItems)
  689. {
  690. $project.ProjectItems | ?{ $_.SubProject } | %{
  691. $projects.Push($_.SubProject)
  692. }
  693. }
  694. }
  695. }
  696. function Get-SingleProject($name)
  697. {
  698. $project = Get-Project $name
  699. if ($project -is [array])
  700. {
  701. throw "More than one project '$name' was found. Specify the full name of the one to use."
  702. }
  703. return $project
  704. }
  705. function Test-StartUpProject($project)
  706. {
  707. if ($project.Kind -eq '{cc5fd16d-436d-48ad-a40c-5a424c6e3e79}')
  708. {
  709. $projectName = $project.Name
  710. Write-Verbose "Cannot use start-up project '$projectName'. The Windows Azure Project type isn't supported."
  711. return $false
  712. }
  713. return $true
  714. }
  715. function Build-Project($project)
  716. {
  717. $configuration = $DTE.Solution.SolutionBuild.ActiveConfiguration.Name
  718. $DTE.Solution.SolutionBuild.BuildProject($configuration, $project.UniqueName, $true)
  719. if ($DTE.Solution.SolutionBuild.LastBuildInfo)
  720. {
  721. $projectName = $project.Name
  722. throw "The project '$projectName' failed to build."
  723. }
  724. }
  725. function Get-EntityFrameworkInstallPath($project)
  726. {
  727. $package = Get-Package -ProjectName $project.FullName | ?{ $_.Id -eq 'EntityFramework' }
  728. if (!$package)
  729. {
  730. $projectName = $project.Name
  731. throw "The EntityFramework package is not installed on project '$projectName'."
  732. }
  733. return Get-PackageInstallPath $package
  734. }
  735. function Get-PackageInstallPath($package)
  736. {
  737. $componentModel = Get-VsComponentModel
  738. $packageInstallerServices = $componentModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
  739. $vsPackage = $packageInstallerServices.GetInstalledPackages() | ?{ $_.Id -eq $package.Id -and $_.Version -eq $package.Version }
  740. return $vsPackage.InstallPath
  741. }
  742. function Check-Project($project)
  743. {
  744. if (!$project.FullName)
  745. {
  746. throw "The Project argument must refer to a Visual Studio project. Use the '`$project' variable provided by NuGet when running in install.ps1."
  747. }
  748. }
  749. Export-ModuleMember @( 'Enable-Migrations', 'Add-Migration', 'Update-Database', 'Get-Migrations', 'Add-EFProvider', 'Add-EFDefaultConnectionFactory', 'Initialize-EFConfiguration') -Variable InitialDatabase
  750. # SIG # Begin signature block
  751. # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
  752. # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
  753. # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUGD2nrGYv22CsZ8TVTLPYVoMj
  754. # HJGgghWCMIIEwzCCA6ugAwIBAgITMwAAACs5MkjBsslI8wAAAAAAKzANBgkqhkiG
  755. # 9w0BAQUFADB3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G
  756. # A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEw
  757. # HwYDVQQDExhNaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTIwOTA0MjExMjM0
  758. # WhcNMTMxMjA0MjExMjM0WjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp
  759. # bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
  760. # b3JhdGlvbjENMAsGA1UECxMETU9QUjEnMCUGA1UECxMebkNpcGhlciBEU0UgRVNO
  761. # OkMwRjQtMzA4Ni1ERUY4MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT
  762. # ZXJ2aWNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAprYwDgNlrlBa
  763. # hmuFn0ihHsnA7l5JB4XgcJZ8vrlfYl8GJtOLObsYIqUukq3YS4g6Gq+bg67IXjmM
  764. # wjJ7FnjtNzg68WL7aIICaOzru0CKsf6hLDZiYHA5YGIO+8YYOG+wktZADYCmDXiL
  765. # NmuGiiYXGP+w6026uykT5lxIjnBGNib+NDWrNOH32thc6pl9MbdNH1frfNaVDWYM
  766. # Hg4yFz4s1YChzuv3mJEC3MFf/TiA+Dl/XWTKN1w7UVtdhV/OHhz7NL5f5ShVcFSc
  767. # uOx8AFVGWyiYKFZM4fG6CRmWgUgqMMj3MyBs52nDs9TDTs8wHjfUmFLUqSNFsq5c
  768. # QUlPtGJokwIDAQABo4IBCTCCAQUwHQYDVR0OBBYEFKUYM1M/lWChQxbvjsav0iu6
  769. # nljQMB8GA1UdIwQYMBaAFCM0+NlSRnAK7UD7dvuzK7DDNbMPMFQGA1UdHwRNMEsw
  770. # SaBHoEWGQ2h0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3Rz
  771. # L01pY3Jvc29mdFRpbWVTdGFtcFBDQS5jcmwwWAYIKwYBBQUHAQEETDBKMEgGCCsG
  772. # AQUFBzAChjxodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY3Jv
  773. # c29mdFRpbWVTdGFtcFBDQS5jcnQwEwYDVR0lBAwwCgYIKwYBBQUHAwgwDQYJKoZI
  774. # hvcNAQEFBQADggEBAH7MsHvlL77nVrXPc9uqUtEWOca0zfrX/h5ltedI85tGiAVm
  775. # aiaGXv6HWNzGY444gPQIRnwrc7EOv0Gqy8eqlKQ38GQ54cXV+c4HzqvkJfBprtRG
  776. # 4v5mMjzXl8UyIfruGiWgXgxCLBEzOoKD/e0ds77OkaSRJXG5q3Kwnq/kzwBiiXCp
  777. # uEpQjO4vImSlqOZNa5UsHHnsp6Mx2pBgkKRu/pMCDT8sJA3GaiaBUYNKELt1Y0Sq
  778. # aQjGA+vizwvtVjrs73KnCgz0ANMiuK8icrPnxJwLKKCAyuPh1zlmMOdGFxjn+oL6
  779. # WQt6vKgN/hz/A4tjsk0SAiNPLbOFhDvioUfozxUwggTsMIID1KADAgECAhMzAAAA
  780. # sBGvCovQO5/dAAEAAACwMA0GCSqGSIb3DQEBBQUAMHkxCzAJBgNVBAYTAlVTMRMw
  781. # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN
  782. # aWNyb3NvZnQgQ29ycG9yYXRpb24xIzAhBgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNp
  783. # Z25pbmcgUENBMB4XDTEzMDEyNDIyMzMzOVoXDTE0MDQyNDIyMzMzOVowgYMxCzAJ
  784. # BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25k
  785. # MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xDTALBgNVBAsTBE1PUFIx
  786. # HjAcBgNVBAMTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjCCASIwDQYJKoZIhvcNAQEB
  787. # BQADggEPADCCAQoCggEBAOivXKIgDfgofLwFe3+t7ut2rChTPzrbQH2zjjPmVz+l
  788. # URU0VKXPtIupP6g34S1Q7TUWTu9NetsTdoiwLPBZXKnr4dcpdeQbhSeb8/gtnkE2
  789. # KwtA+747urlcdZMWUkvKM8U3sPPrfqj1QRVcCGUdITfwLLoiCxCxEJ13IoWEfE+5
  790. # G5Cw9aP+i/QMmk6g9ckKIeKq4wE2R/0vgmqBA/WpNdyUV537S9QOgts4jxL+49Z6
  791. # dIhk4WLEJS4qrp0YHw4etsKvJLQOULzeHJNcSaZ5tbbbzvlweygBhLgqKc+/qQUF
  792. # 4eAPcU39rVwjgynrx8VKyOgnhNN+xkMLlQAFsU9lccUCAwEAAaOCAWAwggFcMBMG
  793. # A1UdJQQMMAoGCCsGAQUFBwMDMB0GA1UdDgQWBBRZcaZaM03amAeA/4Qevof5cjJB
  794. # 8jBRBgNVHREESjBIpEYwRDENMAsGA1UECxMETU9QUjEzMDEGA1UEBRMqMzE1OTUr
  795. # NGZhZjBiNzEtYWQzNy00YWEzLWE2NzEtNzZiYzA1MjM0NGFkMB8GA1UdIwQYMBaA
  796. # FMsR6MrStBZYAck3LjMWFrlMmgofMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9j
  797. # cmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY0NvZFNpZ1BDQV8w
  798. # OC0zMS0yMDEwLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6
  799. # Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljQ29kU2lnUENBXzA4LTMx
  800. # LTIwMTAuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQAx124qElczgdWdxuv5OtRETQie
  801. # 7l7falu3ec8CnLx2aJ6QoZwLw3+ijPFNupU5+w3g4Zv0XSQPG42IFTp8263Os8ls
  802. # ujksRX0kEVQmMA0N/0fqAwfl5GZdLHudHakQ+hywdPJPaWueqSSE2u2WoN9zpO9q
  803. # GqxLYp7xfMAUf0jNTbJE+fA8k21C2Oh85hegm2hoCSj5ApfvEQO6Z1Ktwemzc6bS
  804. # Y81K4j7k8079/6HguwITO10g3lU/o66QQDE4dSheBKlGbeb1enlAvR/N6EXVruJd
  805. # PvV1x+ZmY2DM1ZqEh40kMPfvNNBjHbFCZ0oOS786Du+2lTqnOOQlkgimiGaCMIIF
  806. # vDCCA6SgAwIBAgIKYTMmGgAAAAAAMTANBgkqhkiG9w0BAQUFADBfMRMwEQYKCZIm
  807. # iZPyLGQBGRYDY29tMRkwFwYKCZImiZPyLGQBGRYJbWljcm9zb2Z0MS0wKwYDVQQD
  808. # EyRNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTAwODMx
  809. # MjIxOTMyWhcNMjAwODMxMjIyOTMyWjB5MQswCQYDVQQGEwJVUzETMBEGA1UECBMK
  810. # V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
  811. # IENvcnBvcmF0aW9uMSMwIQYDVQQDExpNaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBD
  812. # QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJyWVwZMGS/HZpgICBC
  813. # mXZTbD4b1m/My/Hqa/6XFhDg3zp0gxq3L6Ay7P/ewkJOI9VyANs1VwqJyq4gSfTw
  814. # aKxNS42lvXlLcZtHB9r9Jd+ddYjPqnNEf9eB2/O98jakyVxF3K+tPeAoaJcap6Vy
  815. # c1bxF5Tk/TWUcqDWdl8ed0WDhTgW0HNbBbpnUo2lsmkv2hkL/pJ0KeJ2L1TdFDBZ
  816. # +NKNYv3LyV9GMVC5JxPkQDDPcikQKCLHN049oDI9kM2hOAaFXE5WgigqBTK3S9dP
  817. # Y+fSLWLxRT3nrAgA9kahntFbjCZT6HqqSvJGzzc8OJ60d1ylF56NyxGPVjzBrAlf
  818. # A9MCAwEAAaOCAV4wggFaMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMsR6MrS
  819. # tBZYAck3LjMWFrlMmgofMAsGA1UdDwQEAwIBhjASBgkrBgEEAYI3FQEEBQIDAQAB
  820. # MCMGCSsGAQQBgjcVAgQWBBT90TFO0yaKleGYYDuoMW+mPLzYLTAZBgkrBgEEAYI3
  821. # FAIEDB4KAFMAdQBiAEMAQTAfBgNVHSMEGDAWgBQOrIJgQFYnl+UlE/wq4QpTlVnk
  822. # pDBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtp
  823. # L2NybC9wcm9kdWN0cy9taWNyb3NvZnRyb290Y2VydC5jcmwwVAYIKwYBBQUHAQEE
  824. # SDBGMEQGCCsGAQUFBzAChjhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2Nl
  825. # cnRzL01pY3Jvc29mdFJvb3RDZXJ0LmNydDANBgkqhkiG9w0BAQUFAAOCAgEAWTk+
  826. # fyZGr+tvQLEytWrrDi9uqEn361917Uw7LddDrQv+y+ktMaMjzHxQmIAhXaw9L0y6
  827. # oqhWnONwu7i0+Hm1SXL3PupBf8rhDBdpy6WcIC36C1DEVs0t40rSvHDnqA2iA6VW
  828. # 4LiKS1fylUKc8fPv7uOGHzQ8uFaa8FMjhSqkghyT4pQHHfLiTviMocroE6WRTsgb
  829. # 0o9ylSpxbZsa+BzwU9ZnzCL/XB3Nooy9J7J5Y1ZEolHN+emjWFbdmwJFRC9f9Nqu
  830. # 1IIybvyklRPk62nnqaIsvsgrEA5ljpnb9aL6EiYJZTiU8XofSrvR4Vbo0HiWGFzJ
  831. # NRZf3ZMdSY4tvq00RBzuEBUaAF3dNVshzpjHCe6FDoxPbQ4TTj18KUicctHzbMrB
  832. # 7HCjV5JXfZSNoBtIA1r3z6NnCnSlNu0tLxfI5nI3EvRvsTxngvlSso0zFmUeDord
  833. # EN5k9G/ORtTTF+l5xAS00/ss3x+KnqwK+xMnQK3k+eGpf0a7B2BHZWBATrBC7E7t
  834. # s3Z52Ao0CW0cgDEf4g5U3eWh++VHEK1kmP9QFi58vwUheuKVQSdpw5OPlcmN2Jsh
  835. # rg1cnPCiroZogwxqLbt2awAdlq3yFnv2FoMkuYjPaqhHMS+a3ONxPdcAfmJH0c6I
  836. # ybgY+g5yjcGjPa8CQGr/aZuW4hCoELQ3UAjWwz0wggYHMIID76ADAgECAgphFmg0
  837. # AAAAAAAcMA0GCSqGSIb3DQEBBQUAMF8xEzARBgoJkiaJk/IsZAEZFgNjb20xGTAX
  838. # BgoJkiaJk/IsZAEZFgltaWNyb3NvZnQxLTArBgNVBAMTJE1pY3Jvc29mdCBSb290
  839. # IENlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0wNzA0MDMxMjUzMDlaFw0yMTA0MDMx
  840. # MzAzMDlaMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD
  841. # VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAf
  842. # BgNVBAMTGE1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQTCCASIwDQYJKoZIhvcNAQEB
  843. # BQADggEPADCCAQoCggEBAJ+hbLHf20iSKnxrLhnhveLjxZlRI1Ctzt0YTiQP7tGn
  844. # 0UytdDAgEesH1VSVFUmUG0KSrphcMCbaAGvoe73siQcP9w4EmPCJzB/LMySHnfL0
  845. # Zxws/HvniB3q506jocEjU8qN+kXPCdBer9CwQgSi+aZsk2fXKNxGU7CG0OUoRi4n
  846. # rIZPVVIM5AMs+2qQkDBuh/NZMJ36ftaXs+ghl3740hPzCLdTbVK0RZCfSABKR2YR
  847. # JylmqJfk0waBSqL5hKcRRxQJgp+E7VV4/gGaHVAIhQAQMEbtt94jRrvELVSfrx54
  848. # QTF3zJvfO4OToWECtR0Nsfz3m7IBziJLVP/5BcPCIAsCAwEAAaOCAaswggGnMA8G
  849. # A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFCM0+NlSRnAK7UD7dvuzK7DDNbMPMAsG
  850. # A1UdDwQEAwIBhjAQBgkrBgEEAYI3FQEEAwIBADCBmAYDVR0jBIGQMIGNgBQOrIJg
  851. # QFYnl+UlE/wq4QpTlVnkpKFjpGEwXzETMBEGCgmSJomT8ixkARkWA2NvbTEZMBcG
  852. # CgmSJomT8ixkARkWCW1pY3Jvc29mdDEtMCsGA1UEAxMkTWljcm9zb2Z0IFJvb3Qg
  853. # Q2VydGlmaWNhdGUgQXV0aG9yaXR5ghB5rRahSqClrUxzWPQHEy5lMFAGA1UdHwRJ
  854. # MEcwRaBDoEGGP2h0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1
  855. # Y3RzL21pY3Jvc29mdHJvb3RjZXJ0LmNybDBUBggrBgEFBQcBAQRIMEYwRAYIKwYB
  856. # BQUHMAKGOGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljcm9z
  857. # b2Z0Um9vdENlcnQuY3J0MBMGA1UdJQQMMAoGCCsGAQUFBwMIMA0GCSqGSIb3DQEB
  858. # BQUAA4ICAQAQl4rDXANENt3ptK132855UU0BsS50cVttDBOrzr57j7gu1BKijG1i
  859. # uFcCy04gE1CZ3XpA4le7r1iaHOEdAYasu3jyi9DsOwHu4r6PCgXIjUji8FMV3U+r
  860. # kuTnjWrVgMHmlPIGL4UD6ZEqJCJw+/b85HiZLg33B+JwvBhOnY5rCnKVuKE5nGct
  861. # xVEO6mJcPxaYiyA/4gcaMvnMMUp2MT0rcgvI6nA9/4UKE9/CCmGO8Ne4F+tOi3/F
  862. # NSteo7/rvH0LQnvUU3Ih7jDKu3hlXFsBFwoUDtLaFJj1PLlmWLMtL+f5hYbMUVbo
  863. # nXCUbKw5TNT2eb+qGHpiKe+imyk0BncaYsk9Hm0fgvALxyy7z0Oz5fnsfbXjpKh0
  864. # NbhOxXEjEiZ2CzxSjHFaRkMUvLOzsE1nyJ9C/4B5IYCeFTBm6EISXhrIniIh0EPp
  865. # K+m79EjMLNTYMoBMJipIJF9a6lbvpt6Znco6b72BJ3QGEe52Ib+bgsEnVLaxaj2J
  866. # oXZhtG6hE6a/qkfwEm/9ijJssv7fUciMI8lmvZ0dhxJkAj0tr1mPuOQh5bWwymO0
  867. # eFQF1EEuUKyUsKV4q7OglnUa2ZKHE3UiLzKoCG6gW4wlv6DvhMoh1useT8ma7kng
  868. # 9wFlb4kLfchpyOZu6qeXzjEp/w7FW1zYTRuh2Povnj8uVRZryROj/TGCBJcwggST
  869. # AgEBMIGQMHkxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD
  870. # VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xIzAh
  871. # BgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBAhMzAAAAsBGvCovQO5/d
  872. # AAEAAACwMAkGBSsOAwIaBQCggbAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw
  873. # HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFHlP
  874. # wIpDUAGAnbgDrTywRVvTXuBEMFAGCisGAQQBgjcCAQwxQjBAoCKAIABFAG4AdABp
  875. # AHQAeQAgAEYAcgBhAG0AZQB3AG8AcgBroRqAGGh0dHA6Ly9tc2RuLmNvbS9kYXRh
  876. # L2VmIDANBgkqhkiG9w0BAQEFAASCAQBGhre2E1qw0m8EQgJBaVLi6CgwVn7+qSCY
  877. # WqIIcygRNohB5i3zj61/qTEa4DZLc0F3hvGC6aNwwjUbnoU4nZoqOSQgta2DaVul
  878. # uhm7Y+BTZsXvYY9q26UjgUbo1jdBrWelIbu+3YV+pE00UVuV0RabWkEdFBr9HeOV
  879. # nZYczzdVvnYkkkFxO25SVHZWT2nyWhYxMYv+HLoUBND1BmZzNYWnJqegL4BrczNm
  880. # exycbGbRVEO45QOJEK+3vA4o6GKPk09wcFEmkvlncGKTz4fGhYWf5ELykT0TSQuL
  881. # vP1PN35OUNzlpqc2FuWCDosVl8FUhphYXpiw/1sUnI5nPG8aGiUboYICKDCCAiQG
  882. # CSqGSIb3DQEJBjGCAhUwggIRAgEBMIGOMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
  883. # EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv
  884. # ZnQgQ29ycG9yYXRpb24xITAfBgNVBAMTGE1pY3Jvc29mdCBUaW1lLVN0YW1wIFBD
  885. # QQITMwAAACs5MkjBsslI8wAAAAAAKzAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkD
  886. # MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwOTExMTYwNDU5WjAjBgkq
  887. # hkiG9w0BCQQxFgQU0jwg1lgVl4Ydsz+7YfTew/L6w9EwDQYJKoZIhvcNAQEFBQAE
  888. # ggEAT5kurkrFiaB7YVAWU7VrrXF4Pr9kGEnSMBr0VEfztrVGNOLsdyZYk12tRYnj
  889. # 6MB0x1bajZMYXCj+0Z8oTzaG+JXASkNNIm4uWP1t6TsfixCw9Sr4p4cQUaIXwYj6
  890. # AN+tmLT82knMkW8Q/8lcc8BzfL45pjXonMNCJm3QOUwQ3SqXKgEMTsKLULFvUmsm
  891. # dlwbdl2nlNdNyF5t8NkQZX5NPkpXJ9gdz34XSXPADxBiuE1haiV8ckyfhBIgiq2A
  892. # CM2eGdggysiSVJcQGJ/GzsAsRC89FQQeqcKisHrFz7UOL8oX8ZxJ/7CWHPQUmk/t
  893. # gRpD2K2HFoKdbJziPMLEhoQ5yQ==
  894. # SIG # End signature block