Пример #1
0
 public CacheAttribute(Type elementType, CacheAttrition cacheAttrition)
 {
     Scope           = Strings.DeclaringInstance;
     SizeLimit       = Strings.Unbounded;
     Timeout         = Strings.Infinite;
     _elementType    = elementType ?? throw Fx.Exception.ArgumentNull(nameof(elementType));
     _cacheAttrition = cacheAttrition;
 }
Пример #2
0
                public CacheAttribute(Type elementType, CacheAttrition cacheAttrition)
                {
                    Scope     = Strings.DeclaringInstance;
                    SizeLimit = Strings.Unbounded;
                    Timeout   = Strings.Infinite;

                    if (elementType == null)
                    {
                        throw Fx.Exception.ArgumentNull("elementType");
                    }

                    this.elementType    = elementType;
                    this.cacheAttrition = cacheAttrition;
                }