/// <summary> /// Returns true if ReduceWarningInfo instances are equal /// </summary> /// <param name="input">Instance of ReduceWarningInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(ReduceWarningInfo input) { if (input == null) { return(false); } return (( WarningCode == input.WarningCode || WarningCode.Equals(input.WarningCode) ) && ( PageNumber == input.PageNumber || PageNumber.Equals(input.PageNumber) ) && ( PageImageNumber == input.PageImageNumber || PageImageNumber.Equals(input.PageImageNumber) ) && ( ExtWarningMessage == input.ExtWarningMessage || (ExtWarningMessage != null && ExtWarningMessage.Equals(input.ExtWarningMessage)) )); }
// General warnings // Note that the warningNumber corresponds to an HRESULT in src\inc\corerror.xml public static void WriteWarning(string message, WarningCode warningCode) { if (!CheckSilent((int)warningCode)) { String warningFormat = "TlbImp : warning TI{1:0000} : {0}"; Console.Error.WriteLine(warningFormat, message, (int)warningCode); } }
// warnings 70** internal static Diagnostic LoadWarning(WarningCode code, IEnumerable <string> args, string source) => new Diagnostic { Severity = DiagnosticSeverity.Warning, Code = Warnings.Code(code), Source = source, Message = DiagnosticItem.Message(code, args ?? Enumerable.Empty <string>()), Range = null };
/// <summary> /// Logs a a diagnostic message based on the given warning code, /// with the given source as the file for which the error occurred. /// </summary> public void Log(WarningCode code, IEnumerable <string> args, string source = null, LSP.Range range = null) => this.Log(new Diagnostic { Severity = DiagnosticSeverity.Warning, Code = Warnings.Code(code), Source = source, Message = DiagnosticItem.Message(code, args ?? Enumerable.Empty <string>()), Range = range });
public static string GetFriendlyWarningCode(WarningCode code) { switch (code) { case WarningCode.RedundantStatement: return("Redundant statement."); default: return(code + "."); } }
public void AddWarning(WarningCode warningCode, string info) { // TODO: make number of maximum warnings configureable if (_warnings.Count >= MaximumWarningCount) throw new CodeGeneratorException(ErrorCode.TooManyWarnings); if (info == null || info == string.Empty) info = "No Info"; // should not occur string warningText = string.Format("OBLXW{0:d4}: {1}: {2}", (int)warningCode, warningCode.ToString(), info); if (! _warnings.Contains(warningText)) _warnings.Add(warningText); }
/// <summary> /// Given a warningcode, this returns a user-friendly message. /// </summary> /// <param name="Entry"></param> /// <returns></returns> public static string GetFriendlyWarningMessage(WarningCode Entry) { switch (Entry) { case WarningCode.RedundantStatement: return("Redundant statement."); case WarningCode.AssignToLiteral: return("Attempted to assign to a literal."); default: return(Entry.ToString() + "."); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; hashCode = hashCode * 59 + WarningCode.GetHashCode(); hashCode = hashCode * 59 + PageNumber.GetHashCode(); hashCode = hashCode * 59 + PageImageNumber.GetHashCode(); if (ExtWarningMessage != null) { hashCode = hashCode * 59 + ExtWarningMessage.GetHashCode(); } return(hashCode); } }
public void AddWarning(WarningCode warningCode, string info) { // TODO: make number of maximum warnings configureable if (_warnings.Count >= MaximumWarningCount) { throw new CodeGeneratorException(ErrorCode.TooManyWarnings); } if (info == null || info == string.Empty) { info = "No Info"; // should not occur } string warningText = string.Format("OBLXW{0:d4}: {1}: {2}", (int)warningCode, warningCode.ToString(), info); if (!_warnings.Contains(warningText)) { _warnings.Add(warningText); } }
/// <summary> /// Dids the occur warning. /// </summary> /// <param name="engine">Engine.</param> /// <param name="warningCode">Warning code.</param> public override void DidOccurWarning(AgoraRtcEngineKit engine, WarningCode warningCode) { Console.WriteLine($"DidOccurWarning: {warningCode}"); }
public void ReportEvent(WarningCode code, string eventMsg) { m_resolver.ReportEvent(ImporterEventKind.NOTIF_CONVERTWARNING, (int)code, eventMsg); }
public static string Code(this WarningCode code) => Warning((int)code);
protected Diagnostic LoadWarning(Uri target, WarningCode code, params string[] args) => Warnings.LoadWarning(code, args, ProjectManager.MessageSource(target));
/// <summary> /// Given a warningcode, this returns a user-friendly message. /// </summary> /// <param name="Entry"></param> /// <returns></returns> public static string GetFriendlyWarningMessage(WarningCode Entry) { switch (Entry) { case WarningCode.RedundantStatement: return "Redundant statement."; case WarningCode.AssignToLiteral: return "Attempted to assign to a literal."; default: return Entry.ToString() + "."; } }
public ListEntry(string LineValue, string File, int LineNumber, ushort[] Output, ushort Address, WarningCode WarningCode) : this(LineValue, File, LineNumber, Output, Address) { this.Output = Output; this.WarningCode = WarningCode; }
public ListEntry( string LineValue, string File, int LineNumber, ushort[] Output, ushort Address, bool Listed, WarningCode WarningCode, bool lineIsExpanded ) : this(LineValue, File, LineNumber, Address, lineIsExpanded) { this.Output = Output; this.Listed = Listed; this.WarningCode = WarningCode; }
public ListEntry(string LineValue, string File, int LineNumber, ushort[] Output, ushort Address, WarningCode WarningCode, bool lineIsExpanded) : this(LineValue, File, LineNumber, Output, Address, lineIsExpanded) { this.Output = Output; this.WarningCode = WarningCode; }