public string SerializeCommandHistoryList(CommandHistoryList commandHistoryList) { if (commandHistoryList == null) { throw new ArgumentNullException(nameof(commandHistoryList)); } return(System.Text.Json.JsonSerializer.Serialize(new CommandHistoryListDto() { Commands = commandHistoryList.Commands.ToList() })); }
public async Task SetCommandHistoryList(CommandHistoryList commandHistoryList) { await LocalStorageRepository.SetItem(LocalStorageCommandHistoryList, new ConfigSerializer().SerializeCommandHistoryList(commandHistoryList)); }