//
 // remove inheritance for <result inherit="false" />
 //
 internal void ClearParent()
 {
     _rule       = null;
     _cachetime  = TimeSpan.FromSeconds(60); // one minute default expiry
     _variables  = new Hashtable();
     _resultType = typeof(HttpCapabilitiesBase);
 }
Exemple #2
0
 internal void ClearParent()
 {
     this._rule       = null;
     this._cachetime  = TimeSpan.FromSeconds(60.0);
     this._variables  = new Hashtable();
     this._resultType = typeof(HttpCapabilitiesBase);
 }
        //
        // internal constructor; inherit from parent
        //
        public HttpCapabilitiesDefaultProvider(HttpCapabilitiesDefaultProvider parent)
        {
            int id = Interlocked.Increment(ref _idCounter);

            // don't do id.ToString() on every request, do it here
            _cacheKeyPrefix = CacheInternal.PrefixHttpCapabilities + id.ToString(CultureInfo.InvariantCulture);

            if (parent == null)
            {
                ClearParent();
            }
            else
            {
                _rule = parent._rule;

                if (parent._variables == null)
                {
                    _variables = null;
                }
                else
                {
                    _variables = new Hashtable(parent._variables);
                }

                _cachetime  = parent._cachetime;
                _resultType = parent._resultType;
            }
            //
            AddDependency(String.Empty);
        }
        //
        // internal constructor; inherit from parent
        //
        internal HttpCapabilitiesEvaluator(HttpCapabilitiesEvaluator parent)
        {
            int id = Interlocked.Increment(ref _idCounter);

            // don't do id.ToString() on every request, do it here
            _cacheKeyPrefix = _capabilitieskey + id.ToString() + "\n";

            if (parent == null)
            {
                ClearParent();
            }
            else
            {
                _rule = parent._rule;

                if (parent._variables == null)
                {
                    _variables = null;
                }
                else
                {
                    _variables = new Hashtable(parent._variables);
                }

                _cachetime  = parent._cachetime;
                _resultType = parent._resultType;
                _useCache   = parent._useCache;
            }
        }
 //
 // remove inheritance for <result inherit="false" />
 //
 internal virtual void ClearParent()
 {
     _rule       = null;
     _cachetime  = 60000; // one minute default expiry
     _variables  = new Hashtable();
     _resultType = typeof(HttpCapabilitiesBase);
     _useCache   = true;
 }
 public virtual void AddRuleList(ArrayList ruleList)
 {
     if (ruleList.Count != 0)
     {
         if (this._rule != null)
         {
             ruleList.Insert(0, this._rule);
         }
         this._rule = new CapabilitiesSection(2, null, null, ruleList);
     }
 }
Exemple #7
0
 public virtual void AddRuleList(ArrayList ruleList)
 {
     if (ruleList.Count != 0)
     {
         if (this._rule != null)
         {
             ruleList.Insert(0, this._rule);
         }
         this._rule = new CapabilitiesSection(2, null, null, ruleList);
     }
 }
        //
        // sets the set of rules
        //
        public virtual void AddRuleList(ArrayList ruleList)
        {
            if (ruleList.Count == 0)
            {
                return;
            }

            if (_rule != null)
            {
                ruleList.Insert(0, _rule);
            }

            _rule = new CapabilitiesSection(CapabilitiesRule.Filter, null, null, ruleList);
        }
 public HttpCapabilitiesDefaultProvider(HttpCapabilitiesDefaultProvider parent)
 {
     this._cacheKeyPrefix = "e" + Interlocked.Increment(ref _idCounter).ToString(CultureInfo.InvariantCulture);
     if (parent == null)
     {
         this.ClearParent();
     }
     else
     {
         this._rule = parent._rule;
         if (parent._variables == null)
         {
             this._variables = null;
         }
         else
         {
             this._variables = new Hashtable(parent._variables);
         }
         this._cachetime = parent._cachetime;
         this._resultType = parent._resultType;
     }
     this.AddDependency(string.Empty);
 }
Exemple #10
0
 public HttpCapabilitiesDefaultProvider(HttpCapabilitiesDefaultProvider parent)
 {
     this._cacheKeyPrefix = "e" + Interlocked.Increment(ref _idCounter).ToString(CultureInfo.InvariantCulture);
     if (parent == null)
     {
         this.ClearParent();
     }
     else
     {
         this._rule = parent._rule;
         if (parent._variables == null)
         {
             this._variables = null;
         }
         else
         {
             this._variables = new Hashtable(parent._variables);
         }
         this._cachetime  = parent._cachetime;
         this._resultType = parent._resultType;
     }
     this.AddDependency(string.Empty);
 }
        //
        // sets the set of rules
        //
        public virtual void AddRuleList(ArrayList ruleList) {
            if (ruleList.Count == 0)
                return;

            if (_rule != null)
                ruleList.Insert(0, _rule);

            _rule = new CapabilitiesSection(CapabilitiesRule.Filter, null, null, ruleList);
        }
 //
 // remove inheritance for <result inherit="false" />
 //
 internal void ClearParent() {
     _rule = null;
     _cachetime = TimeSpan.FromSeconds(60); // one minute default expiry
     _variables = new Hashtable();
     _resultType = typeof(HttpCapabilitiesBase);
 }
        //
        // internal constructor; inherit from parent
        //
        public HttpCapabilitiesDefaultProvider(HttpCapabilitiesDefaultProvider parent) {
            int id = Interlocked.Increment(ref _idCounter);
            // don't do id.ToString() on every request, do it here
            _cacheKeyPrefix = CacheInternal.PrefixHttpCapabilities + id.ToString(CultureInfo.InvariantCulture);

            if (parent == null) {
                ClearParent();
            }
            else {
                _rule = parent._rule;

                if (parent._variables == null)
                    _variables = null;
                else
                    _variables = new Hashtable(parent._variables);

                _cachetime = parent._cachetime;
                _resultType = parent._resultType;
            }
            //
            AddDependency(String.Empty);
        }
 internal void ClearParent()
 {
     this._rule = null;
     this._cachetime = TimeSpan.FromSeconds(60.0);
     this._variables = new Hashtable();
     this._resultType = typeof(HttpCapabilitiesBase);
 }