Пример #1
0
        public static OutputType ToOutputType(string outputTypeString)
        {
            switch (outputTypeString)
            {
            case OutputTypeName.Executable:
                return(OutputType.Executable);

            default:
                throw EnumerationHelper.UnrecognizedEnumerationValueException <OutputType>(outputTypeString);
            }
        }
Пример #2
0
        public static Platform ToPlatform(this string representation)
        {
            switch (representation)
            {
            case BaseConstants.WindowsPlatformStandardRepresentation:
                return(Platform.Windows);

            case BaseConstants.NonWindowsPlatformStandardRepresentation:
                return(Platform.NonWindows);

            default:
                throw EnumerationHelper.UnrecognizedEnumerationValueException <Platform>(representation);
            }
        }
Пример #3
0
        public static TargetFramework ToTargetFramework(string targetFrameworkString)
        {
            switch (targetFrameworkString)
            {
            case TargetFrameworkName.NetCoreApp2_2:
                return(TargetFramework.NetCoreApp22);

            case TargetFrameworkName.NetStandard2_0:
                return(TargetFramework.NetStandard20);

            default:
                throw EnumerationHelper.UnrecognizedEnumerationValueException <TargetFramework>(targetFrameworkString);
            }
        }