예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DeepCloneAppCache"/> class.
        /// </summary>
        public DeepCloneAppCache(IAppPolicyCache innerCache)
        {
            var type = typeof(DeepCloneAppCache);

            if (innerCache.GetType() == type)
            {
                throw new InvalidOperationException($"A {type} cannot wrap another instance of itself.");
            }

            InnerCache = innerCache;
        }