public CorrelatingServiceProxyFactory( Func <IServiceRemotingCallbackClient, IServiceRemotingClientFactory> createServiceRemotingClientFactory = null, OperationRetrySettings retrySettings = null) { _methodNameProvider = new MethodNameProvider(true); _serviceProxyFactory = new ServiceProxyFactory( callbackClient => { IServiceRemotingClientFactory innerClientFactory = createServiceRemotingClientFactory(callbackClient); return(new CorrelatingServiceRemotingClientFactory(innerClientFactory, _methodNameProvider)); }, retrySettings); }
/// <summary> /// Instantiates the <see cref="CorrelatingActorProxyFactory"/> with the specified remoting factory and retrysettings. /// </summary> /// <param name="createActorRemotingClientFactory"> /// Specifies the factory method that creates the remoting client factory. The remoting client factory got from this method /// is cached in the ActorProxyFactory. /// </param> /// <param name="retrySettings">Specifies the retry policy to use on exceptions seen when using the proxies created by this factory</param> public CorrelatingActorProxyFactory(Func <IServiceRemotingCallbackClient, IServiceRemotingClientFactory> createActorRemotingClientFactory = null, OperationRetrySettings retrySettings = null) { this.methodNameProvider = new MethodNameProvider(true /* threadSafe */); // Layer the factory structure so the hierarchy will look like this: // CorrelatingServiceProxyFactory // --> ServiceProxyFactory // --> CorrelatingServiceRemotingFactory // --> <Factory created by createActorRemotingClientFactory> this.actorProxyFactory = new ActorProxyFactory( callbackClient => { IServiceRemotingClientFactory innerClientFactory = createActorRemotingClientFactory(callbackClient); return(new CorrelatingServiceRemotingClientFactory(innerClientFactory, this.methodNameProvider)); }, retrySettings); }
private void InitializeCommonFields() { //this.telemetryClient = new TelemetryClient(); _baggageSerializer = new Lazy <DataContractSerializer>(() => new DataContractSerializer(typeof(IEnumerable <KeyValuePair <string, string> >))); _methodNameProvider = new MethodNameProvider(false /* threadSafe */); }