File tree Expand file tree Collapse file tree 3 files changed +7
-33
lines changed
Expand file tree Collapse file tree 3 files changed +7
-33
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public T Populate<T>(T e) where T : ILabelledEntity
5656 }
5757
5858#if DEBUG_LABELS
59- Dictionary < string , ILabelledEntity > debugLabels = new Dictionary < string , ILabelledEntity > ( ) ;
59+ private readonly Dictionary < string , ILabelledEntity > debugLabels = new Dictionary < string , ILabelledEntity > ( ) ;
6060#endif
6161
6262 public IExtractedEntity Create ( Handle h )
@@ -66,7 +66,7 @@ public IExtractedEntity Create(Handle h)
6666 }
6767
6868 // Lazily cache primitive types.
69- PrimitiveType [ ] primitiveTypes = new PrimitiveType [ ( int ) PrimitiveTypeCode . Object + 1 ] ;
69+ private readonly PrimitiveType [ ] primitiveTypes = new PrimitiveType [ ( int ) PrimitiveTypeCode . Object + 1 ] ;
7070
7171 public PrimitiveType Create ( PrimitiveTypeCode code )
7272 {
Original file line number Diff line number Diff line change @@ -43,9 +43,11 @@ public string DebugTuples
4343 {
4444 get
4545 {
46- var writer = new StringWriter ( ) ;
47- Populate ( writer ) ;
48- return writer . ToString ( ) ;
46+ using ( var writer = new StringWriter ( ) )
47+ {
48+ Populate ( writer ) ;
49+ return writer . ToString ( ) ;
50+ }
4951 }
5052 }
5153
Original file line number Diff line number Diff line change @@ -103,34 +103,6 @@ public void AppendTo(TextWriter tb)
103103 tb . Write ( TrapBuilder . ToString ( ) ) ;
104104 tb . Write ( "\" " ) ;
105105 }
106-
107- class IdTrapBuilder
108- {
109- public readonly List < string > Fragments = new List < string > ( ) ;
110-
111- public void Append ( object arg )
112- {
113- if ( arg is IEntity )
114- {
115- var key = ( ( IEntity ) arg ) . Label ;
116- Fragments . Add ( "{#" ) ;
117- Fragments . Add ( key . Value . ToString ( ) ) ;
118- Fragments . Add ( "}" ) ;
119- }
120- else
121- Fragments . Add ( arg . ToString ( ) ) ;
122- }
123-
124- public void Append ( string arg )
125- {
126- Fragments . Add ( arg ) ;
127- }
128-
129- public void AppendLine ( )
130- {
131- throw new NotImplementedException ( ) ;
132- }
133- }
134106 }
135107
136108 /// <summary>
You can’t perform that action at this time.
0 commit comments