コード例 #1
0
 internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
 {
     MethodImplOptions all = 
         MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig | 
         MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining;
     _val = ((MethodImplOptions)methodImplAttributes) & all;
 }
コード例 #2
0
        internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
        {
            MethodImplOptions all =
                MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig |
                MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining;

            _val = ((MethodImplOptions)methodImplAttributes) & all;
        }
コード例 #3
0
ファイル: MethodImpl.cs プロジェクト: MishaTY/DotNetParser
        internal MethodImplAttribute(System.Reflection.MethodImplAttributes methodImplAttributes)
        {
            MethodImplOptions all =
                MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig |
                MethodImplOptions.InternalCall | MethodImplOptions.Synchronized |
                MethodImplOptions.NoInlining | MethodImplOptions.AggressiveInlining |
                MethodImplOptions.NoOptimization | MethodImplOptions.SecurityMitigations;

            _val = ((MethodImplOptions)methodImplAttributes) & all;
        }
コード例 #4
0
        private static void AddMethodImplOptions(MethodDefinition method, CustomAttribute attribute)
        {
            if (DoesMethodHaveMethodImplOptions(method))
            {
                MethodImplOptions value = default(MethodImplOptions);

                if (method.AggressiveInlining)
                {
                    value |= MethodImplOptions.AggressiveInlining;
                }

                if (method.IsForwardRef)
                {
                    value |= MethodImplOptions.ForwardRef;
                }

                if (method.IsInternalCall)
                {
                    value |= MethodImplOptions.InternalCall;
                }

                if (method.NoInlining)
                {
                    value |= MethodImplOptions.NoInlining;
                }

                if (method.NoOptimization)
                {
                    value |= MethodImplOptions.NoOptimization;
                }

                if (method.IsPreserveSig && !method.HasPInvokeInfo)
                {
                    value |= MethodImplOptions.PreserveSig;
                }

                if (method.IsSynchronized)
                {
                    value |= MethodImplOptions.Synchronized;
                }

                if (method.IsUnmanaged)
                {
                    value |= MethodImplOptions.Unmanaged;
                }

                attribute.ConstructorArguments.Add(GetMethodImplAttributeArgument(method, value));
            }
        }
コード例 #5
0
        private static (bool success, MethodImplAttribute attribute) RecreateMethodImplAttribute(MethodBase methodBase)
        {
            MethodImplAttributes implementationFlags = methodBase.MethodImplementationFlags;

            int implementationFlagsMatchingImplementationOptions =
                (int)implementationFlags & ImplementationOptionsMask.Value;

            MethodImplOptions implementationOptions = (MethodImplOptions)implementationFlagsMatchingImplementationOptions;

            if (implementationOptions != 0)
            {
                return(true, new MethodImplAttribute(implementationOptions));
            }

            return(false, null);
        }
コード例 #6
0
 private static void Compare_Enum_Int32(MethodImplOptions a, MethodImplOptions b) =>
 AssertEquals(a.CompareTo(b), Comparer <MethodImplOptions> .Default.Compare(a, b));
コード例 #7
0
	// Constructors.
	public MethodImplAttribute(MethodImplOptions opts)
			{ options = opts; }
コード例 #8
0
	public MethodImplAttribute(short opts)
			{ options = (MethodImplOptions)opts; }
コード例 #9
0
        // public MethodCodeType MethodCodeType;

        public MethodImplAttribute(MethodImplOptions methodImplOptions)
        {
            Value = methodImplOptions;
        }
コード例 #10
0
 public MethodImplAttribute(MethodImplOptions pOptions)
 {
     mOptions = pOptions;
 }
コード例 #11
0
ファイル: MethodImplAttribute.cs プロジェクト: nguyenkien/api
 /// <summary>
 /// Default ctor
 /// </summary>
 public MethodImplAttribute(MethodImplOptions options)
 {
     this.options = options;
 }
コード例 #12
0
 public MethodImplAttribute(short options)
 {
     this.options = (MethodImplOptions)options;
 }
コード例 #13
0
ファイル: MethodImplAttribute.cs プロジェクト: Openwinrt/owr
 public MethodImplAttribute(MethodImplOptions methodImplOptions)
 {
 }
 internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
 {
     MethodImplOptions options = MethodImplOptions.InternalCall | MethodImplOptions.PreserveSig | MethodImplOptions.NoOptimization | MethodImplOptions.Synchronized | MethodImplOptions.ForwardRef | MethodImplOptions.NoInlining | MethodImplOptions.Unmanaged;
     this._val = ((MethodImplOptions) methodImplAttributes) & options;
 }
コード例 #15
0
        // Token: 0x06005C97 RID: 23703 RVA: 0x00144CF8 File Offset: 0x00142EF8
        internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
        {
            MethodImplOptions methodImplOptions = MethodImplOptions.Unmanaged | MethodImplOptions.ForwardRef | MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall | MethodImplOptions.Synchronized | MethodImplOptions.NoInlining | MethodImplOptions.AggressiveInlining | MethodImplOptions.NoOptimization | MethodImplOptions.SecurityMitigations;

            this._val = (MethodImplOptions)(methodImplAttributes & (MethodImplAttributes)methodImplOptions);
        }
コード例 #16
0
        internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)
        {
            MethodImplOptions options = MethodImplOptions.InternalCall | MethodImplOptions.PreserveSig | MethodImplOptions.NoOptimization | MethodImplOptions.Synchronized | MethodImplOptions.ForwardRef | MethodImplOptions.NoInlining | MethodImplOptions.Unmanaged;

            this._val = ((MethodImplOptions)methodImplAttributes) & options;
        }
コード例 #17
0
 public MethodImplAttribute(MethodImplOptions methodImplOptions) => this._val = methodImplOptions;
コード例 #18
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.MethodImplAttribute" /> class with the specified <see cref="T:System.Runtime.CompilerServices.MethodImplOptions" /> value.</summary><param name="methodImplOptions">A <see cref="T:System.Runtime.CompilerServices.MethodImplOptions" /> value specifying properties of the attributed method. </param>
 public MethodImplAttribute(MethodImplOptions methodImplOptions)
 {
     throw new NotImplementedException();
 }
コード例 #19
0
 // Constructors.
 public MethodImplAttribute(MethodImplOptions opts)
 {
     options = opts;
 }
コード例 #20
0
        public static CodeBlockBuilder AttributeMethodImpl(this CodeBlockBuilder builder, MethodImplOptions options)
        {
            var flags        = Enum.GetValues(typeof(MethodImplOptions)).Cast <Enum>().Where(options.HasFlag);
            var fullFlagName = flags.Select(x => $"System.Runtime.CompilerServices.MethodImplOptions.{x}");

            return(builder.Attribute($"[System.Runtime.CompilerServices.MethodImpl({string.Join(", ", fullFlagName)})]"));
        }
コード例 #21
0
ファイル: methodimplattribute.cs プロジェクト: REALTOBIZ/mono
 public MethodImplAttribute(MethodImplOptions methodImplOptions)
 {
     _val = methodImplOptions;
 }
コード例 #22
0
ファイル: MethodImplAttribute.cs プロジェクト: nguyenkien/api
 /// <summary>
 /// Default ctor
 /// </summary>
 public MethodImplAttribute(short options)
 {
     this.options = (MethodImplOptions) options;
 }
コード例 #23
0
 public MethodImplAttribute(MethodImplOptions methodImplOptions)
 {
     _val = methodImplOptions;
 }
コード例 #24
0
 public MethodImplAttribute(MethodImplOptions methodImplOptions)
 {
 }
コード例 #25
0
 public XaeiOSMethodImplAttribute(MethodImplOptions options)
 {
     _options = options;
 }
コード例 #26
0
 public MethodImplAttribute(MethodImplOptions options)
 {
     this.options = options;
 }
コード例 #27
0
ファイル: LockThisIssue.cs プロジェクト: HusterYP/VimConf
 static MemberReferenceExpression CreateMethodImplReferenceNode(MethodImplOptions option, AstType methodImplOptionsType)
 {
     return(methodImplOptionsType.Clone().Member(Enum.GetName(typeof(MethodImplOptions), option)));
 }
コード例 #28
0
 public MethodImplAttribute(MethodImplOptions pOptions)
 {
     mOptions = pOptions;
 }
コード例 #29
0
 public MethodImplAttribute(short opts)
 {
     options = (MethodImplOptions)opts;
 }
コード例 #30
0
ファイル: methodimplattribute.cs プロジェクト: REALTOBIZ/mono
 public MethodImplAttribute(short value)
 {
     _val = (MethodImplOptions)value;
 }
コード例 #31
0
 public MethodImplAttribute(short options)
 {
     _val = (MethodImplOptions)options;
 }
コード例 #32
0
 public MethodImplAttribute(short value)
 {
     _val = (MethodImplOptions)value;
 }
コード例 #33
0
ファイル: MethodImplAttribute.cs プロジェクト: yctri/Bridge
 public extern MethodImplAttribute(MethodImplOptions methodImplOptions);