protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } OnFileStreamSent(); var clostream = _uploadStream; _uploadPendingTask.ContinueWith(task => { clostream?.Dispose(); }).Wait(); if (_performAsSplitted) { var header = new HeaderFileContent { CreationDate = DateTime.Now, Name = _origfile.Name, Size = _origfile.Size, PublicKey = _cryptInfo?.PublicKey }; _cloud.UploadFileJson(_origfile.FullPath, header, true); } OnServerFileProcessed(); OnFileUploaded(_files); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } _uploadStream?.Dispose(); if (_performAsSplitted) { var header = new HeaderFileContent { CreationDate = DateTime.Now, Name = _origfile.Name, Size = _origfile.Size, PublicKey = _cryptInfo?.PublicKey }; _cloud.UploadFileJson(_origfile.FullPath, header, true); } OnFileUploaded(_files); }
public static void TryProcess(HeaderFileContent content, string line) => content.Comment = FileLoaderCommon.ConcatenateWithNewLine(content.Comment, line);
public void UpdateMissingKeysWithDefaultValues() => HeaderFileContent.UpdateMissingKeysWithDefaultValues();