internal ImmutableClientRuntime(ClientRuntime behavior) { _channelInitializers = EmptyArray <IChannelInitializer> .ToArray(behavior.ChannelInitializers); _interactiveChannelInitializers = EmptyArray <IInteractiveChannelInitializer> .ToArray(behavior.InteractiveChannelInitializers); _messageInspectors = EmptyArray <IClientMessageInspector> .ToArray(behavior.MessageInspectors); _operationSelector = behavior.OperationSelector; _useSynchronizationContext = behavior.UseSynchronizationContext; _validateMustUnderstand = behavior.ValidateMustUnderstand; _unhandled = new ProxyOperationRuntime(behavior.UnhandledClientOperation, this); _addTransactionFlowProperties = behavior.AddTransactionFlowProperties; _operations = new Dictionary <string, ProxyOperationRuntime>(); for (int i = 0; i < behavior.Operations.Count; i++) { ClientOperation operation = behavior.Operations[i]; ProxyOperationRuntime operationRuntime = new ProxyOperationRuntime(operation, this); _operations.Add(operation.Name, operationRuntime); } _correlationCount = _messageInspectors.Length + behavior.MaxParameterInspectors; }
internal ImmutableClientRuntime(ClientRuntime behavior) { _channelInitializers = EmptyArray<IChannelInitializer>.ToArray(behavior.ChannelInitializers); _interactiveChannelInitializers = EmptyArray<IInteractiveChannelInitializer>.ToArray(behavior.InteractiveChannelInitializers); _messageInspectors = EmptyArray<IClientMessageInspector>.ToArray(behavior.MessageInspectors); _operationSelector = behavior.OperationSelector; _useSynchronizationContext = behavior.UseSynchronizationContext; _validateMustUnderstand = behavior.ValidateMustUnderstand; _unhandled = new ProxyOperationRuntime(behavior.UnhandledClientOperation, this); _addTransactionFlowProperties = behavior.AddTransactionFlowProperties; _operations = new Dictionary<string, ProxyOperationRuntime>(); for (int i = 0; i < behavior.Operations.Count; i++) { ClientOperation operation = behavior.Operations[i]; ProxyOperationRuntime operationRuntime = new ProxyOperationRuntime(operation, this); _operations.Add(operation.Name, operationRuntime); } _correlationCount = _messageInspectors.Length + behavior.MaxParameterInspectors; }
public ClientOperationSelector(IClientOperationSelector wrapped) { this.wrapped = wrapped; }