コード例 #1
0
 internal RedisSessionStateStoreOptions(RedisSessionStateStoreOptions other)
 {
     KeySeparator = other.KeySeparator ?? defaultKeySeparator;
     DistributedLockAcquisitionTimeoutSeconds = other.DistributedLockAcquisitionTimeoutSeconds ?? defaultDistributedLockAcquisitionTimeoutSeconds;
     DistributedLockTimeoutSeconds            = other.DistributedLockTimeoutSeconds ?? defaultDistributedLockTimeoutSeconds;
     OnDistributedLockNotAcquired             = other.OnDistributedLockNotAcquired ?? defaultOnDistributedLockNotAcquired;
 }
コード例 #2
0
        public static void SetOptions(RedisSessionStateStoreOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            if (RedisSessionStateStoreProvider.options != null)
            {
                throw new InvalidOperationException("The options have already been configured.");
            }

            // Clone so that we don't allow references to be modified once
            // configured.
            RedisSessionStateStoreProvider.options = new RedisSessionStateStoreOptions(options);
        }
コード例 #3
0
 internal static void ResetOptions()
 {
     options = null;
 }