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


C# AggregateException.GetBaseException方法代码示例

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


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

示例1: SimpleInnerExceptionTestCase

		public void SimpleInnerExceptionTestCase ()
		{
			var message = "Foo";
			var inner = new ApplicationException (message);
			var ex = new AggregateException (inner);

			Assert.IsNotNull (ex.InnerException);
			Assert.IsNotNull (ex.InnerExceptions);

			Assert.AreEqual (inner, ex.InnerException);
			Assert.AreEqual (1, ex.InnerExceptions.Count);
			Assert.AreEqual (inner, ex.InnerExceptions[0]);
			Assert.AreEqual (message, ex.InnerException.Message);
			Assert.AreEqual (inner, ex.GetBaseException ());
		}
开发者ID:Profit0004,项目名称:mono,代码行数:15,代码来源:AggregateExceptionTests.cs

示例2: OnDisconnectError

 private static void OnDisconnectError(AggregateException ex, object state)
 {
     ((TraceSource)state).TraceEvent(TraceEventType.Error, 0, "Failed to raise disconnect: " + ex.GetBaseException());
 }
开发者ID:Choulla-Naresh8264,项目名称:SignalR,代码行数:4,代码来源:TransportDisconnectBase.cs

示例3: OnKeepAliveError

 private static void OnKeepAliveError(AggregateException ex, object state)
 {
     ((TraceSource)state).TraceEvent(TraceEventType.Error, 0, "Failed to send keep alive: " + ex.GetBaseException());
 }
开发者ID:GaneshBachhao,项目名称:SignalR,代码行数:4,代码来源:TransportHeartBeat.cs

示例4: GetBaseWithInner

		public void GetBaseWithInner ()
		{
			var ae = new AggregateException ("x", new [] { new ArgumentException (), new ArgumentNullException () });
			Assert.AreEqual (ae, ae.GetBaseException (), "#1");

			var expected = new ArgumentException ();
			var ae2 = new AggregateException ("x", new AggregateException (expected, new Exception ()));
			Assert.AreEqual (expected, ae2.GetBaseException ().InnerException, "#2");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:AggregateExceptionTests.cs

示例5: OnDisconnectError

 private static void OnDisconnectError(AggregateException ex, object state)
 {
     ((ILogger)state).LogError("Failed to raise disconnect: " + ex.GetBaseException());
 }
开发者ID:FabianGosebrink,项目名称:ASPNET-Core-Angular2-SignalR-Typescript,代码行数:4,代码来源:TransportDisconnectBase.cs

示例6: OnKeepAliveError

 private static void OnKeepAliveError(AggregateException ex, object state)
 {
     ((ILogger)state).LogError("Failed to send keep alive: " + ex.GetBaseException());
 }
开发者ID:REALTOBIZ,项目名称:SignalR-Server,代码行数:4,代码来源:TransportHeartBeat.cs


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