Example #1
0
 /// <summary>
 /// Инициализация IoC контейнера для оракла
 /// </summary>
 /// <param name="x">Инициализатор</param>
 /// <param name="connectionString">Строка подключения</param>
 private static void InitializeStructureMapForOracleFile(IInitializationExpression x, string connectionString)
 {
     var connection = new FileConnection(connectionString);
     var strategy = new OracleStrategy(connection);
     x.ForSingletonOf<IDbConnection>().Use(connection);
     x.ForSingletonOf<IDatabaseStrategy>().Use(strategy);
     x.ForSingletonOf<ISysDatabaseStrategy>().Use(new FileSysStrategy(new OracleSysStrategy(connection, strategy), connection));
 }
Example #2
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connection">Соединение</param>
 public FileCommand(FileConnection connection)
 {
     Connection = connection;
     parameters = new FileDataParameterCollection();
 }
Example #3
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="sysStrategyImpl">Стратегия</param>
 /// <param name="fileConnection">Соединение</param>
 public FileSysStrategy(ISysDatabaseStrategy sysStrategyImpl, FileConnection fileConnection)
 {
     this.sysStrategyImpl = sysStrategyImpl;
     this.fileConnection = fileConnection;
 }
Example #4
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="sysStrategyImpl">Стратегия</param>
 /// <param name="fileConnection">Соединение</param>
 public FileSysStrategy(ISysDatabaseStrategy sysStrategyImpl, FileConnection fileConnection)
 {
     this.sysStrategyImpl = sysStrategyImpl;
     this.fileConnection  = fileConnection;
 }
Example #5
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connection">Соединение</param>
 public FileCommand(FileConnection connection)
 {
     Connection = connection;
     parameters = new FileDataParameterCollection();
 }