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); }
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); }