[code-watcher] Add CodeWatcherMode option.

There are three option values:
- Disabled: module does nothing (wow).
- Remove: module removes matching messages and sends temporary message
          to instruct user what to do.
- Upload: module uploads detected code to configured Haste Server.
This commit is contained in:
Andriy
2023-07-28 16:53:01 +03:00
parent 1d313d5271
commit 5471b412d9
8 changed files with 134 additions and 10 deletions
+3 -6
View File
@@ -5,13 +5,10 @@ public static class StringExtension
// https://stackoverflow.com/a/23408020
public static IEnumerable<string> SplitToLines(this string input)
{
using (var reader = new StringReader(input))
using var reader = new StringReader(input);
while (reader.ReadLine() is { } line)
{
string line;
while ((line = reader.ReadLine()) != null)
{
yield return line;
}
yield return line;
}
}
}