• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IIntegrationResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IIntegrationResult的典型用法代码示例。如果您正苦于以下问题:C# IIntegrationResult类的具体用法?C# IIntegrationResult怎么用?C# IIntegrationResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IIntegrationResult类属于命名空间,在下文中一共展示了IIntegrationResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetSource

        public override void GetSource(IIntegrationResult result)
        {
            if (!_shim.AutoGetSource) return;
            Debug.Assert(_folderVersion > 0, "_folderVersion <= 0 when attempting to get source.  This shouldn't happen.");

            if (_shim.CleanCopy)
            {
                string cleanCopyWorkingFolder = null;
                if (StringUtil.IsBlank(_shim.WorkingDirectory))
                {
                    cleanCopyWorkingFolder = GetVaultWorkingFolder(result);
                    if (StringUtil.IsBlank(cleanCopyWorkingFolder))
                        throw new VaultException(
                            string.Format("Vault user {0} has no working folder set for {1} in repository {2} and no working directory has been specified.",
                                          _shim.Username, _shim.Folder, _shim.Repository));
                }
                else
                    cleanCopyWorkingFolder = result.BaseFromWorkingDirectory(_shim.WorkingDirectory);

                Log.Debug("Cleaning out source folder: " + cleanCopyWorkingFolder);
                new IoService().EmptyDirectoryIncludingReadOnlyObjects(cleanCopyWorkingFolder);
            }

            Log.Info("Getting source from Vault");
            Execute(GetSourceProcessInfo(result));
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:26,代码来源:Vault317.cs


示例2: GetSource

 public override void GetSource(IIntegrationResult result)
 {
     if (AutoGetSource && !UseHistory)
     {
         UpdateSource(result, null);
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:Cvs.cs


示例3: GetSource

 public void GetSource(IIntegrationResult result)
 {
     if (FailGetSource)
     {
         throw new System.Exception("Failing getting the source");
     }
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:7,代码来源:NullSourceControl.cs


示例4: Setup

        public void Setup()
        {
            this.mocks = new MockRepository();

            mockery = new Mockery();
            targetMock = mockery.NewDynamicMock(typeof(IIntegrationRunnerTarget));
            resultManagerMock = mockery.NewDynamicMock(typeof(IIntegrationResultManager));
            quietPeriodMock = mockery.NewDynamicMock(typeof(IQuietPeriod));

            runner = new IntegrationRunner((IIntegrationResultManager)resultManagerMock.MockInstance,
                                           (IIntegrationRunnerTarget)targetMock.MockInstance,
                                           (IQuietPeriod)quietPeriodMock.MockInstance);


            request = ModificationExistRequest();
            endTime = new DateTime(2005, 2, 1);
            modifications = new Modification[] { new Modification() };

            resultMock = mockery.NewDynamicMock(typeof(IIntegrationResult));
            resultMock.SetupResult("WorkingDirectory", TempFileUtil.GetTempPath("workingDir"));
            resultMock.SetupResult("ArtifactDirectory", TempFileUtil.GetTempPath("artifactDir"));
            resultMock.SetupResult("BuildProgressInformation", new ThoughtWorks.CruiseControl.Core.Util.BuildProgressInformation("",string.Empty));
            resultMock.SetupResult("IntegrationProperties", new Dictionary<string, string>());
            result = (IIntegrationResult)resultMock.MockInstance;

            lastResultMock = mockery.NewDynamicMock(typeof(IIntegrationResult));
            lastResult = (IIntegrationResult)lastResultMock.MockInstance;
        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:28,代码来源:IntegrationRunnerTest.cs


示例5: Run

 public void Run(IIntegrationResult result)
 {
     foreach (string mergeFile in MergeFiles)
     {
         string fullMergeFile = mergeFile;
         if (!Path.IsPathRooted(mergeFile))
         {
             fullMergeFile = Path.Combine(result.WorkingDirectory, mergeFile);
         }
         WildCardPath path = new WildCardPath(fullMergeFile);
         FileInfo[] files = path.GetFiles();
         foreach (FileInfo fileInfo in files)
         {
             Log.Info("Merging file: " + fileInfo);
             if (fileInfo.Exists)
             {
                 result.AddTaskResult((new FileTaskResult(fileInfo)));
             }
             else
             {
                 Log.Warning("File not Found: " + fileInfo);
             }
         }
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:25,代码来源:MergeFilesTask.cs


示例6: Run

 public void Run(IIntegrationResult result)
 {
     XmlSerializer serializer = new XmlSerializer(typeof (Modification[]));
     StringWriter writer = new Utf8StringWriter();
     serializer.Serialize(writer, result.Modifications);
     fileSystem.Save(ModificationFile(result), writer.ToString());
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:ModificationWriterTask.cs


示例7: LabelSourceControl

 public void LabelSourceControl(IIntegrationResult result)
 {
     var fileName = Path.Combine(
         Path.GetDirectoryName(this.FileName),
         DateTime.Now.ToString("yyyyMMddHHmmss") + ".label");
     File.WriteAllText(fileName, result.Label);
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:7,代码来源:IndexFileSourceControl.cs


示例8: LabelSourceControl

 public void LabelSourceControl(IIntegrationResult result)
 {
     foreach (ISourceControl sourceControl in SourceControls)
     {
         sourceControl.LabelSourceControl(result);
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:MultiSourceControl.cs


示例9: GetSource

 public void GetSource(IIntegrationResult result)
 {
     foreach (ISourceControl sourceControl in SourceControls)
     {
         sourceControl.GetSource(result);
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:MultiSourceControl.cs


示例10: GetSource

        public override void GetSource(IIntegrationResult result)
        {
            if (!_shim.AutoGetSource) return;

            _labelApplied = false;

            if (StringUtil.IsBlank(_shim.WorkingDirectory) && !(!_shim.ApplyLabel && _shim.UseVaultWorkingDirectory && !_shim.CleanCopy))
            {
                _shim.WorkingDirectory = GetVaultWorkingFolder(result);
                if (StringUtil.IsBlank(_shim.WorkingDirectory))
                    throw new VaultException(
                        string.Format("Vault user {0} has no working folder set for {1} in repository {2} and no working directory has been specified.",
                                      _shim.Username, _shim.Folder, _shim.Repository));
            }

            if (_shim.ApplyLabel)
            {
                Log.Info(string.Format("Applying label \"{0}\" to {1} in repository {2}.", result.Label, _shim.Folder, _shim.Repository));
                Execute(LabelProcessInfo(result));
                _labelApplied = true;
            }

            if (_shim.CleanCopy && !StringUtil.IsBlank(this._shim.WorkingDirectory))
            {
                Log.Debug("Cleaning out source folder: " + result.BaseFromWorkingDirectory(_shim.WorkingDirectory));
                new IoService().EmptyDirectoryIncludingReadOnlyObjects(result.BaseFromWorkingDirectory(_shim.WorkingDirectory));
            }

            Log.Info("Getting source from Vault");
            Execute(GetSourceProcessInfo(result, _shim.ApplyLabel));
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:31,代码来源:Vault3.cs


示例11: GetSource

 public override void GetSource(IIntegrationResult result)
 {
     if (!AutoGetSource) return;
     git_clean(result);
     if (git_log_local_hash(result) != null) git_reset(result);
     git_merge(result);
 }
开发者ID:alexscordellis,项目名称:ccnet.git.plugin,代码行数:7,代码来源:git.cs


示例12: AddLabelToTaskComment

 /// <summary>
 ///     Appends a text string to the task_description attribute to each task in
 ///     the current selection set.
 /// </summary>
 /// <param name="connection">CM Synergy connection parameters.</param>
 /// <param name="project">Properties of the integration testing project.</param>
 /// <param name="result">The change set for the current integration run</param>
 /// <returns>A non-null initialized process structure.</returns>
 public static ProcessInfo AddLabelToTaskComment(SynergyConnectionInfo connection, SynergyProjectInfo project, IIntegrationResult result)
 {
     const string template = @"task /modify /description ""Integrated Successfully with CruiseControl.NET project '{0}' build '{1}' on {2}"" ""{3}""";
     string tasks = GetTaskList(result.Modifications);
     string arguments = String.Format(template, result.ProjectName, result.Label, result.StartTime, tasks);
     return CreateProcessInfo(connection, arguments);
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:15,代码来源:SynergyCommandBuilder.cs


示例13: Run

        public void Run(IIntegrationResult result)
        {
            if (IntegrationStatus != result.Status) return;

            ICruiseManager manager = (ICruiseManager) remotingService.Connect(typeof(ICruiseManager), ServerUri);
            manager.ForceBuild(Project);
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:ForceBuildPublisher.cs


示例14: GetModifications

 public override Modification[] GetModifications(IIntegrationResult from, IIntegrationResult to)
 {
     _labelApplied = false;
     Log.Info(string.Format("Checking for modifications to {0} in Vault Repository \"{1}\" between {2} and {3}", _shim.Folder, _shim.Repository, from.StartTime, to.StartTime));
     ProcessResult result = ExecuteWithRetries(ForHistoryProcessInfo(from, to));
     return ParseModifications(result, from.StartTime, to.StartTime);
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:Vault3.cs


示例15: GetSource

        public override void GetSource(IIntegrationResult result)
        {
            result.BuildProgressInformation.SignalStartRunTask("Getting source from Vault");

            if (!_shim.AutoGetSource) return;
            if (_folderVersion <= 0)
            {
                throw new CruiseControlException("_folderVersion <= 0 when attempting to get source.  This shouldn't happen.");
            }

            if (_shim.CleanCopy)
            {
                string cleanCopyWorkingFolder = null;
                if (string.IsNullOrEmpty(_shim.WorkingDirectory))
                {
                    cleanCopyWorkingFolder = GetVaultWorkingFolder(result);
                    if (string.IsNullOrEmpty(cleanCopyWorkingFolder))
                        throw new VaultException(
                            string.Format("Vault user {0} has no working folder set for {1} in repository {2} and no working directory has been specified.",
                                          _shim.Username, _shim.Folder, _shim.Repository));
                }
                else
                    cleanCopyWorkingFolder = result.BaseFromWorkingDirectory(_shim.WorkingDirectory);

                Log.Debug("Cleaning out source folder: " + cleanCopyWorkingFolder);
                fileDirectoryDeleter.DeleteIncludingReadOnlyObjects(cleanCopyWorkingFolder);
            }

            Log.Info("Getting source from Vault");
            Execute(GetSourceProcessInfo(result));
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:31,代码来源:Vault317.cs


示例16: ToXml

 /// <summary>
 /// Convert the build results into XML.
 /// </summary>
 /// <param name="result">The build results.</param>
 /// <returns>The XML results.</returns>
 private static string ToXml(IIntegrationResult result)
 {
     StringWriter xmlResultString = new StringWriter();
     XmlIntegrationResultWriter writer = new XmlIntegrationResultWriter(xmlResultString);
     writer.Write(result);
     return xmlResultString.ToString();
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:12,代码来源:StatisticsBuilder.cs


示例17: BuildVersion

        internal static VersionInformation BuildVersion(string gitRevision, int gitCheckinCount, int major, int minor, IIntegrationResult resultFromLastBuild, bool incrementOnFailure)
        {
            var result = new VersionInformation();
            var hashes = gitRevision.Split('\n');
            result.GitCommitHash = hashes[0].Trim();
            result.GitParentHash = hashes[1].Trim();
            result.GitTreeHash = hashes[2].Trim();
            result.GitCheckinCount = gitCheckinCount;

            // major.minor.revision.rebuild
            const string format = "{0}.{1}.{2}.{3}";

            var rebuildNumber = 1;
            var previousVersion = resultFromLastBuild.LastSuccessfulIntegrationLabel;
            var parts = previousVersion.Split('.');

            int previousRebuildNumber = 0;
            int previousRevision = 0;
            if (parts.Length == 4)
            {
                int.TryParse(parts[3], out previousRebuildNumber);
                int.TryParse(parts[2], out previousRevision);
            }

            if (((resultFromLastBuild.LastIntegrationStatus == IntegrationStatus.Success) || incrementOnFailure) && (gitCheckinCount == previousRevision))
            {
                rebuildNumber = previousRebuildNumber + 1;
            }

            result.BuildCycleNumber = rebuildNumber;
            var assemblySafeLabel = string.Format(format, major, minor, gitCheckinCount, rebuildNumber);
            result.AssemblySafeLabel = assemblySafeLabel;

            return result;
        }
开发者ID:kezakez,项目名称:ccnet.GitRevisionLabeller.plugin,代码行数:35,代码来源:VersionAssembler.cs


示例18: GenerateSystemParameterValues

        /// <summary>
        /// Generates parameter values from the incoming request values.
        /// </summary>
        /// <param name="result">The result.</param>
        public void GenerateSystemParameterValues(IIntegrationResult result)
        {
            var props = result.IntegrationProperties;
            foreach (var property in props.Keys)
            {
                // Generate the build value
                var key = string.Format("${0}", property);
                var value = (props[property] ?? string.Empty).ToString();
                result.IntegrationRequest.BuildValues[key] = value;

                // Add to the parameters
                var namedValue = new NameValuePair(key, value);
                if (result.Parameters.Contains(namedValue))
                {
                    // Replace an existing value
                    var index = result.Parameters.IndexOf(namedValue);
                    result.Parameters[index] = namedValue;
                }
                else
                {
                    // Add a new value
                    result.Parameters.Add(namedValue);
                }
            }
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:29,代码来源:IntegrationRunner.cs


示例19: Run

        public void Run(IIntegrationResult result)
        {
            if (IntegrationStatus != result.Status && !IgnoreIntegrationStatus) return;

            if (IgnoreIntegrationStatus && result.Status == IntegrationStatus.Cancelled) return;

            result.BuildProgressInformation.SignalStartRunTask("Running for build publisher");

            var logger = Logger ?? new DefaultLogger();
            var loggedIn = false;
            logger.Debug("Generating client for url '{0}'", ServerUri);
            var client = factory.GenerateClient(ServerUri);
            if ((SecurityCredentials != null) && (SecurityCredentials.Length > 0))
            {
                logger.Debug("Logging in");
                client.Login(new List<NameValuePair>(SecurityCredentials));
                loggedIn = true;
            }

            ProjectIntegratorState remoteProjectStatus = ProjectIntegratorState.Unknown;

            foreach (var projectStatus in client.GetProjectStatus())
                if (projectStatus.Name == Project) remoteProjectStatus = projectStatus.Status;

            if (remoteProjectStatus != ProjectIntegratorState.Running) return;

            logger.Info("Sending ForceBuild request to '{0}' on '{1}'", Project, ServerUri);
            client.ForceBuild(Project, new List<NameValuePair>(Parameters ?? new NameValuePair[0]));
            if (loggedIn)
            {
                logger.Debug("Logging out");
                client.Logout();
            }
        }
开发者ID:atzedent,项目名称:ccnet.AltForceBuildPublisher.plugin,代码行数:34,代码来源:AltForceBuildPublisher.cs


示例20: ShouldRunBuild

        public bool ShouldRunBuild(IIntegrationResult result)
        {
            this.Result = result;
            bool IsRunnable;

            if (result.BuildCondition != BuildCondition.ForceBuild)
            {
                IsRunnable = this.CheckIfRunnable(this.Triggered);
                if (!IsRunnable)
                {
                    Log.Info("Trigger blocked by integration filter.");
                    return false;
                }
            }

            if (result.BuildCondition == BuildCondition.ForceBuild)
            {
                IsRunnable = this.CheckIfRunnable(this.Forced);
                if (!IsRunnable)
                {
                    Log.Info("Force blocked by integration filter.");
                    return false;
                }
            }

            return true;
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:27,代码来源:IntegrationFilter.cs



注:本文中的IIntegrationResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IInteractiveWindow类代码示例发布时间:2022-05-24
下一篇:
C# IIntStream类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap