Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeWriter"/> class.
        /// </summary>
        /// <param name="schema">The schema.</param>
        /// <param name="codeWriterSettings">The code writer settings.</param>
        public CodeWriter(DatabaseSchema schema, CodeWriterSettings codeWriterSettings)
        {
            if (schema == null)
            {
                throw new ArgumentNullException("schema");
            }
            if (codeWriterSettings == null)
            {
                throw new ArgumentNullException("codeWriterSettings");
            }

            _schema             = schema;
            _codeWriterSettings = codeWriterSettings;

            PrepareSchemaNames.Prepare(schema, codeWriterSettings.Namer);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClassWriter"/> class.
 /// </summary>
 /// <param name="table">The table.</param>
 /// <param name="codeWriterSettings">The code writer settings.</param>
 public ClassWriter(DatabaseTable table, CodeWriterSettings codeWriterSettings)
 {
     _codeWriterSettings = codeWriterSettings;
     _table = table;
     _cb    = new ClassBuilder();
 }
Exemplo n.º 3
0
 public DataAnnotationWriter(bool isNet4, CodeWriterSettings codeWriterSettings)
 {
     _codeWriterSettings = codeWriterSettings;
     _isNet4             = isNet4;
 }
Exemplo n.º 4
0
 public UnitTestWriter(DatabaseSchema schema, CodeWriterSettings codeWriterSettings)
 {
     _codeWriterSettings = codeWriterSettings;
     _schema             = schema;
     _cb = new ClassBuilder();
 }