protected AsyncServerClientBase(string serverUrl, TConvention convention, OperationCredentials credentials, HttpJsonRequestFactory jsonRequestFactory, Guid?sessionId, NameValueCollection operationsHeaders) { WasDisposed = false; ServerUrl = serverUrl.TrimEnd('/'); Conventions = convention; CredentialsThatShouldBeUsedOnlyInOperationsWithoutReplication = credentials; RequestFactory = jsonRequestFactory; SessionId = sessionId; OperationsHeaders = operationsHeaders ?? new NameValueCollection(); replicationInformer = new Lazy <TReplicationInformer>(GetReplicationInformer, true); readStrippingBase = new Lazy <int>(() => ReplicationInformer.GetReadStripingBase(true), true); MaxQuerySizeForGetRequest = 8 * 1024; }
protected AsyncServerClientBase(string serverUrl, TConvention convention, OperationCredentials credentials, HttpJsonRequestFactory jsonRequestFactory, Guid?sessionId, NameValueCollection operationsHeaders, Func <string, TReplicationInformer> replicationInformerGetter, string resourceName) { WasDisposed = false; ServerUrl = serverUrl.TrimEnd('/'); Conventions = convention ?? new TConvention(); CredentialsThatShouldBeUsedOnlyInOperationsWithoutReplication = credentials; RequestFactory = jsonRequestFactory ?? new HttpJsonRequestFactory(DefaultNumberOfCachedRequests); SessionId = sessionId; OperationsHeaders = operationsHeaders ?? DefaultNameValueCollection; ReplicationInformerGetter = replicationInformerGetter ?? DefaultReplicationInformerGetter(); replicationInformer = new Lazy <TReplicationInformer>(() => ReplicationInformerGetter(resourceName), true); readStrippingBase = new Lazy <int>(() => ReplicationInformer.GetReadStripingBase(true), true); MaxQuerySizeForGetRequest = 8 * 1024; }