public void WhatDoesDicOfDicLookLike() { IJsonSerializer jsonSerializer = new StandardJsonSerializer(); var argle = new ResourceBundleArgs { Text = new Dictionary <string, Dictionary <string, string> > { { "en-GB", new Dictionary <string, string>() { { "InfectedMessage", "You're possibly infected" } } }, { "nl-NL", new Dictionary <string, string> { { "InfectedMessage", "U bent mogelijk geïnfecteerd" } } } } }; var stuff = jsonSerializer.Serialize(argle); }
public static ResourceBundleContent ToContent(this ResourceBundleArgs args) => new ResourceBundleContent { Text = args.Text, IsolationPeriodDays = args.IsolationPeriodDays, ObservedTemporaryExposureKeyRetentionDays = args.ObservedTemporaryExposureKeyRetentionDays, TemporaryExposureKeyRetentionDays = args.TemporaryExposureKeyRetentionDays, };
private async Task Write(ResourceBundleArgs a4) { var e4 = new ResourceBundleContentEntity { Release = a4.Release }; await _Formatter.Fill(e4, a4.ToContent()); await _DbContextProvider.AddAsync(e4); }
public void WhatDoesDicOfDicLookLike() { var argle = new ResourceBundleArgs { Text = new Dictionary <string, Dictionary <string, string> > { { "en-GB", new Dictionary <string, string>() { { "InfectedMessage", "You're possibly infected" } } }, { "nl-NL", new Dictionary <string, string> { { "InfectedMessage", "U bent mogelijk geinvecteerd" } } } } }; var stuff = JsonConvert.SerializeObject(argle); }
public async Task <IActionResult> Post([FromBody] ResourceBundleArgs args, [FromServices] HttpPostResourceBundleCommand command) { return(await command.Execute(args)); }
public static ResourceBundleContent ToContent(this ResourceBundleArgs args) => new ResourceBundleContent { Text = args.Text, IsolationPeriodDays = args.IsolationPeriodDays, };