private void WriteDeliveryCacheProgressImpl(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, DeliveryCacheProgressImpl deliveryCacheProgress) { using (MemoryStream memory = new MemoryStream((int)ipcDesc.Size)) using (BinaryWriter bufferWriter = new BinaryWriter(memory)) { bufferWriter.WriteStruct(deliveryCacheProgress); context.Memory.Write((ulong)ipcDesc.Position, memory.ToArray()); } }
private void WriteClockSnapshotFromBuffer(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, ClockSnapshot clockSnapshot) { Debug.Assert(ipcDesc.Size == Marshal.SizeOf <ClockSnapshot>()); MemoryStream memory = new MemoryStream((int)ipcDesc.Size); using (BinaryWriter bufferWriter = new BinaryWriter(memory)) { bufferWriter.WriteStruct(clockSnapshot); } context.Memory.WriteBytes(ipcDesc.Position, memory.ToArray()); memory.Dispose(); }
private void WriteClockSnapshotFromBuffer(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, ClockSnapshot clockSnapshot) { MemoryHelper.Write(context.Memory, ipcDesc.Position, clockSnapshot); }
private long WriteDeliveryCacheProgressImpl(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, DeliveryCacheProgressImpl deliveryCacheProgress) { return(MemoryHelper.Write(context.Memory, ipcDesc.Position, deliveryCacheProgress)); }