Esempio n. 1
0
        public static OutputType ToOutputType(string outputTypeString)
        {
            switch (outputTypeString)
            {
            case OutputTypeName.Executable:
                return(OutputType.Executable);

            default:
                throw EnumerationHelper.UnrecognizedEnumerationValueException <OutputType>(outputTypeString);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }