public DeepCloneRuntimeCacheProvider(IRuntimeCacheProvider innerProvider) { if (innerProvider.GetType() == typeof(DeepCloneRuntimeCacheProvider)) { throw new InvalidOperationException("A " + typeof(DeepCloneRuntimeCacheProvider) + " cannot wrap another instance of " + typeof(DeepCloneRuntimeCacheProvider)); } InnerProvider = innerProvider; }
public DeepCloneRuntimeCacheProvider(IRuntimeCacheProvider innerProvider) { var type = typeof(DeepCloneRuntimeCacheProvider); if (innerProvider.GetType() == type) { throw new InvalidOperationException($"A {type} cannot wrap another instance of {type}."); } InnerProvider = innerProvider; }