internal static bool IsDefined(ParameterInfo parameter, Type caType)
        {
            bool flag = (caType == typeof(object)) || (caType == typeof(Attribute));

            if (!flag && (s_pca[caType] == null))
            {
                return(false);
            }
            return(((flag || (caType == typeof(InAttribute))) && InAttribute.IsDefined(parameter)) || (((flag || (caType == typeof(OutAttribute))) && OutAttribute.IsDefined(parameter)) || (((flag || (caType == typeof(OptionalAttribute))) && OptionalAttribute.IsDefined(parameter)) || ((flag || (caType == typeof(MarshalAsAttribute))) && MarshalAsAttribute.IsDefined(parameter)))));
        }
Esempio n. 2
0
        internal static bool IsDefined(RuntimeParameterInfo parameter, RuntimeType caType)
        {
            bool flag = caType == (RuntimeType)typeof(object) || caType == (RuntimeType)typeof(Attribute);

            return((flag || !(PseudoCustomAttribute.s_pca.GetValueOrDefault(caType) == null)) && (((flag || caType == (RuntimeType)typeof(InAttribute)) && InAttribute.IsDefined(parameter)) || ((flag || caType == (RuntimeType)typeof(OutAttribute)) && OutAttribute.IsDefined(parameter)) || ((flag || caType == (RuntimeType)typeof(OptionalAttribute)) && OptionalAttribute.IsDefined(parameter)) || ((flag || caType == (RuntimeType)typeof(MarshalAsAttribute)) && MarshalAsAttribute.IsDefined(parameter))));
        }
Esempio n. 3
0
        internal static bool IsDefined(RuntimeParameterInfo parameter, RuntimeType caType)
        {
            bool flag = (caType == ((RuntimeType)typeof(object))) || (caType == ((RuntimeType)typeof(Attribute)));

            if (!flag && (s_pca.GetValueOrDefault(caType) == null))
            {
                return(false);
            }
            return(((flag || (caType == ((RuntimeType)typeof(InAttribute)))) && InAttribute.IsDefined(parameter)) || (((flag || (caType == ((RuntimeType)typeof(OutAttribute)))) && OutAttribute.IsDefined(parameter)) || (((flag || (caType == ((RuntimeType)typeof(OptionalAttribute)))) && OptionalAttribute.IsDefined(parameter)) || ((flag || (caType == ((RuntimeType)typeof(MarshalAsAttribute)))) && MarshalAsAttribute.IsDefined(parameter)))));
        }