예제 #1
0
        public static string GetPostfix(
            this DpdtArgumentWrapperTypeEnum wrapperType
            )
        {
            switch (wrapperType)
            {
            case DpdtArgumentWrapperTypeEnum.None:
                return(string.Empty);

            case DpdtArgumentWrapperTypeEnum.Func:
                return("_Func");

            default:
                throw new ArgumentOutOfRangeException(wrapperType.ToString());
            }
        }
예제 #2
0
        public static ITypeSymbol GenerateWrapperTypes(
            this ITypeSymbol type,
            ITypeInfoProvider typeInfoProvider,
            DpdtArgumentWrapperTypeEnum wrapperType
            )
        {
            ITypeSymbol wrapperSymbol;

            switch (wrapperType)
            {
            case DpdtArgumentWrapperTypeEnum.None:
                wrapperSymbol = type;
                break;

            case DpdtArgumentWrapperTypeEnum.Func:
                wrapperSymbol = typeInfoProvider.Func(type);
                break;

            default:
                throw new ArgumentOutOfRangeException(wrapperType.ToString());
            }

            return(wrapperSymbol);
        }