/// <summary> /// Invoked when an error is emitted by the client. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> void Client_UnhandledException(object sender, RnetExceptionEventArgs args) { SynchronizationContext.Post(i => OnUnhandledException(args), null); }
/// <summary> /// Raises the Error event. /// </summary> /// <param name="args"></param> void OnUnhandledException(RnetExceptionEventArgs args) { Contract.Requires(args != null); if (UnhandledException != null) UnhandledException(this, args); }
/// <summary> /// Raises the UnhandledException event. /// </summary> /// <param name="args"></param> void OnUnhandledException(RnetExceptionEventArgs args) { Contract.Requires<ArgumentNullException>(args != null); Contract.Requires<NullReferenceException>(args.Exception != null); RnetTraceSource.Default.TraceInformation("RnetClient:OnUnhandledException ExceptionType={0}", args.Exception.GetType()); if (UnhandledException != null) UnhandledException(this, args); }