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?"); }
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?"); }
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; }
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; }
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; }
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); }
internal ChannelDispatcher(SharedRuntimeState shared) { Initialize(shared); }