Пример #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));