示例#1
0
 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));
 }
示例#2
0
 public FunctionCache(FunctionCache <TKey, TValue> x)
     : base(x)
 {
     _createValue = x._createValue;
 }
示例#3
0
 public FunctionCache(FunctionCache <TKey, TValue> x, IEqualityComparer <TKey> comparer)
     : base(x, comparer)
 {
     _createValue = x._createValue;
 }