Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #6661: Moved content writing from Flush to new method FinalizeContent #8266

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -161,7 +161,8 @@ public void Compile(Stream stream, object content, TargetPlatform targetPlatform
{
using (var writer = new ContentWriter(this, stream, targetPlatform, targetProfile, compressContent, rootDirectory, referenceRelocationPath))
{
writer.WriteObject(content);
writer.WriteObject(content);
writer.FinalizeContent();
writer.Flush();
}
}
Expand Down
Expand Up @@ -118,14 +118,14 @@ protected override void Dispose(bool disposing)
}

base.Dispose(disposing);
}
}

/// <summary>
/// All content has been written, so now finalize the header, footer and anything else that needs finalizing.
/// </summary>
public override void Flush()
{
// Write shared resources to the end of body stream
/// </summary>
public void FinalizeContent()
{
// Write shared resources to the end of body stream
WriteSharedResources();

using (var contentStream = new MemoryStream())
Expand Down Expand Up @@ -172,8 +172,7 @@ public override void Flush()
if (compressedStream != null)
compressedStream.Dispose();
}
}
base.Flush();
}
}

/// <summary>
Expand Down