Add <.NET 4 compatible constructor and xml doc entry to ErrorEventArgs

This commit is contained in:
Frank Razenberg 2014-08-21 09:26:47 +02:00
parent 05f8db95b6
commit 9a8a018e65

View File

@ -49,10 +49,15 @@ namespace WebSocketSharp
#region Internal Constructors #region Internal Constructors
internal ErrorEventArgs (string message, Exception exc = null) internal ErrorEventArgs (string message)
: this (message, null)
{
}
internal ErrorEventArgs (string message, Exception exception)
{ {
_message = message; _message = message;
_exception = exc; _exception = exception;
} }
#endregion #endregion
@ -71,14 +76,17 @@ namespace WebSocketSharp
} }
} }
/// <summary> /// <summary>
/// Gets the exception. /// Gets the exception that caused the error.
/// </summary> /// </summary>
public Exception Exception { /// A <see cref="Exception"/> instance that represents the cause of the error,
/// or <see langword="null"/> if the error isn't due to an exception.
/// </value>
public Exception Exception {
get { get {
return _exception; return _exception;
} }
} }
#endregion #endregion
} }