public ApplicationSettingsDataMixin Load(JsonContent jsonContent)
 {
     var settings = JsonConvert.DeserializeObject<ApplicationSettingsDataMixin>(jsonContent.Value);
     return settings;
 }
Пример #2
0
 internal DiagramDataDto LoadDto(JsonContent jsonContent)
 {
     var diagramDto = JsonConvert.DeserializeObject<DiagramDataDto>(jsonContent.Value);
     return diagramDto;
 }
Пример #3
0
 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());
 }
Пример #4
0
 /// <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);            
 }