Exemplo n.º 1
0
        private DatacardModel CreateDatacardModel(string directory)
        {
            var id            = new DirectoryInfo(directory).Name;
            var jsonPath      = _datacardPath.GetJsonFilePath(id);
            var json          = _fileSystem.ReadAllText(jsonPath);
            var datacardModel = _serializer.Deserialize <DatacardModel>(json);

            return(new DatacardModel(id, datacardModel.Name));
        }
Exemplo n.º 2
0
        private void WriteDatacardJsonFile(string id, DatacardModel datacardModel)
        {
            var datacardPath = _datacardPath.GetJsonFilePath(id);

            _fileSystem.WriteAllText(datacardPath, _serializer.Serialize(datacardModel));
        }