private void saveBuffer() // 保存缓存。 懒的进行集合运算了, 所以直接清空表 // 清空表 { Logger.Debug("开始保存缓存。"); var context = new StatisticsContext(); var buffer = context.Buffer.ToList(); Logger.Debug("保存缓存 -> 删除所有记录"); context.Buffer.RemoveRange(buffer); if (downServerIds.ToArray().Length > 0) { // 有数据可以缓存 Logger.Debug("保存缓存 -> 存在数据可以缓存"); foreach (var data in downServerList.ToArray()) { Logger.Debug("保存缓存 -> 缓存 id: " + data.id + ", 开始时间戳: " + data.startTS); var child = new buffer() { identification = data.id, startTS = data.startTS.ToString() }; context.Buffer.Add(child); } Logger.Debug("保存缓存 -> 保存变更"); context.SaveChanges(); Logger.Debug("保存缓存 -> 完成"); } }
public ss(io.RuneScanner rs = default, buffer buf = default, long count = default, bool atEOF = default, ssave ssave = default) { this.rs = rs; this.buf = buf; this.count = count; this.atEOF = atEOF; this.m_ssaveRef = new ptr <ssave>(ssave); }
public pp(buffer buf = default, reflect.Value value = default, fmt fmt = default, bool reordered = default, bool goodArgNum = default, bool panicking = default, bool erroring = default, bool wrapErrs = default, error wrappedErr = default) { this.buf = buf; this.value = value; this.fmt = fmt; this.reordered = reordered; this.goodArgNum = goodArgNum; this.panicking = panicking; this.erroring = erroring; this.wrapErrs = wrapErrs; this.wrappedErr = wrappedErr; }
public void DrawStage(buffer p_buffer) { int heightsize = m_CuurentStageInfo.GetLength(0); int widthsize = m_CuurentStageInfo.GetLength(1); //m_CuurentStageInfo = new Wall[heightsize, widthsize]; for (int y = 0; y < heightsize; y++) { for (int x = 0; x < widthsize; x++) { p_buffer.Draw(m_CuurentStageInfo[y, x].DrawAsciiCode, x, y); //if(m_CuurentStageInfo[y,x].WallType == ) } } //p_buffer.Draw("Test Draw", 0, 0); //Wall wallcls = new Wall(3); //Wall2 wallstuct = new Wall2(3); //Wall2[] wallarray = new Wall2[3] //{ // new Wall2() // ,new Wall2() // ,new Wall2() //}; //for (int i = 0; i < 3; i++) //{ // wallarray[i].m_val = 40; //} //foreach (Wall2 item in wallarray) //{ // item.m_val = 30; //} ////wallarray[0] = //wallcls.m_val = 7; // wallstuct.m_val = 5; // Wall tempwallcls = wallcls; // Wall2 tempwallstruct = wallstuct; // tempwallcls.m_val = 10; // tempwallstruct.m_val = 20; // // 10, 5, 10, 20 // Debug.Print("{0}, {1}, {2}, {3}", wallcls.m_val, tempwallcls.m_val // , wallstuct.m_val, tempwallstruct.m_val ); }
byte* buffer = stackalloc byte[8192]; // the size use with uname is platform specific; this should be large enough for any OS #endregion Fields #region Constructors if(uname(buffer) == 0) {
public void Send(buffer buffer) { this.Send(buffer.buf, 0, buffer.len); }
Initialize(width, height, buffer, bufferLength);
NtReadVirtualMemory(processHandle, address, buffer, buffer.Length, 0);
Decode(buffer, bufferLength);
var(buffer, offset, count) = copyTo;
// swap all the tags pinmodel.tags = UnsafeX.ReadTArray <Md3Tag>(buffer, pinmodel.ofsTags, pinmodel.numTags * pinmodel.numFrames);
Populate( buffer: buffer, frequency: carrierTone.frequency,
return new ByteArraySegment(buffer);
(long, long)[] positions = PreparePositionsOffsetLength(buffer, posCount);
void SET_16BIT_WORD(buffer, location, value) { buffer[location+0] = (byte)((value)&0xFF); \ buffer[location+1] = (byte)((value>>8)&0xFF); }
void SET_32BIT_WORD(buffer, location, value) { buffer[location+0] = (byte)((value)&0xFF); \ buffer[location+1] = (byte)((value>>8)&0xFF); \ buffer[location+2] = (byte)((value>>16)&0xFF); \ buffer[location+3] = (byte)((value>>24)&0xFF); }
ushort GET_16BIT_WORD(buffer, location) ( ((ushort)buffer[location+1]<<8) + (ushort)buffer[location+0] )
public TIMOverture(byte[] buffer, uint offset = 0) => _Init(buffer, offset);
MagicNum = new StructField <UInt32Data>("MagicNum", new UInt32Data(buffer, pos));
AddArguments(semanticModel, syntaxFacts, buffer, argumentList, cancellationToken);
=> Device?.DrawTexture(buffer, primitiveType, vertices.Select(v => (GraphicsPoint)v.vertex).ToArray(), color, vertices.Select(v => (GraphicsPoint)v.texCoord).ToArray());
public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length) => Initialize(buffer, offset, length, FileAccess.Read, false);
sliced[..indexOf].CopyTo(buffer[size..]);
public UnmanagedMemoryAccessor(SafeBuffer buffer, long offset, long capacity) => Initialize(buffer, offset, capacity, FileAccess.Read);
var(buffer, adjusted) = Get(index);
await _write.Writer.WriteAsync(buffer, cancellationToken) .ConfigureAwait(false);
public TIM_OVERTURE(byte[] buffer, uint offset = 0) : base() => _Init(buffer, offset);
/// <summary> /// Initializes a new instance of the <see cref="RadiusPacketAttribute"/> class. /// </summary> /// <param name="buffer">Buffer containing binary image to be used for initializing <see cref="RadiusPacketAttribute"/>.</param> /// <param name="startIndex">0-based starting index of initialization data in the <paramref name="buffer"/>.</param> /// <param name="length">Valid number of bytes in <paramref name="buffer"/> from <paramref name="startIndex"/>.</param> public RadiusPacketAttribute(byte[] buffer, int startIndex, int length) => ParseBinaryImage(buffer, startIndex, length);
public void DrawBullet(buffer p_buff) { p_buff.Draw("@", CurrentPos.X, CurrentPos.Y , (short)ConsoleColor.DarkMagenta); }
Initialize(width, height, buffer, copy);
public BinaryReader(byte[] buffer, int index, int length) => Reset(buffer, index, length);
TaskToApm.Begin(ReadAsync(buffer, offset, count, default), callback, state);
DoEncrypt(buffer, offset - VerificationConstant.Length, VerificationConstant.Length);
return(TrimAndTakeMessageHeaders(buffer, trailers, out consumed, out examined));
// Get the entry. ref Entry entry = ref AcquireEntry(buffer, attr);