public static OutputType ToOutputType(string outputTypeString) { switch (outputTypeString) { case OutputTypeName.Executable: return(OutputType.Executable); default: throw EnumerationHelper.UnrecognizedEnumerationValueException <OutputType>(outputTypeString); } }
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); } }
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); } }