/// <summary> /// Gets the error message. /// </summary> /// <param name="errorCode">The error code.</param> /// <returns> /// The error message text. /// </returns> private static string GetErrorMessage(EventErrorCode errorCode) { string message = errorCodeToMessage.ContainsKey(errorCode) ? errorCodeToMessage[errorCode] : Unexpected; return(message); }
/// <summary> /// Initializes a new instance of the <see cref="EventException"/> class. /// </summary> /// <param name="errorCode">The error code.</param> public EventException(EventErrorCode errorCode) : base(GetErrorMessage(errorCode)) { this.ErrorCode = errorCode; }