Ejemplo n.º 1
0
        public MethodOtherProps ExtractProperties()
        {
            MethodOtherProps props = MethodOtherProps.NotSet;

            if (MethodInfo.Attributes.HasFlag(MethodAttributes.UnmanagedExport))
            {
                props = props | MethodOtherProps.UnmanagedExport;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.HideBySig))
            {
                props = props | MethodOtherProps.HideBySig;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.VtableLayoutMask))
            {
                props = props | MethodOtherProps.VtableLayoutMask;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.PinvokeImpl))
            {
                props = props | MethodOtherProps.PinvokeImpl;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.CheckAccessOnOverride))
            {
                props = props | MethodOtherProps.CheckAccessOnOverride;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.RTSpecialName))
            {
                props = props | MethodOtherProps.RTSpecialName;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.HasSecurity))
            {
                props = props | MethodOtherProps.HasSecurity;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.RequireSecObject))
            {
                props = props | MethodOtherProps.RequireSecObject;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.ReservedMask))
            {
                props = props | MethodOtherProps.ReservedMask;
            }
            if (MethodInfo.Attributes.HasFlag(MethodAttributes.SpecialName))
            {
                props = props | MethodOtherProps.SpecialName;
            }

            return(props);
        }
Ejemplo n.º 2
0
 public MethodDesc AddProperties(MethodOtherProps props)
 {
     Props = props;
     return(this);
 }
Ejemplo n.º 3
0
 public MethodDesc AddPropertiesFlag(MethodOtherProps flag)
 {
     Props = Props | flag;
     return(this);
 }