DeploymentContributorConfigurationStream Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mewakili versi file konfigurasi yang dapat dialirkan yang digunakan oleh DacFx dalam proses penyebaran dan build. Aliran ini memungkinkan ekstensi penyebaran untuk meningkatkan dan memperluas pengalaman desain dan penyebaran.
File konfigurasi input dapat didefinisikan dalam file .sqlproj sebagai bagian dari proses MSBuild. File diperlakukan sebagai aliran, dan akan diteruskan ke kontributor melalui Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.EstablishDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationSetup) metode , di mana mereka dapat disalin sebagai output yang disimpan dalam dacpac yang dihasilkan.
Aliran ini kemudian akan tersedia di , di Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.ApplyDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorContext,System.Collections.Generic.ICollection{Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationStream})mana mereka dapat digunakan untuk konfigurasi dan data selama penyebaran. Di akhir Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.ApplyDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorContext,System.Collections.Generic.ICollection{Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationStream}) metode, semua aliran akan dibuang. Kontributor yang perlu mendapatkan data dari aliran harus membaca dan menyimpan data selama metode ini - upaya untuk membaca dari aliran selama OnExecute(DeploymentPlanContributorContext) metode akan gagal.
Di dalam file .sqproj, file Konfigurasi Penyebaran ditentukan sebagai berikut: <ItemGroup><DeploymentExtensionConfiguration Include="MyContributorName.MyFileName1.sql" /><DeploymentExtensionConfiguration Include="MyContributorName.MyFileName2.sql" /></ItemGroup>
Perhatikan bahwa aliran konfigurasi dapat diakses oleh semua kontributor. Kontributor dapat menggunakan pola penamaan file untuk mengidentifikasi file input mana yang terkait dengan kontributor tersebut.
public sealed class DeploymentContributorConfigurationStream
type DeploymentContributorConfigurationStream = class
Public NotInheritable Class DeploymentContributorConfigurationStream
- Warisan
-
DeploymentContributorConfigurationStream
Konstruktor
| Nama | Deskripsi |
|---|---|
| DeploymentContributorConfigurationStream(String) |
Membuat instans DeploymentContributorConfigurationStream |
Properti
| Nama | Deskripsi |
|---|---|
| Filename |
Nama file yang digunakan untuk mewakili aliran ini |
Metode
| Nama | Deskripsi |
|---|---|
| GetStream() |
Mendapatkan Stream |