Exemple #1
0
 public SqlQueryExecutor(IJsonCollectionFactory json_collection_factory,
                         ICache <IConnectionProvider> cache)
     : base(json_collection_factory)
 {
     cache_  = cache;
     logger_ = RestQLLogger.ForCurrentProcess;
 }
    /// <summary>
    /// Initializes a new instance of the <see cref="IConnectionProvider"/>
    /// using the specified <see cref="IConnectionProvider"/> connection
    /// provider.
    /// </summary>
    /// <param name="sql_connection_provider">
    /// A <see cref="IConnectionProvider"/> that is used to create connections
    /// and query a SQL server.
    /// </param>
    public SqlQueryDataProvider(SqlConnectionProvider sql_connection_provider) {
#if DEBUG
      if (sql_connection_provider == null)
        throw new ArgumentException("connection_provider");
#endif
      sql_connection_provider_ = sql_connection_provider;
      logger_ = RestQLLogger.ForCurrentProcess;
    }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractSqlQueryExecutor"/> class
 /// using the specified collection of providers.
 /// </summary>
 /// <param name="json_collection_factory">
 /// A <see cref="IJsonCollectionFactory"/> object that can be used to
 /// create instances of the <see cref="IJsonCollection"/> class.
 /// </param>
 protected AbstractSqlQueryExecutor(
   IJsonCollectionFactory json_collection_factory) {
   if (json_collection_factory == null) {
     throw new ArgumentNullException("json_collection_factory");
   }
   json_collection_factory_ = json_collection_factory;
   logger_ = RestQLLogger.ForCurrentProcess;
 }
Exemple #4
0
    public Service(IQueryServer server) {
      server_ = server;
      start_stop_service_event_ = new ManualResetEvent(false);
      logger_ = RestQLLogger.ForCurrentProcess;

      // Initialize metricss.
      requests_timer_ = AppMetrics.GetTimer(GetType(), "requests",
        TimeUnit.Miliseconds);
    }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractSqlQueryExecutor"/> class
 /// using the specified collection of providers.
 /// </summary>
 /// <param name="json_collection_factory">
 /// A <see cref="IJsonCollectionFactory"/> object that can be used to
 /// create instances of the <see cref="IJsonCollection"/> class.
 /// </param>
 protected AbstractSqlQueryExecutor(
     IJsonCollectionFactory json_collection_factory)
 {
     if (json_collection_factory == null)
     {
         throw new ArgumentNullException("json_collection_factory");
     }
     json_collection_factory_ = json_collection_factory;
     logger_ = RestQLLogger.ForCurrentProcess;
 }
Exemple #6
0
        public Service(IQueryServer server)
        {
            server_ = server;
            start_stop_service_event_ = new ManualResetEvent(false);
            logger_ = RestQLLogger.ForCurrentProcess;

            // Initialize metricss.
            requests_timer_ = AppMetrics.GetTimer(GetType(), "requests",
                                                  TimeUnit.Miliseconds);
        }
Exemple #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IConnectionProvider"/>
        /// using the specified <see cref="IConnectionProvider"/> connection
        /// provider.
        /// </summary>
        /// <param name="sql_connection_provider">
        /// A <see cref="IConnectionProvider"/> that is used to create connections
        /// and query a SQL server.
        /// </param>
        public SqlQueryDataProvider(SqlConnectionProvider sql_connection_provider)
        {
#if DEBUG
            if (sql_connection_provider == null)
            {
                throw new ArgumentException("connection_provider");
            }
#endif
            sql_connection_provider_ = sql_connection_provider;
            logger_ = RestQLLogger.ForCurrentProcess;
        }
Exemple #8
0
 static RestQLLogger()
 {
     current_process_logger_ = new RestQLLogger(new NOPLogger());
 }
Exemple #9
0
 static RestQLLogger() {
   current_process_logger_ = new RestQLLogger(new NOPLogger());
 }
 public SqlQueryExecutor(IJsonCollectionFactory json_collection_factory,
   ICache<IConnectionProvider> cache)
   : base(json_collection_factory) {
   cache_ = cache;
   logger_ = RestQLLogger.ForCurrentProcess;
 }