public SchemaEntry(string columnName, Type valueType, SchemaEntryType columnType, int columnLength, NullableType nullable, IRange range = null) { ColumnName = columnName; ValueType = valueType; ColumnType = columnType; ColumnLength = columnLength; ColumnNullable = nullable; Range = range; }
private ValidationIssue.Code GetIssueCode(SchemaEntryType columnType) { switch (columnType) { case SchemaEntryType.ForeignLookupKey: case SchemaEntryType.ForeignMeasurementKey: return(ValidationIssue.Code.MissingForeignKeyCode); case SchemaEntryType.LocalMeasurementKey: case SchemaEntryType.LocalLookupKey: return(ValidationIssue.Code.MissingUniqueKeyCode); default: return(ValidationIssue.Code.MissingRequiredFieldCode); } }
public void Add( string columnName, Type valueType, SchemaEntryType columnType, int columnLength = 0, NullableType nullable = NullableType.IsNullable, IRange range = null) { if (columnName == null) { columnName = string.Empty; } SchemaEntry column = new SchemaEntry(columnName, valueType, columnType, columnLength, nullable, range); _entries.Add(columnName.ToLowerInvariant(), column); }
private uint ConvertTypeToColor(SchemaEntryType columnType) { uint result; switch (columnType) { case SchemaEntryType.LocalLookupKey: case SchemaEntryType.ForeignLookupKey: result = StyleSheetHelper.Orange; break; case SchemaEntryType.LocalMeasurementKey: case SchemaEntryType.ForeignMeasurementKey: result = StyleSheetHelper.Blue; break; default: result = StyleSheetHelper.Normal; break; } return(result); }