public TypeLibrary(IEnumerable <Type> types) { _types = types.ToArray(); ByNamePart = new FunctionCache <string, Type>(GetTypeByNamePart); ByNamePartMulti = new FunctionCache <string, Type[]>(GetTypesByNamePart); _byName = _types.GroupBy(t => t.Name, t => t).ToDictionary(t => t.Key, t => t); PrettyName = new FunctionCache <Type, string>(type => ObtainTypeName(type, true)); CompleteName = new FunctionCache <Type, string>(type => ObtainTypeName(type, false)); }
public FunctionCache(FunctionCache <TKey, TValue> x) : base(x) { _createValue = x._createValue; }
public FunctionCache(FunctionCache <TKey, TValue> x, IEqualityComparer <TKey> comparer) : base(x, comparer) { _createValue = x._createValue; }