コード例 #1
0
 /// <summary>
 /// Perform cleanup/finalization steps on StreamPath
 /// </summary>
 /// <remarks>
 /// MemoryStream previously created by GetWriteStream should now be populated with data from source file, and
 /// can now be used to stream attachment to SMTP server
 /// </remarks>
 public override async Task FinalizeWrite(StreamPath streampath)
 {
     streampath.stream.Position = 0;             // Rewind MemoryStream to start of data
     await smtp.SendEmail(messageSubject : streampath.path,
                          messageBody : "Your file is attached",
                          messageTo : config.location,
                          attachment : streampath.stream,
                          attachmentName : streampath.path);
 }
コード例 #2
0
 /// <summary>
 /// Perform cleanup/finalization steps on StreamPath (not required)
 /// </summary>
 public override async Task FinalizeWrite(StreamPath streampath)
 {
 }
コード例 #3
0
 public abstract Task FinalizeWrite(StreamPath streampath);