mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
39 lines
660 B
C#
39 lines
660 B
C#
using System;
|
|
#if SIMPLSHARP
|
|
using Crestron.SimplSharp.CrestronIO;
|
|
#else
|
|
using System.IO;
|
|
#endif
|
|
|
|
namespace ICD.Common.Utils.IO
|
|
{
|
|
public class IcdTextWriter : IDisposable
|
|
{
|
|
private readonly TextWriter m_TextWriter;
|
|
|
|
public TextWriter WrappedTextWriter { get { return m_TextWriter; } }
|
|
|
|
/// <summary>
|
|
/// Constructor.
|
|
/// </summary>
|
|
/// <param name="textWriter"></param>
|
|
protected IcdTextWriter(TextWriter textWriter)
|
|
{
|
|
if (textWriter == null)
|
|
throw new ArgumentNullException("textWriter");
|
|
|
|
m_TextWriter = textWriter;
|
|
}
|
|
|
|
~IcdTextWriter()
|
|
{
|
|
Dispose();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
m_TextWriter.Dispose();
|
|
}
|
|
}
|
|
}
|