public HasFieldMarshal(MetadataTable table, ZeroBasedIndex index) { if (table != MetadataTable.Field && table != MetadataTable.Param) { throw new ArgumentOutOfRangeException("table"); } m_index = ((OneBasedIndex) index) | ((table == MetadataTable.Param ? 1u : 0u) << 1); }
public HasCustomAttribute(MetadataTable table, ZeroBasedIndex index) { uint value; if (! s_inverseTables.TryGetValue(table, out value)) { throw new ArgumentException("HasCustomAttributes does not support the provided meta-data table", "table"); } m_index = (OneBasedIndex) index | (value << 5); }
public TypeOrMethodDef(MetadataTable table, ZeroBasedIndex index) { if (table != MetadataTable.TypeDef && table != MetadataTable.MethodDef) { throw new ArgumentException("Expected TypeDef or MethodDef", "table"); } var tableId = (table == MetadataTable.TypeDef) ? 0u : 1u; m_index = ((OneBasedIndex) index << 1) | tableId; }
internal static ZeroBasedIndex CheckLT(this ZeroBasedIndex lhs, int rhs, string parameterName) { if (lhs.CompareTo(rhs) >= 0) { throw new ArgumentOutOfRangeException(parameterName, String.Format("Expected a value < {0}", rhs)); } return(lhs); }
//# Returns a list of MethodSemantic rows associated with the method located at the given index.S internal IReadOnlyList <IntPtr> GetAssociations(ZeroBasedIndex methodIndex) { CheckDisposed(); if (m_semanticsMap == null) { lock (m_lockObject) { if (m_semanticsMap == null) { LoadMethodSemantics(); } } } IReadOnlyList <IntPtr> ret; m_semanticsMap.AssumeNotNull().TryGetValue(methodIndex, out ret); return(ret ?? new List <IntPtr>(0).AsReadOnly()); }
//# Returns the set of all types defined in the module, including nested types. internal TypeDefinition GetType(ZeroBasedIndex typeDefIndex) { EnsureTypesLoaded(); return(m_allTypes[typeDefIndex.Value]); }
//# Returns the set of all types defined in the module, including nested types. internal TypeDefinition GetType(ZeroBasedIndex typeDefIndex) { EnsureTypesLoaded(); return m_allTypes[typeDefIndex.Value]; }
//# Returns a list of MethodSemantic rows associated with the method located at the given index.S internal IReadOnlyList<IntPtr> GetAssociations(ZeroBasedIndex methodIndex) { CheckDisposed(); if (m_semanticsMap == null) { lock(m_lockObject) { if (m_semanticsMap == null) { LoadMethodSemantics(); } } } IReadOnlyList<IntPtr> ret; m_semanticsMap.AssumeNotNull().TryGetValue(methodIndex, out ret); return ret ?? new List<IntPtr>(0).AsReadOnly(); }
public static unsafe void *GetRow(this MetadataTable table, ZeroBasedIndex index, PEFile peFile) { return(peFile.CheckNotNull("peFile").GetRow(index, table)); }