Exemple #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));
 }
Exemple #2
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connection">Соединение</param>
 public FileCommand(FileConnection connection)
 {
     Connection = connection;
     parameters = new FileDataParameterCollection();
 }
Exemple #3
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="sysStrategyImpl">Стратегия</param>
 /// <param name="fileConnection">Соединение</param>
 public FileSysStrategy(ISysDatabaseStrategy sysStrategyImpl, FileConnection fileConnection)
 {
     this.sysStrategyImpl = sysStrategyImpl;
     this.fileConnection = fileConnection;
 }
Exemple #4
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="sysStrategyImpl">Стратегия</param>
 /// <param name="fileConnection">Соединение</param>
 public FileSysStrategy(ISysDatabaseStrategy sysStrategyImpl, FileConnection fileConnection)
 {
     this.sysStrategyImpl = sysStrategyImpl;
     this.fileConnection  = fileConnection;
 }
Exemple #5
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connection">Соединение</param>
 public FileCommand(FileConnection connection)
 {
     Connection = connection;
     parameters = new FileDataParameterCollection();
 }