public Engine(GenerateProperties settings)
        {
            if (settings == null)
            {
                throw new NullReferenceException("Cannot initialize engine with empty settings");
            }
            Settings          = settings;
            TableDefinitions  = new Dictionary <string, TableDefinition>();
            Relations         = new List <Relation>();
            Tables            = new Dictionary <string, Table>();
            ColumnDefinitions = new Dictionary <string, ColumnDefinition>();
            Constraints       = new Dictionary <string, ColumnDefinition>();
            Failures          = new Dictionary <string, Failure>();
            string          path      = new FileInfo(Assembly.GetAssembly(typeof(Engine)).Location).DirectoryName;
            ResourceManager resources = new ResourceManager("ObjectScriptingExtensions.Templates", Assembly.GetExecutingAssembly());

            CreateTableTemplate = resources.GetString("CreateTableTemplate");
            AlterTableTemplate  = resources.GetString("AlterTableTemplate");
            FailureTemplate     = resources.GetString("FailureTemplate");
            Mappings            = InitializeMappings();
        }
 public static string CreateSchema(this object source, GenerateProperties settings)
 {
     Engine.Instance.CreateSchema(source, settings);
     return(Engine.Instance.GenerateSchema());
 }
 internal void CreateSchema(object source, GenerateProperties settings)
 {
     Settings = settings;
     CreateSchema(source);
 }