public void Save(string path, T toscaObject) { using (var stream = fileSystem.File.Create(path)) { serializer.Serialize(stream, toscaObject); } }
private void SaveMetadata(ToscaCloudServiceArchive toscaCloudServiceArchive, ZipArchive zipArchive) { var metadataEntry = zipArchive.CreateEntry(ToscaCloudServiceArchiveLoader.ToscaMetaFileName); metadataSerializer.Serialize(metadataEntry.Open(), toscaCloudServiceArchive.ToscaMetadata); }
private void SaveServiceTemplates(ZipArchive zipArchive, KeyValuePair <string, ToscaServiceTemplate> serviceTemplate) { var serviceTemplateEntry = zipArchive.CreateEntry(serviceTemplate.Key); serviceTemplateSerializer.Serialize(serviceTemplateEntry.Open(), serviceTemplate.Value); }