Exemplo n.º 1
0
        public HostedClient(
            IRuntimeClient runtimeClient,
            ClientObserverRegistrar clientObserverRegistrar,
            ILocalSiloDetails siloDetails,
            ILogger <HostedClient> logger,
            IGrainReferenceRuntime grainReferenceRuntime,
            IInternalGrainFactory grainFactory,
            InvokableObjectManager invokableObjectManager,
            MessageCenter messageCenter,
            MessagingTrace messagingTrace)
        {
            this.incomingMessages = Channel.CreateUnbounded <Message>(new UnboundedChannelOptions
            {
                SingleReader = true,
                SingleWriter = false,
                AllowSynchronousContinuations = false,
            });

            this.runtimeClient           = runtimeClient;
            this.clientObserverRegistrar = clientObserverRegistrar;
            this.grainReferenceRuntime   = grainReferenceRuntime;
            this.grainFactory            = grainFactory;
            this.invokableObjects        = invokableObjectManager;
            this.siloMessageCenter       = messageCenter;
            this.messagingTrace          = messagingTrace;
            this.logger = logger;

            this.ClientAddress = ActivationAddress.NewActivationAddress(siloDetails.SiloAddress, LegacyGrainId.NewClientId());
        }