refactor(Pdf); rename OutputStream as ExportStream
- rename ToBytes extension method as ExportAsBytes
This commit is contained in:
parent
7964cc44fb
commit
94ce416aa1
@ -12,6 +12,6 @@ namespace EnvelopeGenerator.PdfEditor
|
||||
/// <typeparam name="TPdf"></typeparam>
|
||||
/// <param name="pdf"></param>
|
||||
/// <returns>A new byte array</returns>
|
||||
public static byte[] ToBytes<TPdf>(this TPdf pdf) where TPdf : Pdf<MemoryStream, MemoryStream> => pdf.OutputStream.ToArray();
|
||||
public static byte[] ExportAsBytes<TPdf>(this TPdf pdf) where TPdf : Pdf<MemoryStream, MemoryStream> => pdf.ExportStream().ToArray();
|
||||
}
|
||||
}
|
||||
@ -47,13 +47,10 @@ namespace EnvelopeGenerator.PdfEditor
|
||||
/// <returns>
|
||||
/// The <typeparamref name="TOutputStream"/> instance that contains the updated PDF bytes.
|
||||
/// </returns>
|
||||
public TOutputStream OutputStream
|
||||
public TOutputStream ExportStream()
|
||||
{
|
||||
get
|
||||
{
|
||||
_doc.Close();
|
||||
return _outputStream;
|
||||
}
|
||||
_doc.Close();
|
||||
return _outputStream;
|
||||
}
|
||||
|
||||
#region Edit methods
|
||||
|
||||
@ -234,7 +234,7 @@ public class EnvelopeController : ViewControllerBase
|
||||
canvas.FillStroke();
|
||||
});
|
||||
|
||||
doc.ByteData = pdf.ToBytes();
|
||||
doc.ByteData = pdf.ExportAsBytes();
|
||||
|
||||
ViewData["DocumentBytes"] = doc.ByteData;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user