diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-24 16:56:41 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-24 16:56:41 +0800 |
commit | 89c106169bd2a16310fdaa6e0c48a3402d97de3a (patch) | |
tree | c8f5032f86d8a9e5df0117d438ea741cb0a4f613 /Timeline/Helpers | |
parent | b67a26248d5dde4c3909c29b92b8a182248bdcc1 (diff) | |
download | timeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.tar.gz timeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.tar.bz2 timeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.zip |
...
Diffstat (limited to 'Timeline/Helpers')
-rw-r--r-- | Timeline/Helpers/LanguageHelper.cs | 12 | ||||
-rw-r--r-- | Timeline/Helpers/Log.cs | 20 |
2 files changed, 12 insertions, 20 deletions
diff --git a/Timeline/Helpers/LanguageHelper.cs b/Timeline/Helpers/LanguageHelper.cs new file mode 100644 index 00000000..b0156b8b --- /dev/null +++ b/Timeline/Helpers/LanguageHelper.cs @@ -0,0 +1,12 @@ +using System.Linq;
+
+namespace Timeline.Helpers
+{
+ public static class LanguageHelper
+ {
+ public static bool AreSame(this bool firstBool, params bool[] otherBools)
+ {
+ return otherBools.All(b => b == firstBool);
+ }
+ }
+}
diff --git a/Timeline/Helpers/Log.cs b/Timeline/Helpers/Log.cs index 8deebf1d..68c975fa 100644 --- a/Timeline/Helpers/Log.cs +++ b/Timeline/Helpers/Log.cs @@ -3,26 +3,6 @@ using System.Text; namespace Timeline.Helpers
{
- // TODO! Remember to remove this after refactor.
- public static class MyLogHelper
- {
- public static KeyValuePair<string, object> Pair(string key, object value) => new KeyValuePair<string, object>(key, value);
-
- public static string FormatLogMessage(string summary, params KeyValuePair<string, object>[] properties)
- {
- var builder = new StringBuilder();
- builder.Append(summary);
- foreach (var property in properties)
- {
- builder.AppendLine();
- builder.Append(property.Key);
- builder.Append(" : ");
- builder.Append(property.Value);
- }
- return builder.ToString();
- }
- }
-
public static class Log
{
public static string Format(string summary, params (string, object?)[] properties)
|