Esempio n. 1
0
        internal byte Read(int p)
        {
            var args = pool.Pop();

            args.Position = p;
            args.Value    = data[p];

            BeforeRead?.Invoke(this, args);
            if (!Trust)
            {
                Spy.Protect.HealMe(this);
            }
            byte d = data[p];

            AfterRead?.Invoke(this, args);

            pool.Push(args);

            return(d);
        }
Esempio n. 2
0
 T[] IPointSource <T> .ReadPoints(ushort startAddress, ushort numberOfPoints)
 {
     BeforeRead?.Invoke(this, new PointEventArgs(startAddress, numberOfPoints));
     return(ReadPoints(startAddress, numberOfPoints));
 }