Class MemoryMapStream
A mapped file that is using a single stream.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.IO.Mapped
Assembly: Mars.IO.dll
Syntax
public class MemoryMapStream : MemoryMap, IDisposable
Constructors
| Improve this Doc View SourceMemoryMapStream()
Creates a new mapped stream using a memory stream.
Declaration
public MemoryMapStream()
MemoryMapStream(Stream)
Creates a new mapped stream.
Declaration
public MemoryMapStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read/write. |
Methods
| Improve this Doc View SourceDoCreateNewByte(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<byte> DoCreateNewByte(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Byte> |
Overrides
| Improve this Doc View SourceDoCreateNewDouble(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<double> DoCreateNewDouble(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Double> |
Overrides
| Improve this Doc View SourceDoCreateNewInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<short> DoCreateNewInt16(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Int16> |
Overrides
| Improve this Doc View SourceDoCreateNewInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<int> DoCreateNewInt32(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Int32> |
Overrides
| Improve this Doc View SourceDoCreateNewInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<long> DoCreateNewInt64(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Int64> |
Overrides
| Improve this Doc View SourceDoCreateNewSingle(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<float> DoCreateNewSingle(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.Single> |
Overrides
| Improve this Doc View SourceDoCreateNewUInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<ushort> DoCreateNewUInt16(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.UInt16> |
Overrides
| Improve this Doc View SourceDoCreateNewUInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<uint> DoCreateNewUInt32(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.UInt32> |
Overrides
| Improve this Doc View SourceDoCreateNewUInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<ulong> DoCreateNewUInt64(long position, long sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
Returns
Type | Description |
---|---|
MappedAccessor<System.UInt64> |
Overrides
| Improve this Doc View SourceDoCreateVariable<T>(Int64, Int64, MemoryMap.ReadFromDelegate<T>, MemoryMap.WriteToDelegate<T>)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<T> DoCreateVariable<T>(long position, long sizeInBytes, MemoryMap.ReadFromDelegate<T> readFrom, MemoryMap.WriteToDelegate<T> writeTo)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | The position to start at. |
System.Int64 | sizeInBytes | The size. |
MemoryMap.ReadFromDelegate<T> | readFrom | |
MemoryMap.WriteToDelegate<T> | writeTo |
Returns
Type | Description |
---|---|
MappedAccessor<T> |
Type Parameters
Name | Description |
---|---|
T |
Overrides
Mars.Common.IO.Mapped.MemoryMap.DoCreateVariable<T>(System.Int64, System.Int64, Mars.Common.IO.Mapped.MemoryMap.ReadFromDelegate<T>, Mars.Common.IO.Mapped.MemoryMap.WriteToDelegate<T>)
Implements
System.IDisposable