public DocumentInfo OpenDocument(DocumentInfo document) { if (String.IsNullOrEmpty(document?.ToString())) return null; return new DocumentInfo() { Content = new FileStream(document.ToString(), FileMode.Open), Identification = new DocumentIdentification(document.ToString()) }; }
public DocumentInfo ResetDocument(DocumentInfo document) { if (String.IsNullOrEmpty(document?.ToString())) return null; if (File.Exists(document.ToString())) File.Delete(document.ToString()); return new DocumentInfo() { Content = new FileStream(document.ToString(), FileMode.OpenOrCreate), Identification = new DocumentIdentification(document.ToString()) }; }