public void CacheScript(EvaluationScriptCacheKey key, Type type)
 {
     EvaluationDomain domain = this;
     lock (domain)
     {
         this._cache[key] = type;
     }
 }
        public void CacheScript(EvaluationScriptCacheKey key, Type type)
        {
            EvaluationDomain domain = this;

            lock (domain)
            {
                this._cache[key] = type;
            }
        }
示例#3
0
        public override bool Equals(object o)
        {
            EvaluationScriptCacheKey key = o as EvaluationScriptCacheKey;

            if (!(key._contextType == this._contextType))
            {
            }
            return((key != null) ? (key._code == this._code) : false);
        }
 public Type GetCachedScript(EvaluationScriptCacheKey key)
 {
     EvaluationDomain domain = this;
     lock (domain)
     {
         object obj1 = this._cache[key];
         if (!(obj1 is Type))
         {
         }
         return (Type) RuntimeServices.Coerce(obj1, typeof(Type));
     }
 }
        public Type GetCachedScript(EvaluationScriptCacheKey key)
        {
            EvaluationDomain domain = this;

            lock (domain)
            {
                object obj1 = this._cache[key];
                if (!(obj1 is Type))
                {
                }
                return((Type)RuntimeServices.Coerce(obj1, typeof(Type)));
            }
        }
示例#6
0
 public Evaluator(EvaluationContext context, string code)
 {
     if (code == null)
     {
         throw new ArgumentNullException("code");
     }
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     this._context = context;
     this._code = code;
     this._cacheKey = new EvaluationScriptCacheKey(context.GetType(), code);
 }
示例#7
0
 public Evaluator(EvaluationContext context, string code)
 {
     if (code == null)
     {
         throw new ArgumentNullException("code");
     }
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     this._context  = context;
     this._code     = code;
     this._cacheKey = new EvaluationScriptCacheKey(context.GetType(), code);
 }