Ejemplo n.º 1
0
    public static AsyncBag <PropertyValue> PropertyValueArrayParser(byte[] data, uint offset, uint length, DistributedConnection connection, uint[] requestSequence)//, bool ageIncluded = true)
    {
        var rt = new AsyncBag <PropertyValue>();


        ListParser(data, offset, length, connection, requestSequence).Then(x =>
        {
            var ar  = (object[])x;
            var pvs = new List <PropertyValue>();

            for (var i = 0; i < ar.Length; i += 3)
            {
                pvs.Add(new PropertyValue(ar[2], (ulong?)ar[0], (DateTime?)ar[1]));
            }


            rt.Trigger(pvs.ToArray());
        });

        return(rt);
    }