Esempio n. 1
0
        internal ClientRuntime(DispatchRuntime dispatchRuntime, SharedRuntimeState shared)
            : this(dispatchRuntime.EndpointDispatcher.ContractName,
                   dispatchRuntime.EndpointDispatcher.ContractNamespace,
                   shared)
        {
            DispatchRuntime = dispatchRuntime ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(dispatchRuntime));
            _shared         = shared;

            Fx.Assert(shared.IsOnServer, "Server constructor called on client?");
        }
Esempio n. 2
0
        internal DispatchRuntime(ClientRuntime proxyRuntime, SharedRuntimeState shared)
            : this(shared)
        {
            this.proxyRuntime       = proxyRuntime ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(proxyRuntime));
            instanceProvider        = new CallbackInstanceProvider();
            channelDispatcher       = new ChannelDispatcher(shared);
            instanceContextProvider = InstanceContextProviderBase.GetProviderForMode(InstanceContextMode.PerSession, this);

            Fx.Assert(!shared.IsOnServer, "Client constructor called on server?");
        }
Esempio n. 3
0
 void Initialize(SharedRuntimeState shared)
 {
     this.shared         = shared;
     endpointDispatchers = new EndpointDispatcherCollection(this);
     ChannelInitializers = NewBehaviorCollection <IChannelInitializer>();
     channels            = new CommunicationObjectManager <IChannel>(ThisLock);
     ErrorHandlers       = new Collection <IErrorHandler>();
     //this.isTransactedReceive = false;
     //this.asynchronousTransactedAcceptEnabled = false;
     receiveSynchronously = false;
     sendAsynchronously   = true;
     //this.serviceThrottle = null;
     //transactionTimeout = TimeSpan.Zero;
     maxPendingReceives = MultipleReceiveBinder.MultipleReceiveDefaults.MaxPendingReceives;
 }
Esempio n. 4
0
 private void Initialize(SharedRuntimeState shared)
 {
     _shared = shared;
     _endpointDispatchers = new EndpointDispatcherCollection(this);
     ChannelInitializers  = NewBehaviorCollection <IChannelInitializer>();
     Channels             = new CommunicationObjectManager <IChannel>(ThisLock);
     PendingChannels      = new SynchronizedChannelCollection <IChannel>(ThisLock);
     ErrorHandlers        = new Collection <IErrorHandler>();
     //this.isTransactedReceive = false;
     //this.asynchronousTransactedAcceptEnabled = false;
     _receiveSynchronously = false;
     _sendAsynchronously   = true;
     //this.serviceThrottle = null;
     //transactionTimeout = TimeSpan.Zero;
     _maxPendingReceives = 1;
 }
Esempio n. 5
0
        ClientRuntime(string contractName, string contractNamespace, SharedRuntimeState shared)
        {
            this.contractName      = contractName;
            this.contractNamespace = contractNamespace;
            this.shared            = shared;

            OperationCollection operations = new OperationCollection(this);

            this.operations     = operations;
            channelInitializers = new ProxyBehaviorCollection <IChannelInitializer>(this);
            messageInspectors   = new ProxyBehaviorCollection <IClientMessageInspector>(this);

            unhandled = new ClientOperation(this, "*", MessageHeaders.WildcardAction, MessageHeaders.WildcardAction);
            unhandled.InternalFormatter = new MessageOperationFormatter();
            maxFaultSize = TransportDefaults.MaxFaultSize;
        }
Esempio n. 6
0
        DispatchRuntime(SharedRuntimeState shared)
        {
            this.shared = shared;

            operations = new OperationCollection(this);

            inputSessionShutdownHandlers  = NewBehaviorCollection <IInputSessionShutdown>();
            MessageInspectors             = NewBehaviorCollection <IDispatchMessageInspector>();
            instanceContextInitializers   = NewBehaviorCollection <IInstanceContextInitializer>();
            synchronizationContext        = ThreadBehavior.GetCurrentSynchronizationContext();
            automaticInputSessionShutdown = true;
            principalPermissionMode       = ServiceAuthorizationBehavior.DefaultPrincipalPermissionMode;
            unhandled = new DispatchOperation(this, "*", MessageHeaders.WildcardAction, MessageHeaders.WildcardAction);
            unhandled.InternalFormatter = MessageOperationFormatter.Instance;
            unhandled.InternalInvoker   = new UnhandledActionInvoker(this);
        }
Esempio n. 7
0
 internal ChannelDispatcher(SharedRuntimeState shared)
 {
     Initialize(shared);
 }