示例#1
0
        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())
            };
        }
示例#2
0
        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())
            };
        }