File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Orm/Xtensive.Orm/Orm/Model Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 44// Created by: Dmitri Maximov
55// Created: 2007.08.27
66
7- using System ;
8- using System . Collections . Generic ;
9- using System . Linq ;
7+ using System . Collections . Frozen ;
108using Xtensive . Collections ;
119using Xtensive . Core ;
1210using Xtensive . Reflection ;
@@ -21,7 +19,7 @@ public sealed class TypeInfoCollection
2119 : NodeCollection < TypeInfo > ,
2220 IFilterable < TypeAttributes , TypeInfo >
2321 {
24- private readonly Dictionary < Type , TypeInfo > typeTable = new ( ) ;
22+ private IDictionary < Type , TypeInfo > typeTable = new Dictionary < Type , TypeInfo > ( ) ;
2523 private readonly Dictionary < string , TypeInfo > fullNameTable = new ( ) ;
2624
2725 private TypeIdRegistry typeIdRegistry ;
@@ -253,6 +251,11 @@ protected override string GetExceptionMessage(string key)
253251 + " You might have forgotten to register type {0} as an element of domain model." , key ) ;
254252 }
255253
254+ public override void Lock ( bool recursive )
255+ {
256+ base . Lock ( recursive ) ;
257+ typeTable = typeTable . ToFrozenDictionary ( ) ;
258+ }
256259
257260 // Constructors
258261
You can’t perform that action at this time.
0 commit comments