Ejemplo n.º 1
0
        /// <summary>
        ///   <p>This is a commandline tool to run an ASP.Net web.config tranformation.</p>
        ///   <p>For more details, visit the <a href="https://github.com/erichexter/WebConfigTransformRunner">official website</a>.</p>
        /// </summary>
        /// <remarks>
        ///   <p>This is a <a href="http://www.nuke.build/docs/authoring-builds/cli-tools.html#fluent-apis">CLI wrapper with fluent API</a> that allows to modify the following arguments:</p>
        ///   <ul>
        ///     <li><c>&lt;outputFilename&gt;</c> via <see cref="WebConfigTransformRunnerSettings.OutputFilename"/></li>
        ///     <li><c>&lt;transformFilename&gt;</c> via <see cref="WebConfigTransformRunnerSettings.TransformFilename"/></li>
        ///     <li><c>&lt;webConfigFilename&gt;</c> via <see cref="WebConfigTransformRunnerSettings.WebConfigFilename"/></li>
        ///   </ul>
        /// </remarks>
        public static IReadOnlyCollection <Output> WebConfigTransformRunner(WebConfigTransformRunnerSettings toolSettings = null)
        {
            toolSettings = toolSettings ?? new WebConfigTransformRunnerSettings();
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 2
0
        /// <summary><p>This is a commandline tool to run an ASP.Net web.config tranformation.</p><p>For more details, visit the <a href="https://github.com/erichexter/WebConfigTransformRunner">official website</a>.</p></summary>
        public static IReadOnlyCollection <Output> WebConfigTransformRunner(Configure <WebConfigTransformRunnerSettings> configurator = null)
        {
            var toolSettings = configurator.InvokeSafe(new WebConfigTransformRunnerSettings());
            var process      = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 3
0
        /// <summary><p>VSWhere is designed to be a redistributable, single-file executable that can be used in build or deployment scripts to find where Visual Studio - or other products in the Visual Studio family - is located.</p><p>For more details, visit the <a href="https://github.com/Microsoft/vswhere">official website</a>.</p></summary>
        public static (List <VSWhereResult> Result, IReadOnlyCollection <Output> Output) VSWhere(Configure <VSWhereSettings> configurator = null)
        {
            var toolSettings = configurator.InvokeSafe(new VSWhereSettings());
            var process      = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(GetResult(process, toolSettings), process.Output);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///   <p>VSWhere is designed to be a redistributable, single-file executable that can be used in build or deployment scripts to find where Visual Studio - or other products in the Visual Studio family - is located.</p>
        ///   <p>For more details, visit the <a href="https://github.com/Microsoft/vswhere">official website</a>.</p>
        /// </summary>
        /// <remarks>
        ///   <p>This is a <a href="http://www.nuke.build/docs/authoring-builds/cli-tools.html#fluent-apis">CLI wrapper with fluent API</a> that allows to modify the following arguments:</p>
        ///   <ul>
        ///     <li><c>-all</c> via <see cref="VSWhereSettings.All"/></li>
        ///     <li><c>-format</c> via <see cref="VSWhereSettings.Format"/></li>
        ///     <li><c>-latest</c> via <see cref="VSWhereSettings.Latest"/></li>
        ///     <li><c>-legacy</c> via <see cref="VSWhereSettings.Legacy"/></li>
        ///     <li><c>-nologo</c> via <see cref="VSWhereSettings.NoLogo"/></li>
        ///     <li><c>-prerelease</c> via <see cref="VSWhereSettings.Prerelease"/></li>
        ///     <li><c>-products</c> via <see cref="VSWhereSettings.Products"/></li>
        ///     <li><c>-property</c> via <see cref="VSWhereSettings.Property"/></li>
        ///     <li><c>-requires</c> via <see cref="VSWhereSettings.Requires"/></li>
        ///     <li><c>-requiresAny</c> via <see cref="VSWhereSettings.RequiresAny"/></li>
        ///     <li><c>-utf8</c> via <see cref="VSWhereSettings.UTF8"/></li>
        ///     <li><c>-version</c> via <see cref="VSWhereSettings.Version"/></li>
        ///   </ul>
        /// </remarks>
        public static (List <VSWhereResult> Result, IReadOnlyCollection <Output> Output) VSWhere(VSWhereSettings toolSettings = null)
        {
            toolSettings = toolSettings ?? new VSWhereSettings();
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(GetResult(process, toolSettings), process.Output);
        }
Ejemplo n.º 5
0
        /// <summary><p><c>Coverlet</c> is a cross platform code coverage library for .NET Core, with support for line, branch and method coverage.The <c>dotnet test</c> command is used to execute unit tests in a given project. Unit tests are console application projects that have dependencies on the unit test framework (for example, MSTest, NUnit, or xUnit) and the dotnet test runner for the unit testing framework. These are packaged as NuGet packages and are restored as ordinary dependencies for the project.</p><p>For more details, visit the <a href="https://github.com/tonerdo/coverlet/">official website</a>.</p></summary>
        public static IReadOnlyCollection <Output> Coverlet(Configure <CoverletSettings> configurator = null)
        {
            var toolSettings = configurator.InvokeSafe(new CoverletSettings());
            var process      = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///   <p>MSpec is called a 'context/specification' test framework because of the 'grammar' that is used in describing and coding the tests or 'specs'.</p>
        ///   <p>For more details, visit the <a href="https://github.com/machine/machine.specifications">official website</a>.</p>
        /// </summary>
        /// <remarks>
        ///   <p>This is a <a href="http://www.nuke.build/docs/authoring-builds/cli-tools.html#fluent-apis">CLI wrapper with fluent API</a> that allows to modify the following arguments:</p>
        ///   <ul>
        ///     <li><c>&lt;assemblies&gt;</c> via <see cref="MSpecSettings.Assemblies"/></li>
        ///     <li><c>--appveyor</c> via <see cref="MSpecSettings.AppVeyor"/></li>
        ///     <li><c>--html</c> via <see cref="MSpecSettings.HtmlOutput"/></li>
        ///     <li><c>--no-appveyor-autodetect</c> via <see cref="MSpecSettings.NoAppVeyor"/></li>
        ///     <li><c>--no-color</c> via <see cref="MSpecSettings.NoColor"/></li>
        ///     <li><c>--no-teamcity-autodetect</c> via <see cref="MSpecSettings.NoTeamCity"/></li>
        ///     <li><c>--progress</c> via <see cref="MSpecSettings.DottedProgress"/></li>
        ///     <li><c>--silent</c> via <see cref="MSpecSettings.Silent"/></li>
        ///     <li><c>--teamcity</c> via <see cref="MSpecSettings.TeamCity"/></li>
        ///     <li><c>--timeinfo</c> via <see cref="MSpecSettings.TimeInfo"/></li>
        ///     <li><c>--xml</c> via <see cref="MSpecSettings.XmlOutput"/></li>
        ///     <li><c>-f</c> via <see cref="MSpecSettings.Filters"/></li>
        ///     <li><c>-i</c> via <see cref="MSpecSettings.Includes"/></li>
        ///     <li><c>-x</c> via <see cref="MSpecSettings.Excludes"/></li>
        ///   </ul>
        /// </remarks>
        public static IReadOnlyCollection <Output> MSpec(MSpecSettings toolSettings = null)
        {
            toolSettings = toolSettings ?? new MSpecSettings();
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 7
0
        /// <summary>
        ///   <p>Manage resource provider features.</p>
        ///   <p>For more details, visit the <a href="https://docs.microsoft.com/en-us/cli/azure/feature?view=azure-cli-latest">official website</a>.</p>
        /// </summary>
        public static IReadOnlyCollection <Output> AzureFeatureRegister(AzureFeatureRegisterSettings toolSettings = null)
        {
            toolSettings = toolSettings ?? new AzureFeatureRegisterSettings();
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 8
0
        public static DotCoverAnalyseSettings SetTestAction(this DotCoverAnalyseSettings toolSettings, Action testAction)
        {
            var capturedStartInfo = ProcessTasks.CaptureProcessStartInfo(testAction);

            return(toolSettings
                   .SetTargetExecutable(capturedStartInfo.ToolPath)
                   .SetTargetArguments(capturedStartInfo.Arguments)
                   .SetTargetWorkingDirectory(capturedStartInfo.WorkingDirectory));
        }
Ejemplo n.º 9
0
        public static OpenCoverSettings SetTestAction(this OpenCoverSettings toolSettings, Action testAction)
        {
            var capturedStartInfo = ProcessTasks.CaptureProcessStartInfo(testAction);

            return(toolSettings
                   .SetTargetPath(capturedStartInfo.ToolPath)
                   .SetTargetArguments(capturedStartInfo.Arguments)
                   .SetTargetDirectory(capturedStartInfo.WorkingDirectory));
        }
Ejemplo n.º 10
0
        private static int PushPackage(string nupkgPath)
        {
            Logger.Info("Pushing {0}", nupkgPath);
            var pt = ProcessTasks.StartProcess("choco", $"push {nupkgPath}").AssertWaitForExit();

            Logger.Success("Pushed: {0}", pt.ExitCode);

            return(pt.ExitCode);
        }
Ejemplo n.º 11
0
    public Angular(AbsolutePath path, string command)
    {
        var npmRunSetting = new NpmRunSettings()
                            .SetEnvironmentVariable("npm_config_loglevel", "error")
                            .SetWorkingDirectory(path)
                            .SetCommand(command);

        Process = ProcessTasks.StartProcess((ToolSettings)npmRunSetting);
    }
Ejemplo n.º 12
0
        /// <summary>
        ///   <p>GitLink makes symbol servers obsolete which saves you both time with uploading source files with symbols and the user no longer has to specify custom symbol servers (such as symbolsource.org). The advantage of GitLink is that it is fully customized for Git. It also works with GitHub or BitBucket urls so it does not require a local git repository to work. This makes it perfectly usable in continuous integration servers such as Continua CI. Updating all the pdb files is very fast. A solution with over 85 projects will be handled in less than 30 seconds. When using GitLink, the user no longer has to specify symbol servers. The only requirement is to ensure the check the Enable source server support option in Visual Studio.</p>
        ///   <p>For more details, visit the <a href="https://github.com/GitTools/GitLink/">official website</a>.</p>
        /// </summary>
        public static IReadOnlyCollection <Output> GitLink2(GitLink2Settings toolSettings = null)
        {
            toolSettings = toolSettings ?? new GitLink2Settings();
            PreProcess(ref toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
 /// <summary>
 ///   <p>The <c>dotnet fm list migrations</c> command is used to list applied and pending migrations.</p>
 ///   <p>For more details, visit the <a href="https://fluentmigrator.github.io/articles/runners/dotnet-fm.html#command-structure">official website</a>.</p>
 /// </summary>
 /// <remarks>
 ///   <p>This is a <a href="http://www.nuke.build/docs/authoring-builds/cli-tools.html#fluent-apis">CLI wrapper with fluent API</a> that allows to modify the following arguments:</p>
 ///   <ul>
 ///     <li><c>--connection</c> via <see cref="FluentMigratorSetting.ConnectionString"/></li>
 ///     <li><c>--no-connection</c> via <see cref="FluentMigratorSetting.NoConnectionString"/></li>
 ///     <li><c>--assembly</c> via <see cref="FluentMigratorSetting.Assembly"/></li>
 ///     <li><c>--namespace</c> via <see cref="FluentMigratorSetting.Namespace"/></li>
 ///     <li><c>--preview</c> via <see cref="FluentMigratorSetting.Preview"/></li>
 ///     <li><c>--profile</c> via <see cref="FluentMigratorSetting.Profile"/></li>
 ///     <li><c>--timeout</c> via <see cref="FluentMigratorSetting.Timeout"/></li>
 ///     <li><c>--output</c> via <see cref="FluentMigratorSetting.Output"/></li>
 ///     <li><c>--nested</c> via <see cref="FluentMigratorSetting.Nested"/></li>
 ///     <li><c>--working-directory</c> via <see cref="FluentMigratorSetting.WorkingDirectory"/></li>
 ///     <li><c>--tag</c> via <see cref="FluentMigratorSetting.Tag"/></li>
 ///     <li><c>--allow-breaking-changes</c> via <see cref="FluentMigratorSetting.AllowBreakingChanges"/></li>
 ///     <li><c>--processor</c> via <see cref="FluentMigratorSetting.Processor"/></li>
 ///     <li><c>--verbose</c> via <see cref="FluentMigratorSetting.Verbose"/></li>
 ///   </ul>
 /// </remarks>
 public static IReadOnlyCollection <Output> FluentMigratorListMigrations(FluentMigratorListMigrationsSetting toolSetting = null)
 {
     toolSetting = toolSetting ?? new FluentMigratorListMigrationsSetting();
     using (var process = ProcessTasks.StartProcess(toolSetting))
     {
         process.AssertZeroExitCode();
         return(process.Output);
     }
 }
Ejemplo n.º 14
0
        public void BuildNative()
        {
            AbsolutePath nativeProject = HactoolnetProject.Path.Parent / "hactoolnet_native.csproj";

            try
            {
                File.Copy(HactoolnetProject, nativeProject, true);
                DotNet("new nuget --force");

                XDocument doc = XDocument.Load(NugetConfig);
                doc.Element("configuration").Element("packageSources").Add(new XElement("add",
                                                                                        new XAttribute("key", "myget"), new XAttribute("value", DotNetFeedSource)));

                doc.Save(NugetConfig);

                DotNet($"add {nativeProject} package Microsoft.DotNet.ILCompiler --version 1.0.0-alpha-*");

                DotNetPublishSettings publishSettings = new DotNetPublishSettings()
                                                        .SetConfiguration(Configuration)
                                                        .SetProject(nativeProject)
                                                        .SetFramework("netcoreapp3.0")
                                                        .SetRuntime(NativeRuntime)
                                                        .SetOutput(CliNativeDir)
                                                        .SetProperties(VersionProps);

                if (!Untrimmed)
                {
                    publishSettings = publishSettings
                                      .AddProperty("RootAllApplicationAssemblies", false)
                                      .AddProperty("IlcGenerateCompleteTypeMetadata", false)
                                      .AddProperty("IlcGenerateStackTraceData", false)
                                      .AddProperty("IlcFoldIdenticalMethodBodies", true)
                    ;
                }

                DotNetPublish(publishSettings);

                if (EnvironmentInfo.IsUnix && !Untrimmed)
                {
                    ProcessTasks.StartProcess("strip", CliNativeExe).AssertZeroExitCode();
                }

                ZipFile(CliNativeZip, CliNativeExe, $"hactoolnet{NativeProgramExtension}");
                Logger.Normal($"Created {CliNativeZip}");

                if (Host == HostType.AppVeyor)
                {
                    PushArtifact(CliNativeZip);
                }
            }
            finally
            {
                File.Delete(nativeProject);
                File.Delete(NugetConfig);
            }
        }
Ejemplo n.º 15
0
        /// <summary><p>DocFX is an API documentation generator for .NET, and currently it supports C# and VB. It generates API reference documentation from triple-slash comments in your source code. It also allows you to use Markdown files to create additional topics such as tutorials and how-tos, and to customize the generated reference documentation. DocFX builds a static HTML website from your source code and Markdown files, which can be easily hosted on any web servers (for example, <em>github.io</em>). Also, DocFX provides you the flexibility to customize the layout and style of your website through templates. If you are interested in creating your own website with your own styles, you can follow <a href="http://dotnet.github.io/docfx/tutorial/howto_create_custom_template.html">how to create custom template</a> to create custom templates.</p><p>For more details, visit the <a href="https://dotnet.github.io/docfx/">official website</a>.</p></summary>
        public static void DocFxBuild(Configure <DocFxBuildSettings> configurator = null, ProcessSettings processSettings = null)
        {
            var toolSettings = configurator.InvokeSafe(new DocFxBuildSettings());

            PreProcess(toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings, processSettings);

            process.AssertZeroExitCode();
            PostProcess(toolSettings);
        }
Ejemplo n.º 16
0
        /// <summary><p>GitLink makes symbol servers obsolete which saves you both time with uploading source files with symbols and the user no longer has to specify custom symbol servers (such as symbolsource.org). The advantage of GitLink is that it is fully customized for Git. It also works with GitHub or BitBucket urls so it does not require a local git repository to work. This makes it perfectly usable in continuous integration servers such as Continua CI. Updating all the pdb files is very fast. A solution with over 85 projects will be handled in less than 30 seconds. When using GitLink, the user no longer has to specify symbol servers. The only requirement is to ensure the check the Enable source server support option in Visual Studio.</p><p>For more details, visit the <a href="https://github.com/GitTools/GitLink/">official website</a>.</p></summary>
        public static IReadOnlyCollection <Output> GitLink3(Configure <GitLink3Settings> configurator = null)
        {
            var toolSettings = configurator.InvokeSafe(new GitLink3Settings());

            PreProcess(ref toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
Ejemplo n.º 17
0
    private void RunCodeInRoot(string toolPath, string arguments)
    {
        var proc = ProcessTasks.StartProcess(toolPath,
                                             workingDirectory: RootDirectory,
                                             arguments: arguments
                                             );

        proc.WaitForExit();
        proc.AssertZeroExitCode();
    }
Ejemplo n.º 18
0
 public void Dispose()
 {
     if (File.Exists(Appcmd))
     {
         foreach (var appPoolName in this.appPoolNames)
         {
             ProcessTasks.StartProcess(Appcmd, @$ "START APPPOOL " "{appPoolName}" "").WaitForExit();
         }
     }
 }
Ejemplo n.º 19
0
        /// <summary><p>ReportGenerator converts XML reports generated by OpenCover, PartCover, dotCover, Visual Studio, NCover or Cobertura into human readable reports in various formats.</p><p>The reports do not only show the coverage quota, but also include the source code and visualize which lines have been covered.</p><p>ReportGenerator supports merging several reports into one. It is also possible to pass one XML file containing several reports to ReportGenerator (e.g. a build log file).</p><p>The following <a href="https://github.com/danielpalme/ReportGenerator/wiki/Output-formats">output formats</a> are supported by ReportGenerator:<ul><li>HTML, HTMLSummary, HTMLInline, HTMLChart, <a href="https://en.wikipedia.org/wiki/MHTML">MHTML</a></li><li>XML, XMLSummary</li><li>Latex, LatexSummary</li><li>TextSummary</li><li>CsvSummary</li><li>PngChart</li><li>Badges</li><li><a href="https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports">Custom reports</a></li></ul></p><p>Compatibility:<ul><li><a href="https://github.com/OpenCover/opencover">OpenCover</a></li><li><a href="https://github.com/sawilde/partcover.net4">PartCover 4.0</a></li><li><a href="http://sourceforge.net/projects/partcover">PartCover 2.2, 2.3</a></li><li><a href="https://www.jetbrains.com/dotcover/help/dotCover__Console_Runner_Commands.html">dotCover</a> (/ReportType=DetailedXML)</li><li>Visual Studio (<a href="https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe">vstest.console.exe</a>, <a href="https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#codecoverageexe">CodeCoverage.exe</a>)</li><li><a href="http://www.ncover.com/download/current">NCover</a> (tested version 1.5.8, other versions may not work)</li><li><a href="https://github.com/cobertura/cobertura">Cobertura</a></li><li>Mono (<a href="http://www.mono-project.com/docs/debug+profile/profile/profiler/#analyzing-the-profile-data">mprof-report</a>)</li></ul></p><p>For more details, visit the <a href="https://github.com/danielpalme/ReportGenerator">official website</a>.</p></summary>
        public static void ReportGenerator(Configure <ReportGeneratorSettings> configurator = null, ProcessSettings processSettings = null)
        {
            var toolSettings = configurator.InvokeSafe(new ReportGeneratorSettings());

            PreProcess(toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings, processSettings);

            process.AssertZeroExitCode();
            PostProcess(toolSettings);
        }
Ejemplo n.º 20
0
        /// <summary><p>Coveralls uploader for .Net Code coverage of your C# source code. Should work with any code files that get reported with the supported coverage tools, but the primary focus is CSharp.</p><p>For more details, visit the <a href="https://coverallsnet.readthedocs.io">official website</a>.</p></summary>
        public static void CoverallsNet(Configure <CoverallsNetSettings> configurator = null, ProcessSettings processSettings = null)
        {
            var toolSettings = configurator.InvokeSafe(new CoverallsNetSettings());

            PreProcess(toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings, processSettings);

            process.AssertZeroExitCode();
            PostProcess(toolSettings);
        }
        /// <summary><p>This is a commandline tool to run an ASP.Net web.config tranformation.</p><p>For more details, visit the <a href="https://github.com/erichexter/WebConfigTransformRunner">official website</a>.</p></summary>
        public static void WebConfigTransformRunner(Configure <WebConfigTransformRunnerSettings> configurator = null, ProcessSettings processSettings = null)
        {
            var toolSettings = configurator.InvokeSafe(new WebConfigTransformRunnerSettings());

            PreProcess(toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings, processSettings);

            process.AssertZeroExitCode();
            PostProcess(toolSettings);
        }
Ejemplo n.º 22
0
 private static IProcess StartProcess(GitSettings toolSettings, ProcessSettings processSettings)
 {
     return(ProcessTasks.StartProcess(
                toolSettings.ToolPath,
                toolSettings.Arguments,
                toolSettings.WorkingDirectory,
                processSettings?.EnvironmentVariables,
                processSettings?.ExecutionTimeout,
                processSettings?.RedirectOutput ?? false));
 }
Ejemplo n.º 23
0
        /// <summary><p>GitVersion is a tool to help you achieve Semantic Versioning on your project.</p><p>For more details, visit the <a href="http://gitversion.readthedocs.io/en/stable/">official website</a>.</p></summary>
        public static GitVersion GitVersion(Configure <GitVersionSettings> configurator = null, ProcessSettings processSettings = null)
        {
            var toolSettings = configurator.InvokeSafe(new GitVersionSettings());

            PreProcess(toolSettings);
            var process = ProcessTasks.StartProcess(toolSettings, processSettings);

            process.AssertZeroExitCode();
            PostProcess(toolSettings);
            return(GetResult(process, toolSettings, processSettings));
        }
Ejemplo n.º 24
0
        private static IReadOnlyCollection <Output> StartProcess([NotNull] ToolSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            var process = ProcessTasks.StartProcess(settings);

            process.AssertZeroExitCode();
            return(process.Output);
        }
    /// <summary>
    /// Placeholder for request handling and passing results to a watch action/event to prompt for pop-up notifications
    /// </summary>
    /// <param name="task"></param>
    /// <param name="identity"></param>
    /// <param name="properties"></param>
    /// <returns></returns>
    internal Identity ProcessRequest(ProcessTasks task, Identity identity, Dictionary <string, object> properties)
    {
        Identity retv = null;

        switch (task)
        {
        case ProcessTasks.VIEW:
            break;

        case ProcessTasks.CREATE:
            retv = Enjin.CreateIdentity(identity);
            if (retv != null)
            {
                EditorUtility.DisplayDialog("SUCCESS", "Identity " + retv.id + " has been created for app id " + retv.app_id + ".", "Ok");
            }
            else
            {
                EditorUtility.DisplayDialog("FAILURE", "Identity " + retv.id + " could not be created. Please see the Unity Console for the error returned.", "Ok");
            }

            RefreshLists();
            State = IdentityState.VIEW;
            break;

        case ProcessTasks.DELETE:
            break;

        case ProcessTasks.EDIT:
            if (CurrentIdentity.linking_code != "")
            {
                retv = Enjin.UpdateIdentity(CurrentIdentity);
            }
            else
            {
                retv = Enjin.UpdateIdentityFields(CurrentIdentity.id, CurrentIdentity.fields);
            }

            if (retv != null)
            {
                EditorUtility.DisplayDialog("SUCCESS", "Identity " + retv.id + " was updated successfully.", "Ok");
            }
            else
            {
                EditorUtility.DisplayDialog("FAILURE", "Identity " + retv.id + " could not be updated. Please see the Unity Console for the error returned.", "Ok");
            }

            RefreshLists();
            State = IdentityState.VIEW;
            break;
        }

        return(retv);
    }
Ejemplo n.º 26
0
    public IIS(params string[] appPoolNames)
    {
        if (File.Exists(Appcmd))
        {
            this.appPoolNames = appPoolNames;

            foreach (var appPoolName in this.appPoolNames)
            {
                ProcessTasks.StartProcess(Appcmd, @$ "STOP APPPOOL " "{appPoolName}" "").WaitForExit();
            }
        }
    }
Ejemplo n.º 27
0
        private bool MoveProjectStepB(VisualStudioProject project)
        {
            // Now add it back to project with new location
            string   addParam = Path.Combine(project.NewPath, project.Namecsproj);
            IProcess sln      = ProcessTasks.StartProcess(DotNetPath, "sln " + ExpectedSolutionPath + " add " + addParam, logOutput: true);

            sln.AssertWaitForExit();
            ControlFlow.Assert(sln.ExitCode == 0, "Failed to re-add Project: " + project.Name + " to solution so we could complete the move");

            Logger.Success("Project: {0} successfully relocated into proper new directory layout.", project.Name);
            return(true);
        }
Ejemplo n.º 28
0
 private static IProcess StartProcess(UnityBaseSettings unitySettings)
 {
     try
     {
         return(ProcessTasks.StartProcess(unitySettings));
     }
     catch (Exception)
     {
         AssertWatcherStopped();
         throw;
     }
 }
Ejemplo n.º 29
0
        private static IProcess StartProcess(OpenCoverSettings toolSettings, ProcessSettings processSettings = null)
        {
            var testAction        = toolSettings.TestAction.NotNull("testAction != null");
            var capturedStartInfo = ProcessTasks.CaptureProcessStartInfo(testAction);

            toolSettings = toolSettings
                           .SetTargetPath(capturedStartInfo.ToolPath)
                           .SetTargetArguments(capturedStartInfo.Arguments)
                           .SetTargetDirectory(capturedStartInfo.WorkingDirectory);

            return(ProcessTasks.StartProcess(toolSettings, processSettings));
        }
Ejemplo n.º 30
0
        private static void RunScript(string file, string arguments = null)
        {
            file = file.DoubleQuoteIfNeeded();

            var process = ProcessTasks.StartProcess(
                ScriptHost,
                EnvironmentInfo.IsWin
                    ? $"-File {file} {arguments}"
                    : $"{file} {arguments}");

            process.AssertZeroExitCode();
        }