private static void loadActionObserver(Dictionary <String, List <ActionObserver> > dic, ActionObserver obj) { Dictionary <Type, String> actions = obj.GetRelatedActions(); foreach (KeyValuePair <Type, String> kv in actions) { String[] arrActions = kv.Value.Split('/'); foreach (String action in arrActions) { String key = kv.Key.FullName + "_" + action; List <ActionObserver> clist = dic.ContainsKey(key) ? dic[key] : new List <ActionObserver>(); if (clist.Contains(obj) == false) { clist.Add(obj); } dic[key] = clist; } } }
private static void loadActionObserver( Dictionary<String, List<ActionObserver>> dic, ActionObserver obj ) { Dictionary<Type, String> actions = obj.GetRelatedActions(); foreach (KeyValuePair<Type, String> kv in actions) { String[] arrActions = kv.Value.Split( '/' ); foreach (String action in arrActions) { String key = kv.Key.FullName + "_" + action; List<ActionObserver> clist = dic.ContainsKey( key ) ? dic[key] : new List<ActionObserver>(); if (clist.Contains( obj ) == false) { clist.Add( obj ); } dic[key] = clist; } } }