Exemple #1
0
 public void Save(string path, T toscaObject)
 {
     using (var stream = fileSystem.File.Create(path))
     {
         serializer.Serialize(stream, toscaObject);
     }
 }
Exemple #2
0
        private void SaveMetadata(ToscaCloudServiceArchive toscaCloudServiceArchive, ZipArchive zipArchive)
        {
            var metadataEntry = zipArchive.CreateEntry(ToscaCloudServiceArchiveLoader.ToscaMetaFileName);

            metadataSerializer.Serialize(metadataEntry.Open(), toscaCloudServiceArchive.ToscaMetadata);
        }
Exemple #3
0
        private void SaveServiceTemplates(ZipArchive zipArchive, KeyValuePair <string, ToscaServiceTemplate> serviceTemplate)
        {
            var serviceTemplateEntry = zipArchive.CreateEntry(serviceTemplate.Key);

            serviceTemplateSerializer.Serialize(serviceTemplateEntry.Open(), serviceTemplate.Value);
        }