Пример #1
0
        public SbeTableEncoder(int bufferSize = 4096)
        {
            _update    = new SbeTableUpdate();
            _byteArray = new byte[bufferSize];
            _buffer    = new DirectBuffer(_byteArray);
            _header    = new MessageHeader();

            // Jon skeet's delegeate to relfection hack https://msmvps.com/blogs/jon_skeet/archive/2008/08/09/making-reflection-fly-and-exploring-delegates.aspx
            var methodInfo = typeof(decimal).GetMethod("GetBytes", BindingFlags.Static | BindingFlags.NonPublic);

            _decimalGetBytes = (Action <decimal, byte[]>)Delegate.CreateDelegate(typeof(Action <decimal, byte[]>), methodInfo);
        }
Пример #2
0
 public SbeTableUpdate()
 {
     _parentMessage = this;
 }