- Timestamp:
- 11/24/15 16:59:57 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/StaticCache.cs
r13358 r13367 36 36 private Dictionary<Type, Guid> type2Guid; 37 37 private Dictionary<Type, TypeInfo> typeInfos; 38 private ExtensionRegistry extensionRegistry; 38 39 39 40 internal StaticCache() { … … 47 48 type2Guid = new Dictionary<Type, Guid>(); 48 49 typeInfos = new Dictionary<Type, TypeInfo>(); 50 extensionRegistry = ExtensionRegistry.CreateInstance(); 49 51 50 foreach (var transformer in ApplicationManager.Manager.GetInstances<ITransformer>().OrderBy(x => x. Order)) {52 foreach (var transformer in ApplicationManager.Manager.GetInstances<ITransformer>().OrderBy(x => x.Priority)) { 51 53 guid2Transformer.Add(transformer.Guid, transformer); 52 54 transformer2Guid.Add(transformer, transformer.Guid); … … 71 73 RegisterType(StorableClassAttribute.GetStorableClassAttribute(t).Guid, t); 72 74 } 75 76 RegisterExtension(BoolBox.Bool); 77 RegisterExtension(IntBox.Int); 78 RegisterExtension(LongBox.Long); 79 RegisterExtension(UnsignedIntBox.UnsignedInt); 80 RegisterExtension(UnsignedLongBox.UnsignedLong); 81 RegisterExtension(FloatBox.Float); 82 RegisterExtension(DoubleBox.Double); 83 RegisterExtension(StringBox.String); 84 RegisterExtension(BytesBox.Bytes); 85 RegisterExtension(BoolArrayBox.BoolArray); 86 RegisterExtension(IntArrayBox.IntArray); 87 RegisterExtension(MatrixBox.Matrix); 88 RegisterExtension(BoolMatrixBox.BoolMatrix); 89 RegisterExtension(IntMatrixBox.IntMatrix); 90 RegisterExtension(DictionaryBox.Dictionary); 73 91 } 74 92 } … … 79 97 type2Guid.Add(type, guid); 80 98 } 99 } 100 public void RegisterExtension<TExtension>(GeneratedExtensionBase<TExtension> extension) { 101 extensionRegistry.Add(extension); 81 102 } 82 103 … … 104 125 } 105 126 } 127 public ExtensionRegistry GetExtensionRegistry() { 128 return extensionRegistry; 129 } 106 130 } 107 131 }
Note: See TracChangeset
for help on using the changeset viewer.