public void WriteEntityBody(IEntityBodyTransformationStrategy transformationStrategy) { MemoryStream destination = new MemoryStream(); transformationStrategy.WriteEntityBody(destination); destination.Seek(0, SeekOrigin.Begin); if (destination.Length == 0) { return; } using (StreamReader sr = new StreamReader(destination)) { EntityBody = sr.ReadToEnd(); } }
public void WriteEntityBody(IEntityBodyTransformationStrategy transformationStrategy) { transformationStrategy.WriteEntityBody(response.OutputStream); }