private void Initialize(int errorCode, ExtensionErrorSeverity severity, int line, int column) { if (errorCode < 0) { throw new ArgumentOutOfRangeException("errorCode"); } _errorCode = errorCode; _severity = severity; _line = line; _column = column; }
/// <summary> /// Instantiates a new instance of <see cref="T:Microsoft.Data.Entity.Design.Extensibility.ExtensionError" />. /// </summary> /// <param name="message">The message that describes the error.</param> /// <param name="errorCode">The error code associated with the error.</param> /// <param name="severity">The severity of the error.</param> /// <param name="line">The line of the input or output document in which the error occurred.</param> /// <param name="column">The column of the input or output document in which the error occurred.</param> public ExtensionError(string message, int errorCode, ExtensionErrorSeverity severity, int line, int column) { _message = message; if (line < 0) { throw new ArgumentOutOfRangeException("line"); } if (column < 0) { throw new ArgumentOutOfRangeException("column"); } Initialize(errorCode, severity, line, column); }
/// <summary> /// Instantiates a new instance of <see cref="T:Microsoft.Data.Entity.Design.Extensibility.ExtensionError" />. /// </summary> /// <param name="message">The message that describes the error.</param> /// <param name="errorCode">The error code associated with the error.</param> /// <param name="severity">The severity of the error.</param> public ExtensionError(string message, int errorCode, ExtensionErrorSeverity severity) { _message = message; Initialize(errorCode, severity, -1, -1); }