public OutcomingInvocationFactory(
     [NotNull] ITransportConnection connection,
     [NotNull] IProtocolImplementation protocol,
     [NotNull] IMarshallerProvider marshaller)
 {
     _connection = connection ?? throw new ArgumentNullException(nameof(connection));
     _protocol   = protocol ?? throw new ArgumentNullException(nameof(protocol));
     _marshaller = marshaller ?? throw new ArgumentNullException(nameof(marshaller));
 }
Beispiel #2
0
 internal ClientOptions(
     string applicationId,
     UniqueId applicationInstanceId,
     ITransportClient transport,
     IProtocolImplementation protocol,
     IMarshallerProvider marshaller,
     IEnumerable <ProvidedServiceDefinition> services)
 {
     ApplicationId         = applicationId;
     ApplicationInstanceId = applicationInstanceId;
     Transport             = transport;
     Marshaller            = marshaller;
     Protocol           = protocol;
     Services           = new List <ProvidedServiceDefinition>(services);
     ServicesDictionary = Services.ToDictionary(x => (x.Id, x.Alias), x => x);
 }
Beispiel #3
0
        public IClient Create(
            string appId,
            ITransportClient transport,
            IProtocolImplementation protocol,
            IMarshallerProvider marshaller,
            Func <ClientOptionsBuilder, ClientOptionsBuilder> setup = default)
        {
            var builder = new ClientOptionsBuilder()
                          .WithApplicationId(appId)
                          .WithMarshaller(marshaller)
                          .WithProtocol(protocol)
                          .WithTransport(transport);

            if (setup != default)
            {
                builder = setup(builder);
            }
            return(new Client(builder.Build()));
        }
Beispiel #4
0
 public IncomingInvocationFactory(IProtocolImplementation protocol, IMarshallerProvider marshaller)
 {
     _protocol   = protocol;
     _marshaller = marshaller;
 }