Exemple #1
0
        protected override bool isUnknownType(object o)
        {
            var arg = o as ParameterDefinition;

            if (arg != null)
            {
                return(MemberReferenceHelper.isSystemObject(arg.ParameterType));
            }

            var field = o as FieldDefinition;

            if (field != null)
            {
                return(MemberReferenceHelper.isSystemObject(field.FieldType));
            }

            var retType = o as MethodReturnType;

            if (retType != null)
            {
                return(MemberReferenceHelper.isSystemObject(retType.ReturnType));
            }

            throw new ApplicationException(string.Format("Unknown type: {0}", o.GetType()));
        }
Exemple #2
0
 protected override bool isValidType(IGenericParameterProvider gpp, TypeReference type)
 {
     if (type == null)
     {
         return(false);
     }
     if (type.IsValueType)
     {
         return(false);
     }
     if (MemberReferenceHelper.isSystemObject(type))
     {
         return(false);
     }
     return(base.isValidType(gpp, type));
 }