public static string LoadTemplate(string name, DateTimeOffset now, Uri baseUri) { using (var reader = new StreamReader(GetResource($"template{name}.json"))) { return(reader.ReadToEnd() .Replace("$SLEETVERSION$", AssemblyVersionHelper.GetVersion().ToFullVersionString()) .Replace("$BASEURI$", UriUtility.RemoveTrailingSlash(baseUri).AbsoluteUri.TrimEnd('/')) .Replace("$NOW$", now.GetDateString())); } }