예제 #1
0
        internal unsafe void MarshalTo(Interop.SparseBufferMemoryBindInfo *pointer)
        {
            this.Buffer?.MarshalTo(&pointer->Buffer);

            //Binds
            if (this.Binds != null)
            {
                var fieldPointer = (Interop.SparseMemoryBind *)Interop.HeapUtil.AllocateAndClear <Interop.SparseMemoryBind>(this.Binds.Length);
                for (int index = 0; index < this.Binds.Length; index++)
                {
                    this.Binds[index].MarshalTo(&fieldPointer[index]);
                }
                pointer->Binds = fieldPointer;
            }
            else
            {
                pointer->Binds = null;
            }
            pointer->BindCount = (uint)(this.Binds?.Length ?? 0);
        }
예제 #2
0
 internal SparseBufferMemoryBindInfo(Interop.SparseBufferMemoryBindInfo* ptr)
 {
     m = ptr;
     Initialize ();
 }
예제 #3
0
 public SparseBufferMemoryBindInfo()
 {
     m = (Interop.SparseBufferMemoryBindInfo*) Interop.Structure.Allocate (typeof (Interop.SparseBufferMemoryBindInfo));
     Initialize ();
 }