public CommandLineArgument(OptionUsage usage, char commandSwitch, string description) { Switch = commandSwitch; Description = description; Usage = usage; Options = null; IsActiveOption = false; }
public ICheckForUpdatesXMLSource GetAction(OptionUsage usage, string location) { if (usage == OptionUsage.Url) return new AlternativeUrlDownloadUpdatesXmlSourceAction(location); if (usage == OptionUsage.File) return new ReadFromFileUpdatesXmlSource(location); throw new ArgumentException("No action was found for the provided usage"); }
public ICheckForUpdatesXMLSource GetAction(OptionUsage usage, string location) { if (usage == OptionUsage.Url) { return(new AlternativeUrlDownloadUpdatesXmlSourceAction(location)); } if (usage == OptionUsage.File) { return(new ReadFromFileUpdatesXmlSource(location)); } throw new ArgumentException("No action was found for the provided usage"); }
public CFUValidator(OptionUsage urlOrFile, string xmlLocation, string serverVersion, List<string> installedHotfixes, bool checkHotfixContents) { if(urlOrFile != OptionUsage.File && urlOrFile != OptionUsage.Url) throw new ArgumentException("urlOrFile option should be either File or Url"); mom.CreateNewConnection(id); ConnectionsManager.XenConnections.AddRange(mom.AllConnections); XmlLocation = xmlLocation; ServerVersion = serverVersion; InstalledHotfixes = installedHotfixes; UrlOrFile = urlOrFile; CheckHotfixContents = checkHotfixContents; }
public CFUValidator(OptionUsage urlOrFile, string xmlLocation, string serverVersion, List <string> installedHotfixes, bool checkHotfixContents) { if (urlOrFile != OptionUsage.File && urlOrFile != OptionUsage.Url) { throw new ArgumentException("urlOrFile option should be either File or Url"); } mom.CreateNewConnection(id); ConnectionsManager.XenConnections.AddRange(mom.AllConnections); XmlLocation = xmlLocation; ServerVersion = serverVersion; InstalledHotfixes = installedHotfixes; UrlOrFile = urlOrFile; CheckHotfixContents = checkHotfixContents; }