This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class TimeParser | |
{ | |
private const int MaxArrayLength = 4; | |
public static bool TryParse(string timeString, out TimeSpan time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using static System.IO.Path; | |
using static System.IO.Directory; | |
public struct PathInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IPEndPointFormatter : IJsonFormatter<IPEndPoint> | |
{ | |
public void Serialize(ref JsonWriter writer, IPEndPoint value, IJsonFormatterResolver formatterResolver) | |
{ | |
if (value == null) { writer.WriteNull(); return; } | |
formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, $"{value}", formatterResolver); | |
} | |
public IPEndPoint Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver) |