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


C# Errors.ToString方法代码示例

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


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

示例1: 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

示例2: 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

示例3: CreateAndLogError

 /// <summary>
 /// Creates and Logs the error context information for the occurred error
 /// </summary>
 /// <param name="error">Error code</param>
 /// <param name="method">Method where the error occurred</param>
 /// <param name="additionalInfo">Additional information for the error</param>
 /// <param name="exception">Inner Exception</param>
 /// <param name="descriptionParameters">Description Parameters</param>
 /// <param name="additionalDescriptionParameters">Additional Description Parameters</param>
 /// <param name="shortName">Shortname of the business error occured for</param>
 /// <param name="arguments">Arguments to log of the method where the error occurred</param>
 /// <returns>Error context information</returns>
 public static ErrorContextInformation CreateAndLogError(Errors error, string method, string additionalInfo = null, Exception exception = null, 
     object[] descriptionParameters = null, object[] additionalDescriptionParameters = null, string shortName = "", params object[] arguments)
 {
     return new ErrorContextInformation(error.ToString(), error.GetDescription(descriptionParameters), method,
                                        additionalInformation: string.IsNullOrEmpty(additionalInfo)
                                                                   ? error.GetAdditionalDescription(additionalDescriptionParameters)
                                                                   : (additionalDescriptionParameters == null
                                                                          ? additionalInfo
                                                                          : string.Format(additionalInfo, additionalDescriptionParameters)),
                                        innerException: exception, shortName: shortName, arguments: arguments);
 }
开发者ID:ognjenm,项目名称:egle,代码行数:23,代码来源:ErrorFactory.cs

示例4: RequestException

 /// <summary>
 /// new
 /// </summary>
 /// <param name="error"></param>
 /// <param name="cmdName"></param>
 public RequestException(Errors error)
     : base(string.Concat("errorType:", error.ToString(),string.Empty))
 {
     this.Error = error;
 }
开发者ID:zhujunxxxxx,项目名称:FastNetwork,代码行数:10,代码来源:RequestException.cs

示例5: RequestException

 /// <summary>
 /// new
 /// </summary>
 /// <param name="error"></param>
 /// <param name="cmdName"></param>
 public RequestException(Errors error, string cmdName)
     : base(string.Concat("errorType:", error.ToString(), " cmdName:", cmdName ?? string.Empty))
 {
     this.Error = error;
 }
开发者ID:CMONO,项目名称:FastSocket.Net,代码行数:10,代码来源:RequestException.cs


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