Files
ICD.Common.Utils/ICD.Common.Utils/IO/IcdMemoryStream.cs
2018-08-27 17:32:18 -04:00

45 lines
762 B
C#

#if SIMPLSHARP
using Crestron.SimplSharp.CrestronIO;
#else
using System.IO;
#endif
namespace ICD.Common.Utils.IO
{
public sealed class IcdMemoryStream : IcdStream
{
public MemoryStream WrappedMemoryStream { get { return WrappedStream as MemoryStream; } }
/// <summary>
/// Constructor.
/// </summary>
public IcdMemoryStream()
: this(new MemoryStream())
{
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="memoryStream"></param>
public IcdMemoryStream(MemoryStream memoryStream)
: base(memoryStream)
{
}
public void Flush()
{
WrappedMemoryStream.Flush();
}
public void Close()
{
#if SIMPLSHARP
WrappedMemoryStream.Close();
#else
WrappedMemoryStream.Dispose();
#endif
}
}
}