Пример #1
0
        public unsafe UnsafeMutableRawBufferPointer(IntPtr start, nint count)
        {
            if (start == IntPtr.Zero)
                throw new ArgumentNullException(nameof(start));
            fixed(byte *thisDataPtr = StructMarshal.Marshaler.PrepareNominal(this))
            {
                IntPtr thisPtr = new IntPtr(thisDataPtr);

                NativeMethodsForUnsafeMutableRawBufferPointer.PI_UnsafeMutableRawBufferPointer(thisPtr, start, count);
            }
        }
Пример #2
0
 public unsafe byte this [int index] {
     get
     {
         fixed(byte *thisSwiftDataPtr = StructMarshal.Marshaler.PrepareNominal(this))
         {
             return(NativeMethodsForUnsafeMutableRawBufferPointer.PImethod_getAt((IntPtr)thisSwiftDataPtr, index));
         }
     }
     set
     {
         fixed(byte *thisSwiftDataPtr = StructMarshal.Marshaler.PrepareNominal(this))
         {
             NativeMethodsForUnsafeMutableRawBufferPointer.PImethod_setAt((IntPtr)thisSwiftDataPtr, index, value);
         }
     }
 }
Пример #3
0
 public static SwiftMetatype GetSwiftMetatype()
 {
     return(NativeMethodsForUnsafeMutableRawBufferPointer.PIMetadataAccessor_UnsafeMutableRawBufferPointer(SwiftMetadataRequest.Complete));
 }