-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleMessageProcessor.cs
More file actions
39 lines (32 loc) · 1.23 KB
/
SimpleMessageProcessor.cs
File metadata and controls
39 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Microsoft.VisualStudio.CommandTable;
using System;
using System.Collections.Generic;
namespace VsctDecompile;
internal class SimpleMessageProcessor : IMessageProcessor {
public List<string> Errors { get; set; } = new();
public void Dependency(string file) {
// Handle dependency messages here
Console.WriteLine($"Dependency found: {file}");
}
public void Error(int error, string file, int line, int pos, string message) {
// Handle error messages here
Errors.Add(message);
Console.WriteLine($"Error {error} in file '{file}' at line {line}, position {pos}: {message}");
}
public bool VerboseOutput() {
// Return true if verbose output is enabled
return true;
}
public void Warning(int error, string file, int line, int pos, string message) {
// Handle warning messages here
Console.WriteLine($"Warning {error} in file '{file}' at line {line}, position {pos}: {message}");
}
public void WriteLine(string format, params object[] arg) {
// Handle general messages here
if (arg != null && arg.Length > 0) {
Console.WriteLine(format, arg);
} else {
Console.WriteLine(format);
}
}
}