BACSharp.Services.Confirmed.ReadPropertyMultiple.ReadObject C# (CSharp) Method

ReadObject() private method

private ReadObject ( byte apdu, int startIndex, int &len ) : bool
apdu byte
startIndex int
len int
return bool
        private bool ReadObject(byte[] apdu, int startIndex, ref int len)
        {
            bool res = false;
            if (apdu.Length - 1 > startIndex)
            {
                try
                {
                    var objectId = new BacNetObject(apdu, len, ref len);
                    ObjectList.Add(objectId);
                    res = true;
                }
                catch
                {
                    throw new Exception("Reject.Invalid_object_tag");
                }
            }
            return res;
        }