mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
Created S# .sln and moved project to src folder
This commit is contained in:
33
ICD.Common/Utils/IO/IcdStream.cs
Normal file
33
ICD.Common/Utils/IO/IcdStream.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
#else
|
||||
using System.IO;
|
||||
#endif
|
||||
|
||||
namespace ICD.Common.Utils.IO
|
||||
{
|
||||
public class IcdStream : IDisposable
|
||||
{
|
||||
private readonly Stream m_Stream;
|
||||
|
||||
public Stream WrappedStream { get { return m_Stream; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="stream"></param>
|
||||
public IcdStream(Stream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
throw new ArgumentNullException("stream");
|
||||
|
||||
m_Stream = stream;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
m_Stream.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user