mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
Removing Utils directory to better match namespaces
This commit is contained in:
38
ICD.Common.Utils/IO/IcdTextWriter.cs
Normal file
38
ICD.Common.Utils/IO/IcdTextWriter.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user