예제 #1
0
 public DataStaxEnterpriseSearch(IDseSession session, PreparedStatementCache statementCache,
                                 IFindServices serviceDiscovery, Func <Uri, IRestClient> createRestClient,
                                 SearchOptions options)
 {
     if (session == null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     if (statementCache == null)
     {
         throw new ArgumentNullException(nameof(statementCache));
     }
     if (serviceDiscovery == null)
     {
         throw new ArgumentNullException(nameof(serviceDiscovery));
     }
     if (createRestClient == null)
     {
         throw new ArgumentNullException(nameof(createRestClient));
     }
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     _session          = session;
     _statementCache   = statementCache;
     _serviceDiscovery = serviceDiscovery;
     _createRestClient = createRestClient;
     _options          = options;
     _dseSearchUri     = null;
 }
 public BootstrapDataStaxEnterprise(IFindServices serviceDiscovery)
 {
     if (serviceDiscovery == null)
     {
         throw new ArgumentNullException(nameof(serviceDiscovery));
     }
     _serviceDiscovery = serviceDiscovery;
 }
예제 #3
0
 public CassandraSessionFactory(IFindServices serviceDiscovery)
 {
     if (serviceDiscovery == null)
     {
         throw new ArgumentNullException(nameof(serviceDiscovery));
     }
     _serviceDiscovery = serviceDiscovery;
 }
        public ChannelFactory(IFindServices serviceDiscovery)
        {
            if (serviceDiscovery == null)
            {
                throw new ArgumentNullException(nameof(serviceDiscovery));
            }
            _serviceDiscovery = serviceDiscovery;

            _cache = new ConcurrentDictionary <string, Lazy <Channel> >();
        }
        /// <summary>
        /// Constructor with dependency injection
        /// </summary>
        public BootstrapDataStaxEnterprise(IFindServices serviceDiscovery, IConfiguration killrVideoConfiguration)
        {
            if (serviceDiscovery == null)
            {
                throw new ArgumentNullException(nameof(serviceDiscovery));
            }
            _serviceDiscovery = serviceDiscovery;

            if (killrVideoConfiguration == null)
            {
                throw new ArgumentNullException(nameof(killrVideoConfiguration));
            }
            _kvConfig = killrVideoConfiguration;
        }