/// <summary> /// Initializes a new instance of the <see cref="DiagnosticInfo"/> class. /// </summary> /// <param name="node">The syntax node with which the diagnostic is associated.</param> /// <param name="id">The diagnostic's identifier.</param> /// <param name="severity">The diagnostic's severity level.</param> /// <param name="location">The diagnostic's location relative to its node.</param> /// <param name="message">The diagnostic's message.</param> internal DiagnosticInfo(SyntaxNode node, DiagnosticID id, DiagnosticSeverity severity, TextSpan location, String message) { Contract.Require(node, nameof(node)); this.start = location.Start; this.length = location.Length; this.Node = node; this.ID = id; this.Severity = severity; this.Message = message; }
/// <summary> /// Initializes a new instance of the <see cref="DiagnosticInfo"/> class. /// </summary> /// <param name="node">The syntax node with which the diagnostic is associated.</param> /// <param name="id">The diagnostic's identifier.</param> /// <param name="severity">The diagnostic's severity level.</param> /// <param name="location">The diagnostic's location relative to its node.</param> /// <param name="message">The diagnostic's message.</param> internal DiagnosticInfo(SyntaxNode node, DiagnosticID id, DiagnosticSeverity severity, TextSpan location, String message) { Contract.Require(node, nameof(node)); this.start = location.Start; this.length = location.Length; this.Node = node; this.ID = id; this.Severity = severity; this.Message = message; }