Exemple #1
0
 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;
 }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }