Пример #1
0
		internal DataAccessContext(string databaseFilename)
		{
			// initialize a connection and transaction
			_databaseFilename = databaseFilename;
			_connection = CreateConnection();
			_transaction = _connection.BeginTransaction(IsolationLevel.ReadCommitted);
			_context = new ConfigurationDataContext(_connection);
			//_context.Log = Console.Out;

			lock (_syncLock)
			{
				if (_staticConnection == null)
				{
					// This is done for performance reasons.  It forces a connection to remain open while the 
					// the app domain is running, so that the database is kept in memory.
					try
					{
						_staticConnection = CreateConnection();
					}
					catch (Exception ex)
					{
						Platform.Log(LogLevel.Debug, ex, "Failed to initialize static connection to configuration database");
					}
				}
			}
		}
Пример #2
0
        internal DataAccessContext(string databaseFilename)
        {
            // initialize a connection and transaction
            _databaseFilename = databaseFilename;
            _connection       = CreateConnection();
            _transaction      = _connection.BeginTransaction(IsolationLevel.ReadCommitted);
            _context          = new ConfigurationDataContext(_connection);
            //_context.Log = Console.Out;

            lock (_syncLock)
            {
                if (_staticConnection == null)
                {
                    // This is done for performance reasons.  It forces a connection to remain open while the
                    // the app domain is running, so that the database is kept in memory.
                    try
                    {
                        _staticConnection = CreateConnection();
                    }
                    catch (Exception ex)
                    {
                        Platform.Log(LogLevel.Debug, ex, "Failed to initialize static connection to configuration database");
                    }
                }
            }
        }
Пример #3
0
 internal DataAccessContext(string databaseFilename)
 {
     // initialize a connection and transaction
     _databaseFilename = databaseFilename;
     _connection       = CreateConnection();
     _transaction      = _connection.BeginTransaction(IsolationLevel.ReadCommitted);
     _context          = new ConfigurationDataContext(_connection);
     //_context.Log = Console.Out;
 }
Пример #4
0
		internal DataAccessContext(string databaseFilename)
		{
			// initialize a connection and transaction
			_databaseFilename = databaseFilename;
			_connection = CreateConnection();
			_transaction = _connection.BeginTransaction(IsolationLevel.ReadCommitted);
            _context = new ConfigurationDataContext(_connection);
			//_context.Log = Console.Out;
		}
Пример #5
0
 protected Broker(ConfigurationDataContext context)
 {
     Context = context;
 }
Пример #6
0
 internal ConfigurationDocumentBroker(ConfigurationDataContext context)
     : base(context)
 {
 }
 internal ConfigurationDocumentBroker(ConfigurationDataContext context)
     : base(context)
 {
 }