public override void Init(CallMethodInfo info, string configString)
        {
            base.Init(info, configString);

            info.CacheAspect = this;

            _methodInfo = info.MethodInfo;

            CacheSyncRoot = info.SyncRoot;

            Cache = CreateCache();

            var ps = configString.Split(';');

            foreach (var p in ps)
            {
                var vs = p.Split('=');

                if (vs.Length == 2)
                {
                    switch (vs[0].ToLower().Trim())
                    {
                    case "maxcachetime": _instanceMaxCacheTime = int.Parse(vs[1].Trim()); break;

                    case "isweak":       _instanceIsWeak = bool.Parse(vs[1].Trim()); break;
                    }
                }
            }
        }
Beispiel #2
0
        public override void Init(CallMethodInfo info, string configString)
        {
            base.Init(info, configString);

            string[] ps = configString.Split(';');

            foreach (string p in ps)
            {
                string[] vs = p.Split('=');

                if (vs.Length == 2)
                {
                    switch (vs[0].ToLower().Trim())
                    {
                    case "filename":      _instanceFileName = vs[1].Trim();  break;

                    case "mincalltime":   _instanceMinCallTime = int.Parse(vs[1].Trim()); break;

                    case "logexceptions": _instanceLogExceptions = bool.Parse(vs[1].Trim()); break;

                    case "logparameters": _instanceLogParameters = bool.Parse(vs[1].Trim()); break;
                    }
                }
            }
        }
        public override void Init(CallMethodInfo info, string configString)
        {
            base.Init(info, configString);

            Counters.Add(_counter = CreateCounter(info) ?? CreateCounterInternal(info));
        }
Beispiel #4
0
 public virtual void Init(CallMethodInfo info, string configString)
 {
 }
Beispiel #5
0
 public MethodCallCounter(CallMethodInfo methodInfo)
 {
     CallMethodInfo = methodInfo;
     MethodInfo     = methodInfo.MethodInfo;
 }