共用方式為


IGenerator 介面

定義資料產生器合約。

命名空間:  Microsoft.Data.Schema.Tools.DataGenerator
組件:  Microsoft.Data.Schema.Tools (在 Microsoft.Data.Schema.Tools.dll 中)

語法

'宣告
<CLSCompliantAttribute(True)> _
Public Interface IGenerator _
    Inherits IExtension, IDisposable
[CLSCompliantAttribute(true)]
public interface IGenerator : IExtension, 
    IDisposable
[CLSCompliantAttribute(true)]
public interface class IGenerator : IExtension, 
    IDisposable
[<CLSCompliantAttribute(true)>]
type IGenerator =  
    interface
        interface IExtension
        interface IDisposable
    end
public interface IGenerator extends IExtension, IDisposable

IGenerator 型別會公開下列成員。

方法

  名稱 說明
公用方法 Dispose 執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。 (繼承自 IDisposable)。
公用方法 GenerateNextValues 在類別中實作時,根據資料產生器演算法產生下一個值。
公用方法 GetOutputValue 在類別中實作時,擷取輸出值。
公用方法 Initialize 在類別中實作時,初始化資料產生器。
公用方法 SetInputValues 設定資料產生器的輸入值。
公用方法 ValidateInputs 驗證是否已設定資料產生器的所有必要輸入。

回頁首

備註

如果標準資料產生器不夠,您可以建立自訂的資料產生器。 您必須建立實作 IGenerator 或繼承自 Generator 的類別 (Class),才能建立自訂資料產生器。 您可以用 GeneratorAttribute 為類別進行裝飾,使其識別為資料產生器。

您可以為自訂資料產生器建立自訂的設計工具,或是您可以使用 DefaultGeneratorDesigner。 如需詳細資訊,請參閱資料產生器擴充性概觀

請參閱

參考

Microsoft.Data.Schema.Tools.DataGenerator 命名空間

Generator

GeneratorAttribute

GeneratorInit

其他資源

資料產生器擴充性概觀

HOW TO:建立自訂資料產生器