예제 #1
0
        private bool ExecutedCore(string name, Type value = null)
        {
            value = value ?? typeof(object);
            var keyValuePair = new KeyValuePair <string, ApplicationModulesManager>(name, ModuleManager);

            if (CallMonitor.ContainsKey(keyValuePair))
            {
                if (!CallMonitor.GetValues(keyValuePair, true).Contains(value))
                {
                    CallMonitor.Add(keyValuePair, value);
                    return(false);
                }
                return(true);
            }
            CallMonitor.Add(keyValuePair, value);

            return(false);
        }
예제 #2
0
        public bool Executed <T>(string name)
        {
            if (typeof(T).IsAssignableFrom(GetType()))
            {
                Type value        = typeof(T);
                var  keyValuePair = new KeyValuePair <string, ApplicationModulesManager>(name, ModuleManager);
                if (CallMonitor.ContainsKey(keyValuePair))
                {
                    if (!CallMonitor.GetValues(keyValuePair, true).Contains(value))
                    {
                        CallMonitor.Add(keyValuePair, value);
                        return(false);
                    }
                    return(true);
                }
                CallMonitor.Add(keyValuePair, value);

                return(false);
            }
            return(true);
        }