예제 #1
0
        public virtual byte[] ResolveSignature(int metadataToken)
        {
            RuntimeModule module = this as RuntimeModule;

            if (module == null)
            {
                throw new NotImplementedException();
            }
            return(module.ResolveSignature(metadataToken));
        }
예제 #2
0
        /// <summary>返回由元数据标记标识的签名 Blob。</summary>
        /// <returns>一个字节数组,表示签名 Blob。</returns>
        /// <param name="metadataToken">一个元数据标记,用于标识模块中的一个签名。</param>
        /// <exception cref="T:System.ArgumentException">
        /// <paramref name="metadataToken" /> 不是当前模块范围内的有效 MemberRef、MethodDef、TypeSpec、签名或 FieldDef 标记。</exception>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        /// <paramref name="metadataToken" /> 不是当前模块范围内的有效标记。</exception>
        public virtual byte[] ResolveSignature(int metadataToken)
        {
            RuntimeModule runtimeModule = this as RuntimeModule;

            if ((Module)runtimeModule != (Module)null)
            {
                return(runtimeModule.ResolveSignature(metadataToken));
            }
            throw new NotImplementedException();
        }
예제 #3
0
        public virtual byte[] ResolveSignature(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.ResolveSignature(metadataToken));
            }

            throw new NotImplementedException();
        }