public ApplicationSettingsDataMixin Load(JsonContent jsonContent) { var settings = JsonConvert.DeserializeObject<ApplicationSettingsDataMixin>(jsonContent.Value); return settings; }
internal DiagramDataDto LoadDto(JsonContent jsonContent) { var diagramDto = JsonConvert.DeserializeObject<DiagramDataDto>(jsonContent.Value); return diagramDto; }
private void LoadFile() { // load content from json source var content = System.IO.File.ReadAllText(_fileName.Value); var jsonContent = new JsonContent(content); new JsonSerializer().Load(jsonContent, _diagram); // fire event that view models have updated _messageSystem.Publish(_diagram.Classifiers, new ClassifiersResetEvent()); }
/// <summary> /// loads the given data in json format and stores it in the given classifier dictionary /// </summary> public void Load(JsonContent jsonContent,Diagram diagram) { var toDomainConverter = new DomainDtoConverter(); var diagramDto = LoadDto(jsonContent); toDomainConverter.ToDomain(diagram, diagramDto); }