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
internal ErrorEventArgs (string message, Exception exc = null)
internal ErrorEventArgs (string message)
: this (message, null)
{
}
internal ErrorEventArgs (string message, Exception exception)
{
_message = message;
_exception = exc;
_exception = exception;
}
#endregion
@ -71,14 +76,17 @@ namespace WebSocketSharp
}
}
/// <summary>
/// Gets the exception.
/// </summary>
public Exception Exception {
/// <summary>
/// Gets the exception that caused the error.
/// </summary>
/// 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 {
return _exception;
}
}
}
#endregion
}