예제 #1
0
        /// <summary>
        /// Create a new instance with given attributes
        /// </summary>
        /// <param name="dataFactory"></param>
        public MacroManager(DataFactory dataFactory)
        {
            this.df = dataFactory;
            this.connectionString = this.df.ConnectionStringManager.ConnectionString;

            macroLib = new MacroLibrary(dataFactory);

            switch (this.df.Provider)
            {
            case DatabaseProvider.SqlClient:
                queryGenerator = new SqlClient.MacroManager();
                break;

            case DatabaseProvider.OracleClient:
                queryGenerator = new OracleClient.MacroManager();
                break;

            case DatabaseProvider.OleDb:
                queryGenerator = new OleDbClient.MacroManager();
                break;

            case DatabaseProvider.SQLite:
                queryGenerator = new SQLiteClient.MacroManager();
                break;

            default:
                throw new ArgumentOutOfRangeException("providerType=" + this.df.Provider);
            }
        }
예제 #2
0
파일: MmRun.cs 프로젝트: nerai/Nibbler
 public MmRun(
     TmDefinition def,
     PackedExponentTape tape,
     MacroLibrary ml,
     State initialState = null,
     History <PackedExponentTape> history = null)
     : base(def, tape, initialState, history)
 {
     ML = ml;
 }