示例#1
0
 public static IEnhancedServicePool <ICachingOrgService> GetCachingPool(ConnectionParams connectionParams, PoolParams poolParams,
                                                                        CachingParams cachingParams = null)
 {
     connectionParams.Require(nameof(connectionParams));
     poolParams.Require(nameof(poolParams));
     return(GetCachingPool(BuildBaseParams(null, null, poolParams, connectionParams,
                                           cachingParams ?? new CachingParams())));
 }
示例#2
0
        public ServiceFactory(ConnectionParams connectionParams, TimeSpan?tokenExpiryCheck)
        {
            connectionParams.Require(nameof(connectionParams));

            this.connectionParams = connectionParams;
            this.tokenExpiryCheck = tokenExpiryCheck;

            customServiceFactory = connectionParams?.CustomIOrgSvcFactory ?? customServiceFactory;

            ParamHelpers.SetPerformanceParams(connectionParams);
        }
        public static void SetPerformanceParams(ConnectionParams parameters)
        {
            parameters.Require(nameof(parameters));

            if (parameters.DotNetDefaultConnectionLimit.HasValue)
            {
                ServicePointManager.DefaultConnectionLimit = parameters.DotNetDefaultConnectionLimit.Value;
            }

            if (parameters.IsDotNetDisableWaitForConnectConfirm.HasValue)
            {
                ServicePointManager.Expect100Continue =
                    !parameters.IsDotNetDisableWaitForConnectConfirm.Value;
            }

            if (parameters.IsDotNetDisableNagleAlgorithm.HasValue)
            {
                ServicePointManager.UseNagleAlgorithm = !parameters.IsDotNetDisableNagleAlgorithm.Value;
            }
        }
示例#4
0
 public static IEnhancedServicePool <IEnhancedOrgService> GetPool(ConnectionParams connectionParams, PoolParams poolParams)
 {
     connectionParams.Require(nameof(connectionParams));
     poolParams.Require(nameof(poolParams));
     return(GetPool(BuildBaseParams(null, null, poolParams, connectionParams)));
 }