コード例 #1
0
 public CommandLineArgument(OptionUsage usage, char commandSwitch, string description)
 {
     Switch         = commandSwitch;
     Description    = description;
     Usage          = usage;
     Options        = null;
     IsActiveOption = false;
 }
コード例 #2
0
 public CommandLineArgument(OptionUsage usage, char commandSwitch, string description)
 {
     Switch = commandSwitch;
     Description = description;
     Usage = usage;
     Options = null;
     IsActiveOption = false;
 }
コード例 #3
0
        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");
        }
コード例 #4
0
        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");
        }
コード例 #5
0
ファイル: CFUValidator.cs プロジェクト: ChrisH4rding/xenadmin
        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;
        }
コード例 #6
0
        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;
        }