Exemplo n.º 1
0
        public virtual string ResolveString(int metadataToken)
        {
            RuntimeModule module = this as RuntimeModule;

            if (module == null)
            {
                throw new NotImplementedException();
            }
            return(module.ResolveString(metadataToken));
        }
Exemplo n.º 2
0
        /// <summary>返回由指定元数据标记标识的字符串。</summary>
        /// <returns>一个 <see cref="T:System.String" />,包含来自元数据字符串堆的一个字符串值。</returns>
        /// <param name="metadataToken">一个元数据标记,用于标识模块的字符串堆中的一个字符串。</param>
        /// <exception cref="T:System.ArgumentException">
        /// <paramref name="metadataToken" /> 不是当前模块范围内的字符串的标记。</exception>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        /// <paramref name="metadataToken" /> 不是当前模块范围内的有效标记。</exception>
        public virtual string ResolveString(int metadataToken)
        {
            RuntimeModule runtimeModule = this as RuntimeModule;

            if ((Module)runtimeModule != (Module)null)
            {
                return(runtimeModule.ResolveString(metadataToken));
            }
            throw new NotImplementedException();
        }
Exemplo n.º 3
0
        public virtual string ResolveString(int metadataToken)
        {
            // This API was made virtual in V4. Code compiled against V2 might use
            // "call" rather than "callvirt" to call it.
            // This makes sure those code still works.
            RuntimeModule rtModule = this as RuntimeModule;

            if (rtModule != null)
            {
                return(rtModule.ResolveString(metadataToken));
            }

            throw new NotImplementedException();
        }