本文整理汇总了C#中ColumnType.Verify方法的典型用法代码示例。如果您正苦于以下问题:C# ColumnType.Verify方法的具体用法?C# ColumnType.Verify怎么用?C# ColumnType.Verify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ColumnType
的用法示例。
在下文中一共展示了ColumnType.Verify方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyParsedSchema
//.........这里部分代码省略.........
targetSystem = new TargetSystem { Name = parsedTarget.name };
this.TargetSystems.Add(targetSystem);
}
Target target = new Target
{
TargetSystem = targetSystem,
DataType = parsedTarget.dataType,
DataTypeWhenReferenced = parsedTarget.dataTypeWhenReferenced,
DotNetType = parsedTarget.dotNetType,
DotNetTypeNullable = parsedTarget.dotNetTypeNullable
};
if (parsedTarget.ExtendedProperties != null && parsedTarget.ExtendedProperties.Length > 0)
{
target.ExtendedProperties.Clear();
foreach (var property in parsedTarget.ExtendedProperties)
{
target.ExtendedProperties.Add(property.name, property.Value);
}
}
try
{
columnType.Targets.Add(target);
}
catch (ArgumentException)
{
context.Add(new VerificationMessage(Severity.Error,
string.Format(System.Globalization.CultureInfo.CurrentCulture, Properties.Resources.ColumnTypeTargetDuplicates, target.TargetSystem.Name, columnType.Name)));
}
}
}
columnType.Verify(context);
if (!this.ColumnTypes.Contains(columnType.Name))
{
this.ColumnTypes.Add(columnType);
}
else
{
context.Add(new VerificationMessage(Severity.Error,
string.Format(System.Globalization.CultureInfo.CurrentCulture, Properties.Resources.ColumnTypeDuplicates, columnType.Name)));
}
}
if (parsedSchema.Tables != null)
{
// Tables: First pass - references are skipped until second pass.
foreach (var parsedTable in parsedSchema.Tables)
{
Table table = new Table();
table.Name = parsedTable.name;
try
{
this.Tables.Add(table);
}
catch (ArgumentException)
{
context.Add(new VerificationTableMessage(Severity.Error, table.Name, Properties.Resources.SchemaTableExists));
}
table.Description = parsedTable.description;
// Columns