Esempio n. 1
0
        public TextContent Default(Schema schema)
        {
            List <RuleViolation> violations  = new List <RuleViolation>();
            TextContent          textContent = new TextContent();

            foreach (Column column in ((ISchema)(schema.AsActual())).Columns)
            {
                if (!string.IsNullOrEmpty(column.DefaultValue))
                {
                    ParseColumnValue(textContent, ref violations, column, column.DefaultValue);
                }
                else
                {
                    textContent[column.Name] = DataTypeHelper.DefaultValue(column.DataType);
                }
            }

            return(textContent);
        }