Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PositionPointer

unsafe byte* System.IO.UnmanagedMemoryStream.PositionPointer
getsetinherited

Definition at line 96 of file UnmanagedMemoryStream.cs.

97 {
98 get
99 {
100 if (_buffer != null)
101 {
102 throw new NotSupportedException(SR.NotSupported_UmsSafeBuffer);
103 }
105 long num = Interlocked.Read(ref _position);
106 if (num > _capacity)
107 {
108 throw new IndexOutOfRangeException(SR.IndexOutOfRange_UMSPosition);
109 }
110 return _mem + num;
111 }
112 set
113 {
114 if (_buffer != null)
115 {
116 throw new NotSupportedException(SR.NotSupported_UmsSafeBuffer);
117 }
119 if (value < _mem)
120 {
121 throw new IOException(SR.IO_SeekBeforeBegin);
122 }
123 long num = (long)value - (long)_mem;
124 if (num < 0)
125 {
126 throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_UnmanagedMemStreamLength);
127 }
129 }
130 }
static int Exchange(ref int location1, int value)
static long Read(ref long location)

Referenced by System.Resources.ResourceReader._LoadObjectV2(), System.Resources.ResourceReader._ReadResources(), System.Resources.ResourceReader.AllocateStringForNameIndex(), and System.Resources.ResourceReader.CompareStringEqualsName().