Ejemplo n.º 1
0
        public QueryProcessor(IHandlerConfiguration handlerConfiguration, IPolicyRegistry policyRegistry, IRequestContextFactory requestContextFactory)
        {
            if (handlerConfiguration == null)
            {
                throw new ArgumentNullException(nameof(handlerConfiguration));
            }
            if (policyRegistry == null)
            {
                throw new ArgumentNullException(nameof(policyRegistry));
            }
            if (requestContextFactory == null)
            {
                throw new ArgumentNullException(nameof(requestContextFactory));
            }

            if (handlerConfiguration.HandlerRegistry == null)
            {
                throw new ArgumentException($"{nameof(handlerConfiguration.HandlerRegistry)} must not be null", nameof(handlerConfiguration));
            }
            if (handlerConfiguration.HandlerFactory == null)
            {
                throw new ArgumentException($"{nameof(handlerConfiguration.HandlerFactory)} must not be null", nameof(handlerConfiguration));
            }
            if (handlerConfiguration.DecoratorFactory == null)
            {
                throw new ArgumentException($"{nameof(handlerConfiguration.DecoratorFactory)} must not be null", nameof(handlerConfiguration));
            }

            _handlerRegistry       = handlerConfiguration.HandlerRegistry;
            _handlerFactory        = handlerConfiguration.HandlerFactory;
            _decoratorFactory      = handlerConfiguration.DecoratorFactory;
            _policyRegistry        = policyRegistry;
            _requestContextFactory = requestContextFactory;
        }
Ejemplo n.º 2
0
        public IBuildTheQueryProcessor RequestContextFactory(IRequestContextFactory requestContextFactory)
        {
            if (requestContextFactory == null)
            {
                throw new ArgumentNullException(nameof(requestContextFactory));
            }

            _requestContextFactory = requestContextFactory;
            return(this);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataPackageServiceStub"/> class.
 /// </summary>
 /// <param name="sessionManager">The session manager.</param>
 /// <param name="notificationSender">The notification sender.</param>
 /// <param name="t2gManager">The T2G manager.</param>
 /// <param name="requestsFactory">The requests factory.</param>
 /// <param name="remoteDataStoreFactory">The remote data store factory.</param>
 /// <param name="requestManager">The request manager.</param>
 /// <param name="baselineStatusUpdater">The baseline status updater.</param>
 public DataPackageServiceStub(ISessionManager sessionManager,
                               INotificationSender notificationSender,
                               IT2GManager t2gManager,
                               IRequestContextFactory requestsFactory,
                               IRemoteDataStoreFactory remoteDataStoreFactory,
                               IRequestManager requestManager,
                               BaselineStatusUpdater baselineStatusUpdater) :
     base(sessionManager, notificationSender, t2gManager, requestsFactory, remoteDataStoreFactory, requestManager, baselineStatusUpdater)
 {
     // No logic body.
 }
        public HttpServiceCallAsyncCallInterceptor(IRequestContextFactory requestContextFactory, IHttpServiceProxy proxyClient, ISerializationStrategyFactory serializerFactory, IDeserializationStrategyFactory deserializerFactory)
        {
            if (requestContextFactory == null)
            {
                throw new ArgumentNullException(nameof(requestContextFactory));
            }
            if (proxyClient == null)
            {
                throw new ArgumentNullException(nameof(proxyClient));
            }
            if (serializerFactory == null)
            {
                throw new ArgumentNullException(nameof(serializerFactory));
            }
            if (deserializerFactory == null)
            {
                throw new ArgumentNullException(nameof(deserializerFactory));
            }

            RequestContextFactory = requestContextFactory;
            ProxyClient           = proxyClient;
            SerializerFactory     = serializerFactory;
            DeserializerFactory   = deserializerFactory;
        }
Ejemplo n.º 5
0
 public IBuildTheQueryProcessor InMemoryRequestContextFactory()
 {
     _requestContextFactory = new InMemoryRequestContextFactory();
     return(this);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates new instance of <see cref="Server"/>
 /// </summary>
 /// <param name="config">Configuration</param>
 /// <param name="logger">Logger</param>
 /// <param name="factory">Request factory</param>
 /// <exception cref="ArgumentNullException">When <paramref name="config"/>, <paramref name="factory"/> or <paramref name="logger"/> is null</exception>
 public Server(IOptions <ServerConfiguration> config, ILogger <Server> logger, IRequestContextFactory factory)
 {
     _config  = config ?? throw new ArgumentNullException(nameof(config));
     _logger  = logger ?? throw new ArgumentNullException(nameof(logger));
     _factory = factory ?? throw new ArgumentNullException(nameof(factory));
 }
Ejemplo n.º 7
0
 public RemoteEngineClient(IRequestContextFactory requestContext, string host, int port)
 {
     Host = host;
     Port = port;
     _requestContextFactory = requestContext;
 }