Skip to content

Commit

Permalink
Variable renaming in Multipart.WriteTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Sep 13, 2021
1 parent 9c42eeb commit c96710a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions MimeKit/Multipart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,17 +442,17 @@ public override void Prepare (EncodingConstraint constraint, int maxLineLength =

if (cancellable != null) {
for (int i = 0; i < children.Count; i++) {
var msg = children[i] as MessagePart;
var rfc822 = children[i] as MessagePart;
var multi = children[i] as Multipart;
var part = children[i] as MimePart;

cancellable.Write (boundary, 0, boundary.Length - 2, cancellationToken);
cancellable.Write (options.NewLineBytes, 0, options.NewLineBytes.Length, cancellationToken);
children[i].WriteTo (options, stream, false, cancellationToken);

if (msg != null && msg.Message != null && msg.Message.Body != null) {
multi = msg.Message.Body as Multipart;
part = msg.Message.Body as MimePart;
if (rfc822 != null && rfc822.Message != null && rfc822.Message.Body != null) {
multi = rfc822.Message.Body as Multipart;
part = rfc822.Message.Body as MimePart;
}

if ((part != null && part.Content == null) ||
Expand Down Expand Up @@ -550,17 +550,17 @@ public override void Prepare (EncodingConstraint constraint, int maxLineLength =
var boundary = Encoding.ASCII.GetBytes ("--" + Boundary + "--");

for (int i = 0; i < children.Count; i++) {
var msg = children[i] as MessagePart;
var rfc822 = children[i] as MessagePart;
var multi = children[i] as Multipart;
var part = children[i] as MimePart;

await stream.WriteAsync (boundary, 0, boundary.Length - 2, cancellationToken).ConfigureAwait (false);
await stream.WriteAsync (options.NewLineBytes, 0, options.NewLineBytes.Length, cancellationToken).ConfigureAwait (false);
await children[i].WriteToAsync (options, stream, false, cancellationToken).ConfigureAwait (false);

if (msg != null && msg.Message != null && msg.Message.Body != null) {
multi = msg.Message.Body as Multipart;
part = msg.Message.Body as MimePart;
if (rfc822 != null && rfc822.Message != null && rfc822.Message.Body != null) {
multi = rfc822.Message.Body as Multipart;
part = rfc822.Message.Body as MimePart;
}

if ((part != null && part.Content == null) ||
Expand Down

0 comments on commit c96710a

Please sign in to comment.