/// <summary> /// Reads a single security declaration row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the security declaration table.</param> /// <returns>The row.</returns> public static SecurityDeclarationRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new SecurityDeclarationRow( (SecurityAction)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single file row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the file table.</param> /// <returns>The row.</returns> public static FileReferenceRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new FileReferenceRow( (FileAttributes)reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single method semantics row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the method semantics table.</param> /// <returns>The row.</returns> public static MethodSemanticsRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new MethodSemanticsRow( (MethodSemanticsAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single custom attribute row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the custom attribute table.</param> /// <returns>The row.</returns> public static CustomAttributeRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new CustomAttributeRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single method implementation row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the method implementation table.</param> /// <returns>The row.</returns> public static MethodImplementationRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new MethodImplementationRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single type reference row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the type reference table.</param> /// <returns>The row.</returns> public static TypeReferenceRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new TypeReferenceRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single field definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the field definition table.</param> /// <returns>The row.</returns> public static FieldDefinitionRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new FieldDefinitionRow( (FieldAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single generic parameter row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the generic parameter table.</param> /// <returns>The row.</returns> public static GenericParameterRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new GenericParameterRow( reader.ReadUInt16(), (GenericParameterAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size))); }
/// <summary> /// Reads a single constant row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the constants table.</param> /// <returns>The row.</returns> public static ConstantRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ConstantRow( (ElementType)reader.ReadByte(), reader.ReadByte(), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size))); }
/// <summary> /// Reads a single implementation map row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the implementation map table.</param> /// <returns>The row.</returns> public static ImplementationMapRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ImplementationMapRow( (ImplementationMapAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size))); }
/// <summary> /// Reads a single manifest resource row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the manifest resource table.</param> /// <returns>The row.</returns> public static ManifestResourceRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ManifestResourceRow( reader.ReadUInt32(), (ManifestResourceAttributes)reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size))); }
/// <summary> /// Reads a single exported type row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the exported type table.</param> /// <returns>The row.</returns> public static ExportedTypeRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ExportedTypeRow( (TypeAttributes)reader.ReadUInt32(), reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size), reader.ReadIndex((IndexSize)layout.Columns[4].Size))); }
/// <summary> /// Reads a single module definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the module definition table.</param> /// <returns>The row.</returns> public static ModuleDefinitionRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ModuleDefinitionRow( reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size), reader.ReadIndex((IndexSize)layout.Columns[4].Size))); }
/// <summary> /// Reads a single type definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the type definition table.</param> /// <returns>The row.</returns> public static TypeDefinitionRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new TypeDefinitionRow( (TypeAttributes)reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[1].Size), reader.ReadIndex((IndexSize)layout.Columns[2].Size), reader.ReadIndex((IndexSize)layout.Columns[3].Size), reader.ReadIndex((IndexSize)layout.Columns[4].Size), reader.ReadIndex((IndexSize)layout.Columns[5].Size))); }
/// <summary> /// Reads a single method definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the method definition table.</param> /// <param name="referenceResolver">The resolver to use for resolving the virtual address of the method body.</param> /// <returns>The row.</returns> public static MethodDefinitionRow FromReader(IBinaryStreamReader reader, TableLayout layout, ISegmentReferenceResolver referenceResolver) { return(new MethodDefinitionRow( referenceResolver.GetReferenceToRva(reader.ReadUInt32()), (MethodImplAttributes)reader.ReadUInt16(), (MethodAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[3].Size), reader.ReadIndex((IndexSize)layout.Columns[4].Size), reader.ReadIndex((IndexSize)layout.Columns[5].Size))); }
/// <summary> /// Reads a single method definition row from an input stream. /// </summary> /// <param name="context">The reader context.</param> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the method definition table.</param> /// <returns>The row.</returns> public static MethodDefinitionRow FromReader(PEReaderContext context, IBinaryStreamReader reader, TableLayout layout) { return(new MethodDefinitionRow( context.File.GetReferenceToRva(reader.ReadUInt32()), (MethodImplAttributes)reader.ReadUInt16(), (MethodAttributes)reader.ReadUInt16(), reader.ReadIndex((IndexSize)layout.Columns[3].Size), reader.ReadIndex((IndexSize)layout.Columns[4].Size), reader.ReadIndex((IndexSize)layout.Columns[5].Size))); }
/// <summary> /// Reads a single assembly definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the assembly definition table.</param> /// <returns>The row.</returns> public static AssemblyDefinitionRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new AssemblyDefinitionRow( (AssemblyHashAlgorithm)reader.ReadUInt32(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), (AssemblyAttributes)reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[6].Size), reader.ReadIndex((IndexSize)layout.Columns[7].Size), reader.ReadIndex((IndexSize)layout.Columns[8].Size))); }
/// <summary> /// Reads a single assembly definition row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the assembly definition table.</param> /// <returns>The row.</returns> public static AssemblyReferenceRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new AssemblyReferenceRow( reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), (AssemblyAttributes)reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[5].Size), reader.ReadIndex((IndexSize)layout.Columns[6].Size), reader.ReadIndex((IndexSize)layout.Columns[7].Size), reader.ReadIndex((IndexSize)layout.Columns[8].Size))); }
/// <summary> /// Reads a single class layout row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the class layout table.</param> /// <returns>The row.</returns> public static ClassLayoutRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new ClassLayoutRow( reader.ReadUInt16(), reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[2].Size))); }
/// <summary> /// Reads a single assembly reference operating system row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the assembly reference operating system table.</param> /// <returns>The row.</returns> public static AssemblyRefOSRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new AssemblyRefOSRow( reader.ReadUInt32(), reader.ReadUInt32(), reader.ReadUInt32(), reader.ReadIndex((IndexSize)layout.Columns[3].Size))); }
/// <summary> /// Reads a single stand-alone signature row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the stand-alone signature table.</param> /// <returns>The row.</returns> public static StandAloneSignatureRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new StandAloneSignatureRow(reader.ReadIndex((IndexSize)layout.Columns[0].Size))); }
/// <summary> /// Reads a single property map row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the property map table.</param> /// <returns>The row.</returns> public static PropertyMapRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new PropertyMapRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size))); }
/// <summary> /// Reads a single field RVA row from an input stream. /// </summary> /// <param name="context">The reader context.</param> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the field RVA table.</param> /// <returns>The row.</returns> public static FieldRvaRow FromReader(PEReaderContext context, IBinaryStreamReader reader, TableLayout layout) { return(new FieldRvaRow( context.File.GetReferenceToRva(reader.ReadUInt32()), reader.ReadIndex((IndexSize)layout.Columns[1].Size))); }
/// <summary> /// Reads a single type specification row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the type specification table.</param> /// <returns>The row.</returns> public static TypeSpecificationRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new TypeSpecificationRow(reader.ReadIndex((IndexSize)layout.Columns[0].Size))); }
/// <summary> /// Reads a single generic parameter row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the generic parameter table.</param> /// <returns>The row.</returns> public static GenericParameterConstraintRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new GenericParameterConstraintRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size))); }
/// <summary> /// Reads a single nested class row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the nested class table.</param> /// <returns>The row.</returns> public static NestedClassRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new NestedClassRow( reader.ReadIndex((IndexSize)layout.Columns[0].Size), reader.ReadIndex((IndexSize)layout.Columns[1].Size))); }
/// <summary> /// Reads a single field pointer row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the field pointer table.</param> /// <returns>The row.</returns> public static FieldPointerRow FromReader(IBinaryStreamReader reader, TableLayout layout) { return(new FieldPointerRow(reader.ReadIndex((IndexSize)layout.Columns[0].Size))); }
/// <summary> /// Reads a single field RVA row from an input stream. /// </summary> /// <param name="reader">The input stream.</param> /// <param name="layout">The layout of the field RVA table.</param> /// <param name="referenceResolver"></param> /// <returns>The row.</returns> public static FieldRvaRow FromReader(IBinaryStreamReader reader, TableLayout layout, ISegmentReferenceResolver referenceResolver) { return(new FieldRvaRow( referenceResolver.GetReferenceToRva(reader.ReadUInt32()), reader.ReadIndex((IndexSize)layout.Columns[1].Size))); }