aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Helpers
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-17 20:46:57 +0800
committer杨宇千 <crupest@outlook.com>2019-10-17 20:46:57 +0800
commitfa2a3282c51d831b25f374803301e75eac15d11c (patch)
treedc7688d7d2dd5ab28a7e3c553154ee84676f75d2 /Timeline/Helpers
parent21de8da2feab19d3fbc392e71bf0dcec25ec8d6b (diff)
downloadtimeline-fa2a3282c51d831b25f374803301e75eac15d11c.tar.gz
timeline-fa2a3282c51d831b25f374803301e75eac15d11c.tar.bz2
timeline-fa2a3282c51d831b25f374803301e75eac15d11c.zip
...
Diffstat (limited to 'Timeline/Helpers')
-rw-r--r--Timeline/Helpers/Log.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Timeline/Helpers/Log.cs b/Timeline/Helpers/Log.cs
index 123e8a8e..64391cd1 100644
--- a/Timeline/Helpers/Log.cs
+++ b/Timeline/Helpers/Log.cs
@@ -3,6 +3,7 @@ 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);
@@ -21,4 +22,22 @@ namespace Timeline.Helpers
return builder.ToString();
}
}
+
+ public static class Log
+ {
+ public static string Format(string summary, params (string, object)[] properties)
+ {
+ var builder = new StringBuilder();
+ builder.Append(summary);
+ foreach (var property in properties)
+ {
+ var (key, value) = property;
+ builder.AppendLine();
+ builder.Append(key);
+ builder.Append(" : ");
+ builder.Append(value);
+ }
+ return builder.ToString();
+ }
+ }
}