DeploymentContributorConfigurationStream 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表一個可串流的設定檔版本,供 DacFx 在部署與建置過程中使用。 這些流程使部署擴展成為可能,以提升並擴展設計與部署體驗。
輸入設定檔可在 .sqlproj 檔案中定義,作為 MSBuild 程序的一部分。 這些檔案會被視為串流,並會透過此 Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.EstablishDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationSetup) 方法傳遞給貢獻者,並可將檔案複製為輸出,儲存在產生的 dacpac 中。
這些串流接著會以 Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.ApplyDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorContext,System.Collections.Generic.ICollection{Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationStream})提供,供部署時用於配置與資料處理。 方法結束 Microsoft.SqlServer.Dac.Deployment.DeploymentContributor.ApplyDeploymentConfiguration(Microsoft.SqlServer.Dac.Deployment.DeploymentContributorContext,System.Collections.Generic.ICollection{Microsoft.SqlServer.Dac.Deployment.DeploymentContributorConfigurationStream}) 後,所有溪流都會被處理掉。 需要從串流取得資料的貢獻者必須在此過程中讀取並快取資料——在此過程中嘗試從串流 OnExecute(DeploymentPlanContributorContext) 讀取將失敗。
在 .sqproj 檔案中,部署設定檔的指定如下: <ItemGroup><DeploymentExtensionConfiguration Include=“MyContributorName.MyFileName1.sql” /><DeploymentExtensionConfiguration Include=“MyContributorName.MyFileName2.sql” /></ItemGroup>
請注意,所有貢獻者都能存取設定串流。 貢獻者可能會採用檔案命名模式來識別與該貢獻者相關的輸入檔案。
public sealed class DeploymentContributorConfigurationStream
type DeploymentContributorConfigurationStream = class
Public NotInheritable Class DeploymentContributorConfigurationStream
- 繼承
-
DeploymentContributorConfigurationStream
建構函式
| 名稱 | Description |
|---|---|
| DeploymentContributorConfigurationStream(String) |
屬性
| 名稱 | Description |
|---|---|
| Filename |
用來表示此串流的檔名 |
方法
| 名稱 | Description |
|---|---|
| GetStream() |
獲得 Stream |