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


C# Errors类代码示例

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


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

示例1: Convert

 public void Convert(ufDateNode node, Stream stream, bool multiples, Urls urls, Errors errors, bool reporting)
 {
     m_bReporting = reporting;
     m_oErrors = errors;
     m_oUrls = urls;
     Convert(node, stream, multiples);
 }
开发者ID:adampax,项目名称:UfXtract,代码行数:7,代码来源:ufDataToXml.cs

示例2: AssertSubtract

 void AssertSubtract(Row row, string excdColumn, string panColumn, string pctnColumn, string nexcdColumn, Errors errors)
 {
     if (row[excdColumn].ToLower() == "yes")
     {
         AssertSubtract(row, panColumn, pctnColumn, nexcdColumn, errors);
     }
 }
开发者ID:jakepearson,项目名称:cde-export,代码行数:7,代码来源:CoAltExceedNCount.cs

示例3: Test

 public override void Test(Row row, Errors errors)
 {
     AssertSum(row, "1YR_PS_GRAD_DSAG_PTS_EARN", new[] { "1YR_PS_GRAD_ELL_PTS_EARN", "1YR_PS_GRAD_IEP_PTS_EARN", "1YR_PS_GRAD_MIN_PTS_EARN", "1YR_PS_GRAD_FRL_PTS_EARN" }, errors);
     AssertSum(row, "1YR_PS_GRAD_DSAG_PTS_ELIG", new[] { "1YR_PS_GRAD_ELL_PTS_ELIG", "1YR_PS_GRAD_IEP_PTS_ELIG", "1YR_PS_GRAD_MIN_PTS_ELIG", "1YR_PS_GRAD_FRL_PTS_ELIG" }, errors);
     AssertSum(row, "3YR_PS_GRAD_DSAG_PTS_EARN", new[] { "3YR_PS_GRAD_ELL_PTS_EARN", "3YR_PS_GRAD_IEP_PTS_EARN", "3YR_PS_GRAD_MIN_PTS_EARN", "3YR_PS_GRAD_FRL_PTS_EARN" }, errors);
     AssertSum(row, "3YR_PS_GRAD_DSAG_PTS_ELIG", new[] { "3YR_PS_GRAD_ELL_PTS_ELIG", "3YR_PS_GRAD_IEP_PTS_ELIG", "3YR_PS_GRAD_MIN_PTS_ELIG", "3YR_PS_GRAD_FRL_PTS_ELIG" }, errors);
 }
开发者ID:jperdue,项目名称:cde-export,代码行数:7,代码来源:DisaggregatedGraduationRateRollupPoints.cs

示例4: When_ToString_is_called_and_the_errors_are_not_initialized_then_the_result_contains_an_empty_string

        public void When_ToString_is_called_and_the_errors_are_not_initialized_then_the_result_contains_an_empty_string()
        {
            var errors = new Errors();

            var errorsString = errors.ToString();
            Assert.IsTrue(string.IsNullOrEmpty(errorsString));
        }
开发者ID:Plasma,项目名称:Ewk.SoundCloud,代码行数:7,代码来源:ErrorTests.cs

示例5: Add_Test2_Adding_string

 public void Add_Test2_Adding_string()
 {
     Errors target = new Errors();
     string newError = "Test";
     target.Add(newError);
     Assert.AreEqual(target[0].Message, newError);
 }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:7,代码来源:Errors_Tests.cs

示例6: CheckPointsEarned

        bool CheckPointsEarned(Row row, string percentPointsColumn, string pointsEligibleColumn, string pointsEarnedColumn, Errors errors)
        {
            if (!Defined(row, percentPointsColumn, errors) &&
                (!Defined(row, pointsEligibleColumn, errors) || !Defined(row, pointsEarnedColumn, errors)))
            {
                return true;
            }

            if (!AssertDefined(row, pointsEligibleColumn, errors) || !AssertDefined(row, pointsEarnedColumn, errors))
            {
                return false;
            }

            if(!Defined(row, percentPointsColumn, errors) && (row[pointsEligibleColumn] == "0" || row[pointsEarnedColumn] == "0"))
            {
                return true;
            }

            if (AssertDefined(row, new[] { percentPointsColumn, pointsEligibleColumn, pointsEarnedColumn }, errors))
            {
                var percentPoints = double.Parse(row[percentPointsColumn]);
                var pointsEligible = double.Parse(row[pointsEligibleColumn]);
                var pointsEarned = double.Parse(row[pointsEarnedColumn]);
                var pointsEarnedExpected = percentPoints * pointsEligible / 100.0;

                return AssertTrue(row, pointsEarnedExpected.Format() == pointsEarned.Format(), percentPointsColumn + ", " + pointsEligibleColumn + ", " + pointsEarnedColumn, errors);
            }
            return false;
        }
开发者ID:jakepearson,项目名称:cde-export,代码行数:29,代码来源:PercentOfPoints.cs

示例7: Add_Test1_Adding_string

 public void Add_Test1_Adding_string()
 {
     Errors target = new Errors(); 
     string newError = string.Empty; 
     target.Add(newError);
     Assert.AreEqual(target.Count,1);
 }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:7,代码来源:Errors_Tests.cs

示例8: AssertGreaterThan

 void AssertGreaterThan(Row row, string panColumn, string pctnColumn, string excdColumn, Errors errors)
 {
     if(row[excdColumn].ToLower() == "yes")
     {
         AssertGreaterThan(row, panColumn, pctnColumn, errors);
     }
 }
开发者ID:jperdue,项目名称:cde-export,代码行数:7,代码来源:CoAltOnePercentCapExceed.cs

示例9: AssertAGP

        bool AssertAGP(Row row, string madeAgpColumn, string ratingColumn, string mgpColumn, Errors errors)
        {
            if(!Defined(row, madeAgpColumn, errors) && !Defined(row, ratingColumn, errors) && !Defined(row, mgpColumn, errors))
            {
                return true;
            }

            if(AssertDefined(row, madeAgpColumn, errors))
            {
                var madeMgp = row[madeAgpColumn];
                Func<double, string> rating = null;
                if (madeMgp.ToLower() == "yes") rating = RatingYes;
                if (madeMgp.ToLower() == "no") rating = RatingNo;
                if(rating != null)
                {
                    return AssertRating(row, ratingColumn, mgpColumn, rating, errors);
                }
                else
                {
                    errors.Add(row, "Unknown Made MGP State (should be 'Yes' or 'No'):" + madeMgp, GetPrettyName());
                }

            }
            return false;
        }
开发者ID:jperdue,项目名称:cde-export,代码行数:25,代码来源:AcademicGrowthAndGrowthGapsRating.cs

示例10: ReportError

 internal void ReportError(ExplorerNode node, Errors error)
 {
     ErrorNode parent = (ErrorNode)this[error.ToString()];
     if (parent == null)
         parent = new ErrorNode(this, error.ToString(), getMessage(error));
     Activator.CreateInstance(node.GetType(), (ExplorerNode)parent, node);
 }
开发者ID:jijo-paulose,项目名称:bistro-framework,代码行数:7,代码来源:ErrorsNode.cs

示例11: AssertRating

 protected override bool AssertRating(Row row, string ratingColumn, string valueColumn, Func<double, string> ratingLookup, Errors errors, bool passIfBlank = false)
 {
     if(!Defined(row, valueColumn, errors) && !Defined(row, valueColumn, errors))
     {
         return true;
     }
     return base.AssertRating(row, ratingColumn, valueColumn, ratingLookup, errors, passIfBlank);
 }
开发者ID:jperdue,项目名称:cde-export,代码行数:8,代码来源:PostSecondaryGraduationRatingsAndDisaggregatedGraduationRateRatings.cs

示例12: Add_Test2_Adding_Non_Empty_Collection

        public void Add_Test2_Adding_Non_Empty_Collection()
        {
            Errors target = new Errors();
            Errors newErrors = new Errors {"Test Error"};

            target.Add(newErrors);
            Assert.AreEqual(target.Count, 1);
        }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:8,代码来源:Errors_Tests.cs

示例13: Add_Test1_Adding_Empty_Collection

        public void Add_Test1_Adding_Empty_Collection()
        {
            Errors target = new Errors();
            Errors newErrors = new Errors();
 
            target.Add(newErrors);
            Assert.AreEqual(target.Count,0);
        }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:8,代码来源:Errors_Tests.cs

示例14: Test

        public override void Test(Row row, Errors errors)
        {
            var oneYear = new[] { "1YR_ACHIEVE_RATING", "1YR_GROWTH_RATING", "1YR_GRO_GAPS_RATING", "1YR_POST_SEC_RATING" };
            AssertRating(row, "1YR_INDICATOR_NCOUNT", oneYear, errors, GetIndicatorCount);

            var threeYear = new[] { "3YR_ACHIEVE_RATING", "3YR_GROWTH_RATING", "3YR_GRO_GAPS_RATING", "3YR_POST_SEC_RATING" };
            AssertRating(row, "3YR_INDICATOR_NCOUNT", threeYear, errors, GetIndicatorCount);
        }
开发者ID:jakepearson,项目名称:cde-export,代码行数:8,代码来源:IndicatorCount.cs

示例15: NotifyError

 /// <summary>
 /// Report errors to the subsriber.
 /// </summary>
 /// <param name="errors"></param>
 internal virtual void NotifyError(Errors errors)
 {
     EventHandler<ErrorArgs> handler = OnError;
     if (handler != null)
     {
         handler(this, new ErrorArgs(errors));
     }
 }
开发者ID:PyramidTechnologies,项目名称:netPyramid-RS-232,代码行数:12,代码来源:Events.cs


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