예제 #1
0
        public async Task UpdateAsync(Workflow value, CancellationToken cancellationToken)
        {
            EnsureWorkflowsDirectoryAsync();
            var data = await workflowSerializer.SerializeAsync(value, format, cancellationToken);

            var fileName = value.Metadata.Id;
            var path     = fileSystem.Path.Combine(rootDirectory, fileName);

            fileSystem.File.WriteAllText(path, data);
        }
예제 #2
0
        public async Task UpdateAsync(Workflow value, CancellationToken cancellationToken)
        {
            var data = await workflowSerializer.SerializeAsync(value, Format, cancellationToken);

            var fileName = value.Metadata.Id;
            var path     = fileName;

            using (var stream = data.ToStream())
            {
                await fileStore.CreateFileFromStream(path, stream, true);
            }
        }