Пример #1
0
        public static HNID OfValue(BinaryData encodedData)
        {
            var hid = HID.OfValue(encodedData);

            if (hid.Type == Constants.NID_TYPE_HID)
            {
                return(new HNID(hid));
            }

            return(new HNID(NID.OfValue(encodedData)));
        }
Пример #2
0
        public static HNHDR OfValue(BinaryData encodedData)
        {
            var parser = BinaryDataParser.OfValue(encodedData);

            return
                (new HNHDR(
                     parser.TakeAndSkip(2).ToInt32(),
                     parser.TakeAndSkip(1).ToInt32(),
                     parser.TakeAndSkip(1).ToInt32(),
                     HID.OfValue(parser.TakeAndSkip(4)),
                     parser.TakeAndSkip(4)));
        }