共用方式為


DataSink.OnValidateTarget 方法

由資料產生引擎在驗證期間呼叫,以讓衍生類別執行其他驗證。

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

語法

'宣告
Protected Overridable Function OnValidateTarget ( _
    <OutAttribute> ByRef errors As List(Of DataSchemaError) _
) As Boolean
protected virtual bool OnValidateTarget(
    out List<DataSchemaError> errors
)
protected:
virtual bool OnValidateTarget(
    [OutAttribute] List<DataSchemaError^>^% errors
)
abstract OnValidateTarget : 
        errors:List<DataSchemaError> byref -> bool 
override OnValidateTarget : 
        errors:List<DataSchemaError> byref -> bool 
protected function OnValidateTarget(
    errors : List<DataSchemaError>
) : boolean

參數

傳回值

型別:System.Boolean
如果目標資料庫資料表和資料行符合資料產生計劃中的資料表和資料行,則為 true,否則為 false。預設的實作一定會傳回 true。

備註

在衍生類別中,這個 OnValidateTarget 方法可以實作完全新的驗證處理程序,或是呼叫 ValidateTargetModel Helper 方法以進行驗證。

.NET Framework 安全性

請參閱

參考

DataSink 類別

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

DataSchemaError

ValidateTargetModel