当前位置: 首页>>代码示例>>C#>>正文


C# IIntegrationResult.IsInitial方法代码示例

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


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

示例1: Evaluate

 /// <summary>
 /// Performs the actual evaluation.
 /// </summary>
 /// <param name="result">The result.</param>
 /// <returns>
 /// <c>true</c> if the condition is true; <c>false</c> otherwise.
 /// </returns>
 protected override bool Evaluate(IIntegrationResult result)
 {
     LogDescriptionOrMessage("Checking last build status - matching to " + Status);
     if (result.IsInitial())
     {
         // There is no previous build - assume that the condition fails
         return false;
     }
     return Status == result.LastBuildStatus;
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:17,代码来源:LastBuildStatusTaskCondition.cs

示例2: Generate

 public string Generate(IIntegrationResult previousResult)
 {
     if (previousResult == null || previousResult.IsInitial())
     {
         return LabelPrefix + INITIAL_LABEL;
     }
     else if (ShouldIncrementLabel(previousResult))
     {
         return LabelPrefix + IncrementLabel(previousResult.Label);
     }
     else
     {
         return previousResult.Label;
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:15,代码来源:DefaultLabeller.cs

示例3: Evaluate

        /// <summary>
        /// Performs the actual evaluation.
        /// </summary>
        /// <param name="result">The result.</param>
        /// <returns>
        /// <c>true</c> if the condition is true; <c>false</c> otherwise.
        /// </returns>
        protected override bool Evaluate(IIntegrationResult result)
        {
            this.LogDescriptionOrMessage(
                "Checking last build time - checking build was at least " +
                (this.Time.Millis/1000) + "s ago");
            if (result.IsInitial())
            {
                // There is no previous build - assume that the condition passes
                return true;
            }

            var checkTime = DateTime.Now.AddMilliseconds(-this.Time.Millis);
            var isTrue = checkTime > result.LastIntegration.StartTime;
            return isTrue;
        }
开发者ID:BiYiTuan,项目名称:CruiseControl.NET,代码行数:22,代码来源:LastBuildTimeTaskCondition.cs

示例4: Generate

 public string Generate(IIntegrationResult previousResult)
 {
     if (previousResult == null || previousResult.Label == null || previousResult.IsInitial())
     {
         return NewLabel(InitialLabel);
     }
     else if (previousResult.Status == IntegrationStatus.Success)
     {
         return NewLabel(IncrementLabel(previousResult.Label));
     }
     else
     {
         return previousResult.Label;
     }
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:15,代码来源:IterationLabeller.cs

示例5: Generate

        public string Generate(IIntegrationResult resultFromLastBuild)
        {
            DateTime now = dateTimeProvider.Now;

            Version version = resultFromLastBuild.IsInitial()
                ? MakeDefaultVersion(now) : new Version(resultFromLastBuild.LastSuccessfulIntegrationLabel);

            int revision = version.Revision;
            if (now.Year == version.Major && now.Month == version.Minor && now.Day == version.Build)
            {
                revision += 1;
            }
            else
            {
                revision = 1;
            }
            return new Version(now.Year, now.Month, now.Day, revision).ToString();
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:18,代码来源:DateLabeller.cs


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