2 // MetadataTableReader.cs
5 // Jb Evain (jbevain@gmail.com)
7 // Generated by /CodeGen/cecil-gen.rb do not edit
8 // Tue Jul 17 00:22:32 +0200 2007
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 namespace Mono
.Cecil
.Metadata
{
35 using System
.Collections
;
38 sealed class MetadataTableReader
: BaseMetadataTableVisitor
{
40 MetadataRoot m_metadataRoot
;
42 MetadataRowReader m_mrrv
;
43 BinaryReader m_binaryReader
;
45 int [] m_rows
= new int [TablesHeap
.MaxTableCount
];
47 public MetadataTableReader (MetadataReader mrv
)
49 m_metadataRoot
= mrv
.GetMetadataRoot ();
50 m_heap
= m_metadataRoot
.Streams
.TablesHeap
;
51 m_binaryReader
= new BinaryReader (new MemoryStream (m_heap
.Data
));
52 m_binaryReader
.BaseStream
.Position
= 24;
53 m_mrrv
= new MetadataRowReader (this);
56 public MetadataRoot
GetMetadataRoot ()
58 return m_metadataRoot
;
61 public BinaryReader
GetReader ()
63 return m_binaryReader
;
66 public override IMetadataRowVisitor
GetRowVisitor ()
71 public int GetNumberOfRows (int rid
)
76 public AssemblyTable
GetAssemblyTable ()
78 return (AssemblyTable
) m_heap
[AssemblyTable
.RId
];
81 public AssemblyOSTable
GetAssemblyOSTable ()
83 return (AssemblyOSTable
) m_heap
[AssemblyOSTable
.RId
];
86 public AssemblyProcessorTable
GetAssemblyProcessorTable ()
88 return (AssemblyProcessorTable
) m_heap
[AssemblyProcessorTable
.RId
];
91 public AssemblyRefTable
GetAssemblyRefTable ()
93 return (AssemblyRefTable
) m_heap
[AssemblyRefTable
.RId
];
96 public AssemblyRefOSTable
GetAssemblyRefOSTable ()
98 return (AssemblyRefOSTable
) m_heap
[AssemblyRefOSTable
.RId
];
101 public AssemblyRefProcessorTable
GetAssemblyRefProcessorTable ()
103 return (AssemblyRefProcessorTable
) m_heap
[AssemblyRefProcessorTable
.RId
];
106 public ClassLayoutTable
GetClassLayoutTable ()
108 return (ClassLayoutTable
) m_heap
[ClassLayoutTable
.RId
];
111 public ConstantTable
GetConstantTable ()
113 return (ConstantTable
) m_heap
[ConstantTable
.RId
];
116 public CustomAttributeTable
GetCustomAttributeTable ()
118 return (CustomAttributeTable
) m_heap
[CustomAttributeTable
.RId
];
121 public DeclSecurityTable
GetDeclSecurityTable ()
123 return (DeclSecurityTable
) m_heap
[DeclSecurityTable
.RId
];
126 public EventTable
GetEventTable ()
128 return (EventTable
) m_heap
[EventTable
.RId
];
131 public EventMapTable
GetEventMapTable ()
133 return (EventMapTable
) m_heap
[EventMapTable
.RId
];
136 public EventPtrTable
GetEventPtrTable ()
138 return (EventPtrTable
) m_heap
[EventPtrTable
.RId
];
141 public ExportedTypeTable
GetExportedTypeTable ()
143 return (ExportedTypeTable
) m_heap
[ExportedTypeTable
.RId
];
146 public FieldTable
GetFieldTable ()
148 return (FieldTable
) m_heap
[FieldTable
.RId
];
151 public FieldLayoutTable
GetFieldLayoutTable ()
153 return (FieldLayoutTable
) m_heap
[FieldLayoutTable
.RId
];
156 public FieldMarshalTable
GetFieldMarshalTable ()
158 return (FieldMarshalTable
) m_heap
[FieldMarshalTable
.RId
];
161 public FieldPtrTable
GetFieldPtrTable ()
163 return (FieldPtrTable
) m_heap
[FieldPtrTable
.RId
];
166 public FieldRVATable
GetFieldRVATable ()
168 return (FieldRVATable
) m_heap
[FieldRVATable
.RId
];
171 public FileTable
GetFileTable ()
173 return (FileTable
) m_heap
[FileTable
.RId
];
176 public GenericParamTable
GetGenericParamTable ()
178 return (GenericParamTable
) m_heap
[GenericParamTable
.RId
];
181 public GenericParamConstraintTable
GetGenericParamConstraintTable ()
183 return (GenericParamConstraintTable
) m_heap
[GenericParamConstraintTable
.RId
];
186 public ImplMapTable
GetImplMapTable ()
188 return (ImplMapTable
) m_heap
[ImplMapTable
.RId
];
191 public InterfaceImplTable
GetInterfaceImplTable ()
193 return (InterfaceImplTable
) m_heap
[InterfaceImplTable
.RId
];
196 public ManifestResourceTable
GetManifestResourceTable ()
198 return (ManifestResourceTable
) m_heap
[ManifestResourceTable
.RId
];
201 public MemberRefTable
GetMemberRefTable ()
203 return (MemberRefTable
) m_heap
[MemberRefTable
.RId
];
206 public MethodTable
GetMethodTable ()
208 return (MethodTable
) m_heap
[MethodTable
.RId
];
211 public MethodImplTable
GetMethodImplTable ()
213 return (MethodImplTable
) m_heap
[MethodImplTable
.RId
];
216 public MethodPtrTable
GetMethodPtrTable ()
218 return (MethodPtrTable
) m_heap
[MethodPtrTable
.RId
];
221 public MethodSemanticsTable
GetMethodSemanticsTable ()
223 return (MethodSemanticsTable
) m_heap
[MethodSemanticsTable
.RId
];
226 public MethodSpecTable
GetMethodSpecTable ()
228 return (MethodSpecTable
) m_heap
[MethodSpecTable
.RId
];
231 public ModuleTable
GetModuleTable ()
233 return (ModuleTable
) m_heap
[ModuleTable
.RId
];
236 public ModuleRefTable
GetModuleRefTable ()
238 return (ModuleRefTable
) m_heap
[ModuleRefTable
.RId
];
241 public NestedClassTable
GetNestedClassTable ()
243 return (NestedClassTable
) m_heap
[NestedClassTable
.RId
];
246 public ParamTable
GetParamTable ()
248 return (ParamTable
) m_heap
[ParamTable
.RId
];
251 public ParamPtrTable
GetParamPtrTable ()
253 return (ParamPtrTable
) m_heap
[ParamPtrTable
.RId
];
256 public PropertyTable
GetPropertyTable ()
258 return (PropertyTable
) m_heap
[PropertyTable
.RId
];
261 public PropertyMapTable
GetPropertyMapTable ()
263 return (PropertyMapTable
) m_heap
[PropertyMapTable
.RId
];
266 public PropertyPtrTable
GetPropertyPtrTable ()
268 return (PropertyPtrTable
) m_heap
[PropertyPtrTable
.RId
];
271 public StandAloneSigTable
GetStandAloneSigTable ()
273 return (StandAloneSigTable
) m_heap
[StandAloneSigTable
.RId
];
276 public TypeDefTable
GetTypeDefTable ()
278 return (TypeDefTable
) m_heap
[TypeDefTable
.RId
];
281 public TypeRefTable
GetTypeRefTable ()
283 return (TypeRefTable
) m_heap
[TypeRefTable
.RId
];
286 public TypeSpecTable
GetTypeSpecTable ()
288 return (TypeSpecTable
) m_heap
[TypeSpecTable
.RId
];
291 public override void VisitTableCollection (TableCollection coll
)
293 if (m_heap
.HasTable (ModuleTable
.RId
)) {
294 coll
.Add (new ModuleTable ());
295 m_rows
[ModuleTable
.RId
] = m_binaryReader
.ReadInt32 ();
297 if (m_heap
.HasTable (TypeRefTable
.RId
)) {
298 coll
.Add (new TypeRefTable ());
299 m_rows
[TypeRefTable
.RId
] = m_binaryReader
.ReadInt32 ();
301 if (m_heap
.HasTable (TypeDefTable
.RId
)) {
302 coll
.Add (new TypeDefTable ());
303 m_rows
[TypeDefTable
.RId
] = m_binaryReader
.ReadInt32 ();
305 if (m_heap
.HasTable (FieldPtrTable
.RId
)) {
306 coll
.Add (new FieldPtrTable ());
307 m_rows
[FieldPtrTable
.RId
] = m_binaryReader
.ReadInt32 ();
309 if (m_heap
.HasTable (FieldTable
.RId
)) {
310 coll
.Add (new FieldTable ());
311 m_rows
[FieldTable
.RId
] = m_binaryReader
.ReadInt32 ();
313 if (m_heap
.HasTable (MethodPtrTable
.RId
)) {
314 coll
.Add (new MethodPtrTable ());
315 m_rows
[MethodPtrTable
.RId
] = m_binaryReader
.ReadInt32 ();
317 if (m_heap
.HasTable (MethodTable
.RId
)) {
318 coll
.Add (new MethodTable ());
319 m_rows
[MethodTable
.RId
] = m_binaryReader
.ReadInt32 ();
321 if (m_heap
.HasTable (ParamPtrTable
.RId
)) {
322 coll
.Add (new ParamPtrTable ());
323 m_rows
[ParamPtrTable
.RId
] = m_binaryReader
.ReadInt32 ();
325 if (m_heap
.HasTable (ParamTable
.RId
)) {
326 coll
.Add (new ParamTable ());
327 m_rows
[ParamTable
.RId
] = m_binaryReader
.ReadInt32 ();
329 if (m_heap
.HasTable (InterfaceImplTable
.RId
)) {
330 coll
.Add (new InterfaceImplTable ());
331 m_rows
[InterfaceImplTable
.RId
] = m_binaryReader
.ReadInt32 ();
333 if (m_heap
.HasTable (MemberRefTable
.RId
)) {
334 coll
.Add (new MemberRefTable ());
335 m_rows
[MemberRefTable
.RId
] = m_binaryReader
.ReadInt32 ();
337 if (m_heap
.HasTable (ConstantTable
.RId
)) {
338 coll
.Add (new ConstantTable ());
339 m_rows
[ConstantTable
.RId
] = m_binaryReader
.ReadInt32 ();
341 if (m_heap
.HasTable (CustomAttributeTable
.RId
)) {
342 coll
.Add (new CustomAttributeTable ());
343 m_rows
[CustomAttributeTable
.RId
] = m_binaryReader
.ReadInt32 ();
345 if (m_heap
.HasTable (FieldMarshalTable
.RId
)) {
346 coll
.Add (new FieldMarshalTable ());
347 m_rows
[FieldMarshalTable
.RId
] = m_binaryReader
.ReadInt32 ();
349 if (m_heap
.HasTable (DeclSecurityTable
.RId
)) {
350 coll
.Add (new DeclSecurityTable ());
351 m_rows
[DeclSecurityTable
.RId
] = m_binaryReader
.ReadInt32 ();
353 if (m_heap
.HasTable (ClassLayoutTable
.RId
)) {
354 coll
.Add (new ClassLayoutTable ());
355 m_rows
[ClassLayoutTable
.RId
] = m_binaryReader
.ReadInt32 ();
357 if (m_heap
.HasTable (FieldLayoutTable
.RId
)) {
358 coll
.Add (new FieldLayoutTable ());
359 m_rows
[FieldLayoutTable
.RId
] = m_binaryReader
.ReadInt32 ();
361 if (m_heap
.HasTable (StandAloneSigTable
.RId
)) {
362 coll
.Add (new StandAloneSigTable ());
363 m_rows
[StandAloneSigTable
.RId
] = m_binaryReader
.ReadInt32 ();
365 if (m_heap
.HasTable (EventMapTable
.RId
)) {
366 coll
.Add (new EventMapTable ());
367 m_rows
[EventMapTable
.RId
] = m_binaryReader
.ReadInt32 ();
369 if (m_heap
.HasTable (EventPtrTable
.RId
)) {
370 coll
.Add (new EventPtrTable ());
371 m_rows
[EventPtrTable
.RId
] = m_binaryReader
.ReadInt32 ();
373 if (m_heap
.HasTable (EventTable
.RId
)) {
374 coll
.Add (new EventTable ());
375 m_rows
[EventTable
.RId
] = m_binaryReader
.ReadInt32 ();
377 if (m_heap
.HasTable (PropertyMapTable
.RId
)) {
378 coll
.Add (new PropertyMapTable ());
379 m_rows
[PropertyMapTable
.RId
] = m_binaryReader
.ReadInt32 ();
381 if (m_heap
.HasTable (PropertyPtrTable
.RId
)) {
382 coll
.Add (new PropertyPtrTable ());
383 m_rows
[PropertyPtrTable
.RId
] = m_binaryReader
.ReadInt32 ();
385 if (m_heap
.HasTable (PropertyTable
.RId
)) {
386 coll
.Add (new PropertyTable ());
387 m_rows
[PropertyTable
.RId
] = m_binaryReader
.ReadInt32 ();
389 if (m_heap
.HasTable (MethodSemanticsTable
.RId
)) {
390 coll
.Add (new MethodSemanticsTable ());
391 m_rows
[MethodSemanticsTable
.RId
] = m_binaryReader
.ReadInt32 ();
393 if (m_heap
.HasTable (MethodImplTable
.RId
)) {
394 coll
.Add (new MethodImplTable ());
395 m_rows
[MethodImplTable
.RId
] = m_binaryReader
.ReadInt32 ();
397 if (m_heap
.HasTable (ModuleRefTable
.RId
)) {
398 coll
.Add (new ModuleRefTable ());
399 m_rows
[ModuleRefTable
.RId
] = m_binaryReader
.ReadInt32 ();
401 if (m_heap
.HasTable (TypeSpecTable
.RId
)) {
402 coll
.Add (new TypeSpecTable ());
403 m_rows
[TypeSpecTable
.RId
] = m_binaryReader
.ReadInt32 ();
405 if (m_heap
.HasTable (ImplMapTable
.RId
)) {
406 coll
.Add (new ImplMapTable ());
407 m_rows
[ImplMapTable
.RId
] = m_binaryReader
.ReadInt32 ();
409 if (m_heap
.HasTable (FieldRVATable
.RId
)) {
410 coll
.Add (new FieldRVATable ());
411 m_rows
[FieldRVATable
.RId
] = m_binaryReader
.ReadInt32 ();
413 if (m_heap
.HasTable (AssemblyTable
.RId
)) {
414 coll
.Add (new AssemblyTable ());
415 m_rows
[AssemblyTable
.RId
] = m_binaryReader
.ReadInt32 ();
417 if (m_heap
.HasTable (AssemblyProcessorTable
.RId
)) {
418 coll
.Add (new AssemblyProcessorTable ());
419 m_rows
[AssemblyProcessorTable
.RId
] = m_binaryReader
.ReadInt32 ();
421 if (m_heap
.HasTable (AssemblyOSTable
.RId
)) {
422 coll
.Add (new AssemblyOSTable ());
423 m_rows
[AssemblyOSTable
.RId
] = m_binaryReader
.ReadInt32 ();
425 if (m_heap
.HasTable (AssemblyRefTable
.RId
)) {
426 coll
.Add (new AssemblyRefTable ());
427 m_rows
[AssemblyRefTable
.RId
] = m_binaryReader
.ReadInt32 ();
429 if (m_heap
.HasTable (AssemblyRefProcessorTable
.RId
)) {
430 coll
.Add (new AssemblyRefProcessorTable ());
431 m_rows
[AssemblyRefProcessorTable
.RId
] = m_binaryReader
.ReadInt32 ();
433 if (m_heap
.HasTable (AssemblyRefOSTable
.RId
)) {
434 coll
.Add (new AssemblyRefOSTable ());
435 m_rows
[AssemblyRefOSTable
.RId
] = m_binaryReader
.ReadInt32 ();
437 if (m_heap
.HasTable (FileTable
.RId
)) {
438 coll
.Add (new FileTable ());
439 m_rows
[FileTable
.RId
] = m_binaryReader
.ReadInt32 ();
441 if (m_heap
.HasTable (ExportedTypeTable
.RId
)) {
442 coll
.Add (new ExportedTypeTable ());
443 m_rows
[ExportedTypeTable
.RId
] = m_binaryReader
.ReadInt32 ();
445 if (m_heap
.HasTable (ManifestResourceTable
.RId
)) {
446 coll
.Add (new ManifestResourceTable ());
447 m_rows
[ManifestResourceTable
.RId
] = m_binaryReader
.ReadInt32 ();
449 if (m_heap
.HasTable (NestedClassTable
.RId
)) {
450 coll
.Add (new NestedClassTable ());
451 m_rows
[NestedClassTable
.RId
] = m_binaryReader
.ReadInt32 ();
453 if (m_heap
.HasTable (GenericParamTable
.RId
)) {
454 coll
.Add (new GenericParamTable ());
455 m_rows
[GenericParamTable
.RId
] = m_binaryReader
.ReadInt32 ();
457 if (m_heap
.HasTable (MethodSpecTable
.RId
)) {
458 coll
.Add (new MethodSpecTable ());
459 m_rows
[MethodSpecTable
.RId
] = m_binaryReader
.ReadInt32 ();
461 if (m_heap
.HasTable (GenericParamConstraintTable
.RId
)) {
462 coll
.Add (new GenericParamConstraintTable ());
463 m_rows
[GenericParamConstraintTable
.RId
] = m_binaryReader
.ReadInt32 ();
467 public override void VisitAssemblyTable (AssemblyTable table
)
469 int number
= m_rows
[AssemblyTable
.RId
];
470 table
.Rows
= new RowCollection (number
);
471 for (int i
= 0; i
< number
; i
++)
472 table
.Rows
.Add (new AssemblyRow ());
474 public override void VisitAssemblyOSTable (AssemblyOSTable table
)
476 int number
= m_rows
[AssemblyOSTable
.RId
];
477 table
.Rows
= new RowCollection (number
);
478 for (int i
= 0; i
< number
; i
++)
479 table
.Rows
.Add (new AssemblyOSRow ());
481 public override void VisitAssemblyProcessorTable (AssemblyProcessorTable table
)
483 int number
= m_rows
[AssemblyProcessorTable
.RId
];
484 table
.Rows
= new RowCollection (number
);
485 for (int i
= 0; i
< number
; i
++)
486 table
.Rows
.Add (new AssemblyProcessorRow ());
488 public override void VisitAssemblyRefTable (AssemblyRefTable table
)
490 int number
= m_rows
[AssemblyRefTable
.RId
];
491 table
.Rows
= new RowCollection (number
);
492 for (int i
= 0; i
< number
; i
++)
493 table
.Rows
.Add (new AssemblyRefRow ());
495 public override void VisitAssemblyRefOSTable (AssemblyRefOSTable table
)
497 int number
= m_rows
[AssemblyRefOSTable
.RId
];
498 table
.Rows
= new RowCollection (number
);
499 for (int i
= 0; i
< number
; i
++)
500 table
.Rows
.Add (new AssemblyRefOSRow ());
502 public override void VisitAssemblyRefProcessorTable (AssemblyRefProcessorTable table
)
504 int number
= m_rows
[AssemblyRefProcessorTable
.RId
];
505 table
.Rows
= new RowCollection (number
);
506 for (int i
= 0; i
< number
; i
++)
507 table
.Rows
.Add (new AssemblyRefProcessorRow ());
509 public override void VisitClassLayoutTable (ClassLayoutTable table
)
511 int number
= m_rows
[ClassLayoutTable
.RId
];
512 table
.Rows
= new RowCollection (number
);
513 for (int i
= 0; i
< number
; i
++)
514 table
.Rows
.Add (new ClassLayoutRow ());
516 public override void VisitConstantTable (ConstantTable table
)
518 int number
= m_rows
[ConstantTable
.RId
];
519 table
.Rows
= new RowCollection (number
);
520 for (int i
= 0; i
< number
; i
++)
521 table
.Rows
.Add (new ConstantRow ());
523 public override void VisitCustomAttributeTable (CustomAttributeTable table
)
525 int number
= m_rows
[CustomAttributeTable
.RId
];
526 table
.Rows
= new RowCollection (number
);
527 for (int i
= 0; i
< number
; i
++)
528 table
.Rows
.Add (new CustomAttributeRow ());
530 public override void VisitDeclSecurityTable (DeclSecurityTable table
)
532 int number
= m_rows
[DeclSecurityTable
.RId
];
533 table
.Rows
= new RowCollection (number
);
534 for (int i
= 0; i
< number
; i
++)
535 table
.Rows
.Add (new DeclSecurityRow ());
537 public override void VisitEventTable (EventTable table
)
539 int number
= m_rows
[EventTable
.RId
];
540 table
.Rows
= new RowCollection (number
);
541 for (int i
= 0; i
< number
; i
++)
542 table
.Rows
.Add (new EventRow ());
544 public override void VisitEventMapTable (EventMapTable table
)
546 int number
= m_rows
[EventMapTable
.RId
];
547 table
.Rows
= new RowCollection (number
);
548 for (int i
= 0; i
< number
; i
++)
549 table
.Rows
.Add (new EventMapRow ());
551 public override void VisitEventPtrTable (EventPtrTable table
)
553 int number
= m_rows
[EventPtrTable
.RId
];
554 table
.Rows
= new RowCollection (number
);
555 for (int i
= 0; i
< number
; i
++)
556 table
.Rows
.Add (new EventPtrRow ());
558 public override void VisitExportedTypeTable (ExportedTypeTable table
)
560 int number
= m_rows
[ExportedTypeTable
.RId
];
561 table
.Rows
= new RowCollection (number
);
562 for (int i
= 0; i
< number
; i
++)
563 table
.Rows
.Add (new ExportedTypeRow ());
565 public override void VisitFieldTable (FieldTable table
)
567 int number
= m_rows
[FieldTable
.RId
];
568 table
.Rows
= new RowCollection (number
);
569 for (int i
= 0; i
< number
; i
++)
570 table
.Rows
.Add (new FieldRow ());
572 public override void VisitFieldLayoutTable (FieldLayoutTable table
)
574 int number
= m_rows
[FieldLayoutTable
.RId
];
575 table
.Rows
= new RowCollection (number
);
576 for (int i
= 0; i
< number
; i
++)
577 table
.Rows
.Add (new FieldLayoutRow ());
579 public override void VisitFieldMarshalTable (FieldMarshalTable table
)
581 int number
= m_rows
[FieldMarshalTable
.RId
];
582 table
.Rows
= new RowCollection (number
);
583 for (int i
= 0; i
< number
; i
++)
584 table
.Rows
.Add (new FieldMarshalRow ());
586 public override void VisitFieldPtrTable (FieldPtrTable table
)
588 int number
= m_rows
[FieldPtrTable
.RId
];
589 table
.Rows
= new RowCollection (number
);
590 for (int i
= 0; i
< number
; i
++)
591 table
.Rows
.Add (new FieldPtrRow ());
593 public override void VisitFieldRVATable (FieldRVATable table
)
595 int number
= m_rows
[FieldRVATable
.RId
];
596 table
.Rows
= new RowCollection (number
);
597 for (int i
= 0; i
< number
; i
++)
598 table
.Rows
.Add (new FieldRVARow ());
600 public override void VisitFileTable (FileTable table
)
602 int number
= m_rows
[FileTable
.RId
];
603 table
.Rows
= new RowCollection (number
);
604 for (int i
= 0; i
< number
; i
++)
605 table
.Rows
.Add (new FileRow ());
607 public override void VisitGenericParamTable (GenericParamTable table
)
609 int number
= m_rows
[GenericParamTable
.RId
];
610 table
.Rows
= new RowCollection (number
);
611 for (int i
= 0; i
< number
; i
++)
612 table
.Rows
.Add (new GenericParamRow ());
614 public override void VisitGenericParamConstraintTable (GenericParamConstraintTable table
)
616 int number
= m_rows
[GenericParamConstraintTable
.RId
];
617 table
.Rows
= new RowCollection (number
);
618 for (int i
= 0; i
< number
; i
++)
619 table
.Rows
.Add (new GenericParamConstraintRow ());
621 public override void VisitImplMapTable (ImplMapTable table
)
623 int number
= m_rows
[ImplMapTable
.RId
];
624 table
.Rows
= new RowCollection (number
);
625 for (int i
= 0; i
< number
; i
++)
626 table
.Rows
.Add (new ImplMapRow ());
628 public override void VisitInterfaceImplTable (InterfaceImplTable table
)
630 int number
= m_rows
[InterfaceImplTable
.RId
];
631 table
.Rows
= new RowCollection (number
);
632 for (int i
= 0; i
< number
; i
++)
633 table
.Rows
.Add (new InterfaceImplRow ());
635 public override void VisitManifestResourceTable (ManifestResourceTable table
)
637 int number
= m_rows
[ManifestResourceTable
.RId
];
638 table
.Rows
= new RowCollection (number
);
639 for (int i
= 0; i
< number
; i
++)
640 table
.Rows
.Add (new ManifestResourceRow ());
642 public override void VisitMemberRefTable (MemberRefTable table
)
644 int number
= m_rows
[MemberRefTable
.RId
];
645 table
.Rows
= new RowCollection (number
);
646 for (int i
= 0; i
< number
; i
++)
647 table
.Rows
.Add (new MemberRefRow ());
649 public override void VisitMethodTable (MethodTable table
)
651 int number
= m_rows
[MethodTable
.RId
];
652 table
.Rows
= new RowCollection (number
);
653 for (int i
= 0; i
< number
; i
++)
654 table
.Rows
.Add (new MethodRow ());
656 public override void VisitMethodImplTable (MethodImplTable table
)
658 int number
= m_rows
[MethodImplTable
.RId
];
659 table
.Rows
= new RowCollection (number
);
660 for (int i
= 0; i
< number
; i
++)
661 table
.Rows
.Add (new MethodImplRow ());
663 public override void VisitMethodPtrTable (MethodPtrTable table
)
665 int number
= m_rows
[MethodPtrTable
.RId
];
666 table
.Rows
= new RowCollection (number
);
667 for (int i
= 0; i
< number
; i
++)
668 table
.Rows
.Add (new MethodPtrRow ());
670 public override void VisitMethodSemanticsTable (MethodSemanticsTable table
)
672 int number
= m_rows
[MethodSemanticsTable
.RId
];
673 table
.Rows
= new RowCollection (number
);
674 for (int i
= 0; i
< number
; i
++)
675 table
.Rows
.Add (new MethodSemanticsRow ());
677 public override void VisitMethodSpecTable (MethodSpecTable table
)
679 int number
= m_rows
[MethodSpecTable
.RId
];
680 table
.Rows
= new RowCollection (number
);
681 for (int i
= 0; i
< number
; i
++)
682 table
.Rows
.Add (new MethodSpecRow ());
684 public override void VisitModuleTable (ModuleTable table
)
686 int number
= m_rows
[ModuleTable
.RId
];
687 table
.Rows
= new RowCollection (number
);
688 for (int i
= 0; i
< number
; i
++)
689 table
.Rows
.Add (new ModuleRow ());
691 public override void VisitModuleRefTable (ModuleRefTable table
)
693 int number
= m_rows
[ModuleRefTable
.RId
];
694 table
.Rows
= new RowCollection (number
);
695 for (int i
= 0; i
< number
; i
++)
696 table
.Rows
.Add (new ModuleRefRow ());
698 public override void VisitNestedClassTable (NestedClassTable table
)
700 int number
= m_rows
[NestedClassTable
.RId
];
701 table
.Rows
= new RowCollection (number
);
702 for (int i
= 0; i
< number
; i
++)
703 table
.Rows
.Add (new NestedClassRow ());
705 public override void VisitParamTable (ParamTable table
)
707 int number
= m_rows
[ParamTable
.RId
];
708 table
.Rows
= new RowCollection (number
);
709 for (int i
= 0; i
< number
; i
++)
710 table
.Rows
.Add (new ParamRow ());
712 public override void VisitParamPtrTable (ParamPtrTable table
)
714 int number
= m_rows
[ParamPtrTable
.RId
];
715 table
.Rows
= new RowCollection (number
);
716 for (int i
= 0; i
< number
; i
++)
717 table
.Rows
.Add (new ParamPtrRow ());
719 public override void VisitPropertyTable (PropertyTable table
)
721 int number
= m_rows
[PropertyTable
.RId
];
722 table
.Rows
= new RowCollection (number
);
723 for (int i
= 0; i
< number
; i
++)
724 table
.Rows
.Add (new PropertyRow ());
726 public override void VisitPropertyMapTable (PropertyMapTable table
)
728 int number
= m_rows
[PropertyMapTable
.RId
];
729 table
.Rows
= new RowCollection (number
);
730 for (int i
= 0; i
< number
; i
++)
731 table
.Rows
.Add (new PropertyMapRow ());
733 public override void VisitPropertyPtrTable (PropertyPtrTable table
)
735 int number
= m_rows
[PropertyPtrTable
.RId
];
736 table
.Rows
= new RowCollection (number
);
737 for (int i
= 0; i
< number
; i
++)
738 table
.Rows
.Add (new PropertyPtrRow ());
740 public override void VisitStandAloneSigTable (StandAloneSigTable table
)
742 int number
= m_rows
[StandAloneSigTable
.RId
];
743 table
.Rows
= new RowCollection (number
);
744 for (int i
= 0; i
< number
; i
++)
745 table
.Rows
.Add (new StandAloneSigRow ());
747 public override void VisitTypeDefTable (TypeDefTable table
)
749 int number
= m_rows
[TypeDefTable
.RId
];
750 table
.Rows
= new RowCollection (number
);
751 for (int i
= 0; i
< number
; i
++)
752 table
.Rows
.Add (new TypeDefRow ());
754 public override void VisitTypeRefTable (TypeRefTable table
)
756 int number
= m_rows
[TypeRefTable
.RId
];
757 table
.Rows
= new RowCollection (number
);
758 for (int i
= 0; i
< number
; i
++)
759 table
.Rows
.Add (new TypeRefRow ());
761 public override void VisitTypeSpecTable (TypeSpecTable table
)
763 int number
= m_rows
[TypeSpecTable
.RId
];
764 table
.Rows
= new RowCollection (number
);
765 for (int i
= 0; i
< number
; i
++)
766 table
.Rows
.Add (new TypeSpecRow ());