Exemple #1
0
        public ReturnValue(ReturnModifier modifier, MemberRef type,
                           bool isGenericType, int genericTypePosition)
        {
            Modifier = modifier;
            Type     = type;

            IsGenericType       = isGenericType;
            GenericTypePosition = genericTypePosition;
        }
        public ReturnValue GenerateReturnValue(MethodInfo methodInfo)
        {
            Check.Ref(methodInfo);

            Type           returnType = methodInfo.ReturnType;
            ReturnModifier modifier   = GenerateReturnModifier(methodInfo.ReturnParameter);

            if (returnType.IsGenericParameter)
            {
                int genericPos = returnType.GenericParameterPosition;
                return(new ReturnValue(modifier, default, true, genericPos));