コード例 #1
0
ファイル: ReflectionEmitter.cs プロジェクト: furesoft/roslyn
        private MethodImplAttributes GetMethodImplAttributes(Cci.IMethodDefinition methodDef)
        {
            // TODO (tomat): bug in Ref.Emit - ForwardRef can't be emitted
            MethodImplAttributes implAttrs = methodDef.GetImplementationAttributes(_context) & ~MethodImplAttributes.ForwardRef;

            // TODO (tomat): bug in Ref.Emit - it seems that a body RVA of the last method
            // is reused if the method is InternalCall but not Runtime (see TestMethodImplAttribute_VerifiableMD),
            if ((implAttrs & MethodImplAttributes.InternalCall) != 0)
            {
                implAttrs |= MethodImplAttributes.Runtime;
            }

            return implAttrs;
        }