Skip to content

Instantly share code, notes, and snippets.

@5up3rman
Created May 8, 2017 18:40
Show Gist options
  • Save 5up3rman/fe6ff232f45219d417ab4d3d37c51bf8 to your computer and use it in GitHub Desktop.
Save 5up3rman/fe6ff232f45219d417ab4d3d37c51bf8 to your computer and use it in GitHub Desktop.
Live Photo Render Element
using System;
using System.IO;
namespace Paragon.Foundation.LivePhoto.HtmlHelpers
{
public class RenderElement : IDisposable
{
private readonly TextWriter _writer;
private readonly string _firstPart;
private readonly string _lastPart;
public RenderElement(TextWriter writer, string firstPart, string lastPart)
{
_writer = writer;
_firstPart = firstPart;
_lastPart = lastPart;
_writer.Write(_firstPart);
}
public void Dispose()
{
_writer.Write(_lastPart);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment