コード例 #1
0
        private static void Initialize(string cacheServiceAddress, int maxCacheSize, int rollingExpiringWindowInMinutes)
        {
            cache = new bUtility.TokenCache.Implementation.DistributedSessionSecurityTokenCache(
                () => new PersistentLib.SqlServerFactory(cacheServiceAddress),
                () => bUtility.TokenCache.Extensions.GetSerializationSettings(),
                () => rollingExpiringWindowInMinutes);

            _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize);
        }
コード例 #2
0
        private static void Initialize(string cacheServiceAddress, int maxCacheSize, string applicationId, int servicePointConnectionLimit, int httpClientTimeoutMsecs)
        {
            _apiBaseUrl    = cacheServiceAddress;
            _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize);
            ApplicationId  = applicationId;

            _httpClient = HttpClientHelperAsync.CreateHttpClient(cacheServiceAddress, servicePointConnectionLimit, httpClientTimeoutMsecs);
            _httpClient.DefaultRequestHeaders.Clear();
            _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        }
コード例 #3
0
 private static void Initialize(string cacheServiceAddress, int maxCacheSize, string applicationId)
 {
     _apiBaseUrl    = cacheServiceAddress;
     _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize);
     ApplicationId  = applicationId;
 }