コード例 #1
0
 public static OpenCoverSettings ResetTargetSettings(this OpenCoverSettings toolSettings)
 {
     return(toolSettings
            .ResetTargetPath()
            .ResetTargetArguments()
            .ResetTargetDirectory());
 }
コード例 #2
0
 public static OpenCoverSettings SetTargetSettings(this OpenCoverSettings toolSettings, ToolSettings targetSettings)
 {
     return(toolSettings
            .SetTargetPath(targetSettings.ToolPath)
            .SetTargetArguments(targetSettings.GetArguments().RenderForExecution())
            .SetTargetDirectory(targetSettings.WorkingDirectory));
 }
コード例 #3
0
        public static OpenCoverSettings NewInstance(this OpenCoverSettings toolSettings)
        {
            var newToolSettings = toolSettings.NewInstance <OpenCoverSettings>();

            newToolSettings._testAction = toolSettings._testAction;
            return(newToolSettings);
        }
コード例 #4
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));
        }
コード例 #5
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));
        }
コード例 #6
0
 public static OpenCoverSettings SetTestAction(this OpenCoverSettings toolSettings, Action testAction)
 {
     toolSettings             = toolSettings.NewInstance();
     toolSettings._testAction = testAction;
     return(toolSettings);
 }