public override bool Equals(object obj) { if (obj == null && this.GetType() != obj.GetType()) { return(false); } else { ComboClass <T> rval = (ComboClass <T>)obj; return(ComboClass <T> .SafeEquals(this.Value, rval.Value)); } }
public static T GetCounters <T>(string instance) { ComboClass <Type, string> key = new ComboClass <Type, string>(typeof(T), instance); object ret; lock (_syncRoot) { if (!_cachedCounters.TryGetValue(key, out ret)) { ret = CreateCounters <T>(instance); _cachedCounters.Add(key, ret); } return((T)ret); } }