Пример #1
0
 public ILRuntimeJITAttribute()
 {
     this.flags = ILRuntimeJITFlags.JITOnDemand;
 }
Пример #2
0
 public ILRuntimeJITAttribute(ILRuntimeJITFlags flags)
 {
     this.flags = flags;
 }
Пример #3
0
        public static bool GetJITFlags(this Mono.Cecil.CustomAttribute attribute, Enviorment.AppDomain appdomain, out ILRuntimeJITFlags flags)
        {
            var at = appdomain.GetType(attribute.AttributeType, null, null);

            flags = ILRuntimeJITFlags.None;
            if (at == appdomain.JITAttributeType)
            {
                if (attribute.HasConstructorArguments)
                {
                    flags = (ILRuntimeJITFlags)(int)attribute.ConstructorArguments[0].Value;
                }
                else
                {
                    flags = ILRuntimeJITFlags.JITOnDemand;
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }