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

            IsGenericType       = isGenericType;
            GenericTypePosition = genericTypePosition;
        }
예제 #2
0
        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));