Created
May 8, 2017 18:40
-
-
Save 5up3rman/fe6ff232f45219d417ab4d3d37c51bf8 to your computer and use it in GitHub Desktop.
Live Photo Render Element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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