• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# HeapIndexToken类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HeapIndexToken的典型用法代码示例。如果您正苦于以下问题:C# HeapIndexToken类的具体用法?C# HeapIndexToken怎么用?C# HeapIndexToken使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HeapIndexToken类属于命名空间,在下文中一共展示了HeapIndexToken类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GenericParamRow

 /// <summary>
 /// Initializes a new instance of the <see cref="GenericParamRow"/> struct.
 /// </summary>
 /// <param name="number">The number.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="owner">The owner table idx.</param>
 /// <param name="nameStringIdx">The name string idx.</param>
 public GenericParamRow(ushort number, GenericParameterAttributes flags, Token owner, HeapIndexToken nameStringIdx)
 {
     this.number = number;
     this.flags = flags;
     this.owner = owner;
     this.nameStringIdx = nameStringIdx;
 }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:14,代码来源:GenericParamRow.cs


示例2: RuntimeAttribute

 /// <summary>
 /// Initializes a new instance of the <see cref="RuntimeAttribute"/> class.
 /// </summary>
 /// <param name="typeModule">The type module.</param>
 /// <param name="ctor">The ctor.</param>
 /// <param name="ctorMethod">The ctor method.</param>
 /// <param name="blobIndex">Index of the blob.</param>
 public RuntimeAttribute(ITypeModule typeModule, Token ctor, RuntimeMethod ctorMethod, HeapIndexToken blobIndex)
 {
     this.typeModule = typeModule;
     this.ctorMethod = ctorMethod;
     this.ctor = ctor;
     this.blobIndex = blobIndex;
 }
开发者ID:jeffreye,项目名称:MOSA-Project,代码行数:14,代码来源:RuntimeAttribute.cs


示例3: ReadString

        /// <summary>
        /// Retrieves the string at the requested offset.
        /// </summary>
        /// <param name="token">The offset into the heap, where the string starts.</param>
        /// <returns>The string at the given offset.</returns>
        public string ReadString(HeapIndexToken token)
        {
            Debug.Assert((HeapIndexToken.TableMask & token) == HeapIndexToken.UserString);
            if ((HeapIndexToken.TableMask & token) != HeapIndexToken.UserString)
                throw new ArgumentException(@"Invalid token value.", @"token");

            int offset = (int)(token & HeapIndexToken.RowIndexMask);

            // Argument checks
            if (0 == offset)
            {
                token += 1;
                return String.Empty;
            }

            // Validate the offset & calculate the real offset
            int realOffset = ValidateOffset(offset);
            int length = CalculatePrefixLength(ref realOffset);
            Debug.Assert(1 == (length & 1), @"Invalid string length read from Metadata - corrupt string?");

            if (0 == length)
                return String.Empty;

            byte[] buffer = this.Metadata;
            return Encoding.Unicode.GetString(buffer, realOffset, length - 1);
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:31,代码来源:UserStringHeap.cs


示例4: CheckName

        protected int CheckName(HeapIndexToken nameIndex)
        {
            if (nameIndex == 0)
            {
                return 1;
            }
            else
            {
                if (!IsValidStringIndex(nameIndex))
                {
                    return 2;
                }
                else
                {
                    string name = metadata.ReadString(nameIndex);

                    if (string.IsNullOrEmpty(name))
                    {
                        return 3;
                    }
                }
            }

            return 0;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:25,代码来源:BaseTableVerificationStage.cs


示例5: GenericParamRow

 /// <summary>
 /// Initializes a new instance of the <see cref="GenericParamRow" /> struct.
 /// </summary>
 /// <param name="number">The number.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="owner">The owner.</param>
 /// <param name="nameString">The name string.</param>
 public GenericParamRow(ushort number, GenericParameterAttributes flags, Token owner, HeapIndexToken nameString)
 {
     Number = number;
     Flags = flags;
     Owner = owner;
     NameString = nameString;
 }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:14,代码来源:GenericParamRow.cs


示例6: RuntimeParameter

 /// <summary>
 /// Initializes a new instance of the <see cref="RuntimeParameter"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="position">The position.</param>
 /// <param name="attributes">The attributes.</param>
 public RuntimeParameter(string name, int position, ParameterAttributes attributes)
 {
     this.token = (HeapIndexToken)0;
     this.attributes = attributes;
     this.name = name;
     this.position = position;
 }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:13,代码来源:RuntimeParameter.cs


示例7: ManifestResourceRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ManifestResourceRow" /> struct.
        /// </summary>
        /// <param name="offset">The offset.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="nameString">Index of the name string.</param>
        /// <param name="implementation">The implementation.</param>
        public ManifestResourceRow(uint offset, ManifestResourceAttributes flags, HeapIndexToken nameString,
			Token implementation)
        {
            Offset = offset;
            Flags = flags;
            NameString = nameString;
            Implementation = implementation;
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:15,代码来源:ManifestResourceRow.cs


示例8: ImplMapRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ImplMapRow" /> struct.
        /// </summary>
        /// <param name="mappingFlags">The mapping flags.</param>
        /// <param name="memberForwarded">The member forwarded table.</param>
        /// <param name="importNameString">The import name string.</param>
        /// <param name="importScopeTable">The import scope table.</param>
        public ImplMapRow(PInvokeAttributes mappingFlags, Token memberForwarded,
			HeapIndexToken importNameString, Token importScopeTable)
        {
            MappingFlags = mappingFlags;
            MemberForwarded = memberForwarded;
            ImportNameString = importNameString;
            ImportScopeTable = importScopeTable;
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:15,代码来源:ImplMapRow.cs


示例9: ManifestResourceRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ManifestResourceRow"/> struct.
        /// </summary>
        /// <param name="offset">The offset.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="nameStringIndex">Index of the name string.</param>
        /// <param name="implementation">The implementation table idx.</param>
        public ManifestResourceRow(uint offset, ManifestResourceAttributes flags, HeapIndexToken nameStringIndex,
			Token implementation)
        {
            _offset = offset;
            _flags = flags;
            _nameStringIdx = nameStringIndex;
            _implementation = implementation;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:15,代码来源:ManifestResourceRow.cs


示例10: ImplMapRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ImplMapRow"/> struct.
        /// </summary>
        /// <param name="mappingFlags">The mapping flags.</param>
        /// <param name="memberForwardedTableIdx">The member forwarded table idx.</param>
        /// <param name="importNameStringIdx">The import name string idx.</param>
        /// <param name="importScopeTableIdx">The import scope table idx.</param>
        public ImplMapRow(PInvokeAttributes mappingFlags, Token memberForwardedTableIdx,
			HeapIndexToken importNameStringIdx, Token importScopeTableIdx)
        {
            _mappingFlags = mappingFlags;
            _memberForwardedTableIdx = memberForwardedTableIdx;
            _importNameStringIdx = importNameStringIdx;
            _importScopeTableIdx = importScopeTableIdx;
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:15,代码来源:ImplMapRow.cs


示例11: ExportedTypeRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ExportedTypeRow"/> struct.
        /// </summary>
        /// <param name="flags">The flags.</param>
        /// <param name="typeDef">The type def.</param>
        /// <param name="typeName">Name of the type.</param>
        /// <param name="typeNamespace">The type namespace.</param>
        /// <param name="implementation">The implementation.</param>
        public ExportedTypeRow(TypeAttributes flags, HeapIndexToken typeDef, HeapIndexToken typeName,
								HeapIndexToken typeNamespace, Token implementation)
        {
            Flags = flags;
            TypeDef = typeDef;
            TypeName = typeName;
            TypeNamespace = typeNamespace;
            Implementation = implementation;
        }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:17,代码来源:ExportedTypeRow.cs


示例12: TypeDefRow

        /// <summary>
        /// Initializes a new instance of the <see cref="TypeDefRow"/> struct.
        /// </summary>
        /// <param name="flags">The flags.</param>
        /// <param name="typeNameIdx">The type name idx.</param>
        /// <param name="typeNamespaceIdx">The type namespace idx.</param>
        /// <param name="extends">The extends.</param>
        /// <param name="fieldList">The field list.</param>
        /// <param name="methodList">The method list.</param>
        public TypeDefRow(TypeAttributes flags, HeapIndexToken typeNameIdx, HeapIndexToken typeNamespaceIdx,
							Token extends, Token fieldList, Token methodList)
        {
            this.flags = flags;
            this.typeNameIdx = typeNameIdx;
            this.typeNamespaceIdx = typeNamespaceIdx;
            this.extends = extends;
            this.fieldList = fieldList;
            this.methodList = methodList;
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:19,代码来源:TypeDefRow.cs


示例13: MethodDefRow

        /// <summary>
        /// Initializes a new instance of the <see cref="MethodDefRow"/> struct.
        /// </summary>
        /// <param name="rva">The rva.</param>
        /// <param name="implFlags">The impl flags.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="paramList">The param list.</param>
        public MethodDefRow(uint rva, MethodImplAttributes implFlags, MethodAttributes flags, HeapIndexToken nameString,
								HeapIndexToken signatureBlob, Token paramList)
        {
            Rva = rva;
            ImplFlags = implFlags;
            Flags = flags;
            NameString = nameString;
            SignatureBlob = signatureBlob;
            ParamList = paramList;
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:17,代码来源:MethodDefRow.cs


示例14: TypeDefRow

        /// <summary>
        /// Initializes a new instance of the <see cref="TypeDefRow" /> struct.
        /// </summary>
        /// <param name="flags">The flags.</param>
        /// <param name="typeName">Name of the type.</param>
        /// <param name="typeNamespace">The type namespace.</param>
        /// <param name="extends">The extends.</param>
        /// <param name="fieldList">The field list.</param>
        /// <param name="methodList">The method list.</param>
        public TypeDefRow(TypeAttributes flags, HeapIndexToken typeName, HeapIndexToken typeNamespace,
							Token extends, Token fieldList, Token methodList)
        {
            Flags = flags;
            TypeName = typeName;
            TypeNamespace = typeNamespace;
            Extends = extends;
            FieldList = fieldList;
            MethodList = methodList;
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:19,代码来源:TypeDefRow.cs


示例15: MethodDefRow

        /// <summary>
        /// Initializes a new instance of the <see cref="MethodDefRow"/> struct.
        /// </summary>
        /// <param name="rva">The rva.</param>
        /// <param name="implFlags">The impl flags.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="nameStringIdx">The name string idx.</param>
        /// <param name="signatureBlobIdx">The signature BLOB idx.</param>
        /// <param name="paramList">The param list.</param>
        public MethodDefRow(uint rva, MethodImplAttributes implFlags, MethodAttributes flags, HeapIndexToken nameStringIdx,
								HeapIndexToken signatureBlobIdx, Token paramList)
        {
            this._rva = rva;
            this._implFlags = implFlags;
            this._flags = flags;
            this._nameStringIdx = nameStringIdx;
            this._signatureBlobIdx = signatureBlobIdx;
            this._paramList = paramList;
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:19,代码来源:MethodDefRow.cs


示例16: ReadString

        /// <summary>
        /// Reads the string.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <returns></returns>
        public string ReadString(HeapIndexToken token)
        {
            Debug.Assert((HeapIndexToken.TableMask & token) == HeapIndexToken.String);
            if ((HeapIndexToken.TableMask & token) != HeapIndexToken.String)
                throw new ArgumentException(@"Invalid token value.", @"token");

            int size = 0;

            // Offset of the requested string
            return ReadString((int)(token & HeapIndexToken.RowIndexMask), out size);
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:16,代码来源:StringHeap.cs


示例17: ModuleRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleRow" /> struct.
        /// </summary>
        /// <param name="generation">The generation.</param>
        /// <param name="nameString">The name string.</param>
        /// <param name="mvidGuid">The mvid unique identifier.</param>
        /// <param name="encIdGuid">The enc identifier unique identifier.</param>
        /// <param name="encBaseIdGuid">The enc base identifier unique identifier.</param>
        public ModuleRow(ushort generation,
							HeapIndexToken nameString,
							HeapIndexToken mvidGuid,
							HeapIndexToken encIdGuid,
							HeapIndexToken encBaseIdGuid)
        {
            Generation = generation;
            NameString = nameString;
            MvidGuid = mvidGuid;
            EncIdGuid = encIdGuid;
            EncBaseIdGuid = encBaseIdGuid;
        }
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:20,代码来源:ModuleRow.cs


示例18: ModuleRow

        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleRow"/> struct.
        /// </summary>
        /// <param name="generation">The generation.</param>
        /// <param name="nameStringIdx">The name string idx.</param>
        /// <param name="mvidGuidIdx">The mvid GUID idx.</param>
        /// <param name="encIdGuidIdx">The enc id GUID idx.</param>
        /// <param name="encBaseIdGuidIdx">The enc base id GUID idx.</param>
        public ModuleRow(ushort generation,
							HeapIndexToken nameStringIdx,
							HeapIndexToken mvidGuidIdx,
							HeapIndexToken encIdGuidIdx,
							HeapIndexToken encBaseIdGuidIdx)
        {
            _generation = generation;
            _nameStringIdx = nameStringIdx;
            _mvidGuidIdx = mvidGuidIdx;
            _encIdGuidIdx = encIdGuidIdx;
            _encBaseIdGuidIdx = encBaseIdGuidIdx;
        }
开发者ID:jeffreye,项目名称:MOSA-Project,代码行数:20,代码来源:ModuleRow.cs


示例19: AssemblyRefRow

        /// <summary>
        /// Initializes a new instance of the <see cref="AssemblyRefRow"/> struct.
        /// </summary>
        /// <param name="majorVersion">The major version.</param>
        /// <param name="minorVersion">The minor version.</param>
        /// <param name="buildNumber">The build number.</param>
        /// <param name="revisionNumber">The revision number.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="publicKeyOrToken">The public key or token.</param>
        /// <param name="name">The name.</param>
        /// <param name="culture">The culture.</param>
        /// <param name="hashValue">The hash value.</param>
        public AssemblyRefRow(ushort majorVersion, ushort minorVersion, ushort buildNumber, ushort revisionNumber,
								AssemblyAttributes flags, HeapIndexToken publicKeyOrToken, HeapIndexToken name,
								HeapIndexToken culture, HeapIndexToken hashValue)
        {
            this.majorVersion = majorVersion;
            this.minorVersion = minorVersion;
            this.buildNumber = buildNumber;
            this.revisionNumber = revisionNumber;
            this.flags = flags;
            this.publicKeyOrToken = publicKeyOrToken;
            this.name = name;
            this.culture = culture;
            this.hashValue = hashValue;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:26,代码来源:AssemblyRefRow.cs


示例20: AssemblyRow

        /// <summary>
        /// Initializes a new instance of the <see cref="AssemblyRow"/> struct.
        /// </summary>
        /// <param name="hashAlgId">The hash alg id.</param>
        /// <param name="majorVersion">The major version.</param>
        /// <param name="minorVersion">The minor version.</param>
        /// <param name="buildNumber">The build number.</param>
        /// <param name="revision">The revision.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="publicKey">The public key.</param>
        /// <param name="name">The name.</param>
        /// <param name="culture">The culture.</param>
        public AssemblyRow(AssemblyHashAlgorithm hashAlgId,
							ushort majorVersion, ushort minorVersion, ushort buildNumber, ushort revision,
							AssemblyAttributes flags, HeapIndexToken publicKey, HeapIndexToken name, HeapIndexToken culture)
        {
            this.hashAlgId = hashAlgId;
            this.majorVersion = majorVersion;
            this.minorVersion = minorVersion;
            this.buildNumber = buildNumber;
            this.revisionNumber = revision;
            this.flags = flags;
            this.publicKey = publicKey;
            this.name = name;
            this.culture = culture;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:26,代码来源:AssemblyRow.cs



注:本文中的HeapIndexToken类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HeatDotNet类代码示例发布时间:2022-05-24
下一篇:
C# Heap类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap