Ejemplo n.º 1
0
        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("保存缓存 -> 完成");
            }
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
        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 );
        }
Ejemplo n.º 5
0
                    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)
        {
Ejemplo n.º 6
0
 public void Send(buffer buffer)
 {
     this.Send(buffer.buf, 0, buffer.len);
 }
Ejemplo n.º 7
0
 Initialize(width, height, buffer, bufferLength);
Ejemplo n.º 8
0
 NtReadVirtualMemory(processHandle, address, buffer, buffer.Length, 0);
 Decode(buffer, bufferLength);
Ejemplo n.º 10
0
 var(buffer, offset, count) = copyTo;
Ejemplo n.º 11
0
 // swap all the tags
 pinmodel.tags = UnsafeX.ReadTArray <Md3Tag>(buffer, pinmodel.ofsTags, pinmodel.numTags * pinmodel.numFrames);
Ejemplo n.º 12
0
 Populate(
     buffer: buffer,
     frequency: carrierTone.frequency,
Ejemplo n.º 13
0
 return new ByteArraySegment(buffer);
Ejemplo n.º 14
0
 (long, long)[] positions = PreparePositionsOffsetLength(buffer, posCount);
Ejemplo n.º 15
0
	void SET_16BIT_WORD(buffer, location, value)	{ buffer[location+0] = (byte)((value)&0xFF); \
													  buffer[location+1] = (byte)((value>>8)&0xFF); }
Ejemplo n.º 16
0
	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); }
Ejemplo n.º 17
0
	ushort GET_16BIT_WORD(buffer, location)	( ((ushort)buffer[location+1]<<8) + (ushort)buffer[location+0] )
Ejemplo n.º 18
0
 public TIMOverture(byte[] buffer, uint offset = 0) => _Init(buffer, offset);
Ejemplo n.º 19
0
 MagicNum            = new StructField <UInt32Data>("MagicNum", new UInt32Data(buffer, pos));
Ejemplo n.º 20
0
 AddArguments(semanticModel, syntaxFacts, buffer, argumentList, cancellationToken);
Ejemplo n.º 21
0
 => 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);
Ejemplo n.º 23
0
 sliced[..indexOf].CopyTo(buffer[size..]);
Ejemplo n.º 24
0
 public UnmanagedMemoryAccessor(SafeBuffer buffer, long offset, long capacity) => Initialize(buffer, offset, capacity, FileAccess.Read);
Ejemplo n.º 25
0
 var(buffer, adjusted) = Get(index);
Ejemplo n.º 26
0
 await _write.Writer.WriteAsync(buffer, cancellationToken)
 .ConfigureAwait(false);
Ejemplo n.º 27
0
 public TIM_OVERTURE(byte[] buffer, uint offset = 0) : base() => _Init(buffer, offset);
Ejemplo n.º 28
0
 /// <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);
Ejemplo n.º 29
0
 public void DrawBullet(buffer p_buff)
 {
     p_buff.Draw("@", CurrentPos.X, CurrentPos.Y
                 , (short)ConsoleColor.DarkMagenta);
 }
Ejemplo n.º 30
0
 Initialize(width, height, buffer, copy);
Ejemplo n.º 31
0
 public BinaryReader(byte[] buffer, int index, int length) => Reset(buffer, index, length);
Ejemplo n.º 32
0
 TaskToApm.Begin(ReadAsync(buffer, offset, count, default), callback, state);
Ejemplo n.º 33
0
 DoEncrypt(buffer, offset - VerificationConstant.Length, VerificationConstant.Length);
Ejemplo n.º 34
0
 return(TrimAndTakeMessageHeaders(buffer, trailers, out consumed, out examined));
Ejemplo n.º 35
0
 // Get the entry.
 ref Entry entry = ref AcquireEntry(buffer, attr);