/// <summary>
        /// Returns the collection of argument strings defined by this instance.
        /// </summary>
        public IEnumerable <string> GetArguments()
        {
            yield return("restore");

            if (!string.IsNullOrEmpty(RootPath))
            {
                yield return($"\"{RootPath}\"");
            }

            if (!string.IsNullOrEmpty(ConfigurationFile))
            {
                yield return($"--configfile \"{ConfigurationFile}\"");
            }

            if (DisableParallel)
            {
                yield return("--disable-parallel");
            }

            if (Force)
            {
                yield return("--force");
            }

            if (IgnoreFailedSources)
            {
                yield return("--ignore-failed-sources");
            }

            if (NoCache)
            {
                yield return("--no-cache");
            }

            if (NoDependencies)
            {
                yield return("--no-dependencies");
            }

            if (!string.IsNullOrEmpty(PackagesDirectory))
            {
                yield return($"--packages \"{PackagesDirectory}\"");
            }

            if (RuntimeIdentifiers != null)
            {
                foreach (var runtime in RuntimeIdentifiers)
                {
                    yield return($"--runtime \"{runtime}\"");
                }
            }

            if (Sources != null)
            {
                foreach (var source in Sources)
                {
                    yield return($"--source \"{source}\"");
                }
            }

            if (Verbosity != DotNetVerbosityLevel.Normal)
            {
                yield return($"--verbosity {DotNetVerbosity.GetString(Verbosity)}");
            }

            foreach (var arg in AdditionalArguments)
            {
                yield return(arg);
            }
        }
        /// <summary>
        /// Returns the collection of argument strings defined by this instance.
        /// </summary>
        public IEnumerable <string> GetArguments()
        {
            yield return("build");

            if (!string.IsNullOrEmpty(ProjectFile))
            {
                yield return($"\"{ProjectFile}\"");
            }

            if (!string.IsNullOrEmpty(Configuration))
            {
                yield return($"--configuration \"{Configuration}\"");
            }

            if (!string.IsNullOrEmpty(Framework))
            {
                yield return($"--framework \"{Framework}\"");
            }

            if (Force)
            {
                yield return("--force");
            }

            if (NoDependencies)
            {
                yield return("--no-dependencies");
            }

            if (NoIncremental)
            {
                yield return("--no-incremental");
            }

            if (NoRestore)
            {
                yield return("--no-restore");
            }

            if (!string.IsNullOrEmpty(Output))
            {
                yield return($"--output \"{Output}\"");
            }

            if (!string.IsNullOrEmpty(RuntimeIdentifier))
            {
                yield return($"--runtime  \"{RuntimeIdentifier}\"");
            }

            if (Verbosity != DotNetVerbosityLevel.Normal)
            {
                yield return($"--verbosity {DotNetVerbosity.GetString(Verbosity)}");
            }

            if (!string.IsNullOrEmpty(VersionSuffix))
            {
                yield return($"--version-suffix \"{VersionSuffix}\"");
            }

            foreach (var arg in AdditionalArguments)
            {
                yield return(arg);
            }
        }
Exemple #3
0
        /// <summary>
        /// Returns the collection of argument strings defined by this instance.
        /// </summary>
        public IEnumerable <string> GetArguments()
        {
            yield return("test");

            if (!string.IsNullOrEmpty(ProjectFile))
            {
                yield return($"\"{ProjectFile}\"");
            }

            if (!string.IsNullOrEmpty(TestAdapterPath))
            {
                yield return($"--test-adapter-path \"{TestAdapterPath}\"");
            }

            if (Blame)
            {
                yield return("--blame");
            }

            if (!string.IsNullOrEmpty(Configuration))
            {
                yield return($"--configuration \"{Configuration}\"");
            }

            if (!string.IsNullOrEmpty(CollectorName))
            {
                yield return($"--collect \"{CollectorName}\"");
            }

            if (!string.IsNullOrEmpty(DiagnosticsFile))
            {
                yield return($"--diag \"{DiagnosticsFile}\"");
            }

            if (!string.IsNullOrEmpty(Framework))
            {
                yield return($"--framework \"{Framework}\"");
            }

            if (!string.IsNullOrEmpty(Filter))
            {
                yield return($"--filter \"{Filter}\"");
            }

            if (!string.IsNullOrEmpty(Logger))
            {
                yield return($"--logger \"{Logger}\"");
            }

            if (NoBuild)
            {
                yield return("--no-build");
            }

            if (NoRestore)
            {
                yield return("--no-restore");
            }

            if (!string.IsNullOrEmpty(OutputDirectory))
            {
                yield return($"--output \"{OutputDirectory}\"");
            }

            if (!string.IsNullOrEmpty(ResultsDirectory))
            {
                yield return($"--results-directory \"{ResultsDirectory}\"");
            }

            if (!string.IsNullOrEmpty(SettingsFile))
            {
                yield return($"--settings \"{SettingsFile}\"");
            }

            if (ListTests)
            {
                yield return("--list-tests");
            }

            if (Verbosity != DotNetVerbosityLevel.Normal)
            {
                yield return($"--verbosity {DotNetVerbosity.GetString(Verbosity)}");
            }

            foreach (var arg in AdditionalArguments)
            {
                yield return(arg);
            }
        }
        /// <summary>
        /// Returns the collection of argument strings defined by this instance.
        /// </summary>
        public IEnumerable <string> GetArguments()
        {
            yield return("publish");

            if (!string.IsNullOrEmpty(ProjectFile))
            {
                yield return($"\"{ProjectFile}\"");
            }

            if (!string.IsNullOrEmpty(Configuration))
            {
                yield return($"--configuration \"{Configuration}\"");
            }

            if (!string.IsNullOrEmpty(Framework))
            {
                yield return($"--framework \"{Framework}\"");
            }

            if (Force)
            {
                yield return("--force");
            }

            if (ManifestFiles != null)
            {
                foreach (var manifest in ManifestFiles)
                {
                    yield return($"--manifest \"{manifest}\"");
                }
            }

            if (NoBuild)
            {
                yield return("--no-build");
            }

            if (NoDependencies)
            {
                yield return("--no-dependencies");
            }

            if (NoRestore)
            {
                yield return("--no-restore");
            }

            if (!string.IsNullOrEmpty(Output))
            {
                yield return($"--output \"{Output}\"");
            }

            if (SelfContained)
            {
                yield return("--self-contained");
            }

            if (!string.IsNullOrEmpty(Runtime))
            {
                yield return($"--runtime  \"{Runtime}\"");
            }

            if (Verbosity != DotNetVerbosityLevel.Normal)
            {
                yield return($"--verbosity {DotNetVerbosity.GetString(Verbosity)}");
            }

            if (!string.IsNullOrEmpty(VersionSuffix))
            {
                yield return($"--version-suffix \"{VersionSuffix}\"");
            }

            foreach (var arg in AdditionalArguments)
            {
                yield return(arg);
            }
        }
        /// <summary>
        /// Returns the collection of argument strings defined by this instance.
        /// </summary>
        public IEnumerable <string> GetArguments()
        {
            yield return("pack");

            if (!string.IsNullOrEmpty(ProjectFile))
            {
                yield return($"\"{ProjectFile}\"");
            }

            if (!string.IsNullOrEmpty(Configuration))
            {
                yield return($"--configuration \"{Configuration}\"");
            }

            if (Force)
            {
                yield return("--force");
            }

            if (IncludeSource)
            {
                yield return("--include-source");
            }

            if (IncludeSymbols)
            {
                yield return("--include-symbols");
            }

            if (NoBuild)
            {
                yield return("--no-build");
            }

            if (NoDependencies)
            {
                yield return("--no-dependencies");
            }

            if (NoRestore)
            {
                yield return("--no-restore");
            }

            if (!string.IsNullOrEmpty(OutputDirectory))
            {
                yield return($"--output \"{OutputDirectory}\"");
            }

            if (!string.IsNullOrEmpty(RuntimeIdentifier))
            {
                yield return($"--runtime \"{RuntimeIdentifier}\"");
            }

            if (Serviceable)
            {
                yield return("--serviceable");
            }

            if (!string.IsNullOrEmpty(VersionSuffix))
            {
                yield return($"--version-suffix \"{VersionSuffix}\"");
            }

            if (Verbosity != DotNetVerbosityLevel.Normal)
            {
                yield return($"--verbosity {DotNetVerbosity.GetString(Verbosity)}");
            }

            foreach (var arg in AdditionalArguments)
            {
                yield return(arg);
            }
        }