mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-08 09:15:10 +00:00
45 lines
762 B
C#
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
|
|
}
|
|
}
|
|
}
|