/// <summary> /// Concrete response for Interface replies /// </summary> /// <param name="input">The byte representation of the reply</param> public ItemResponse(byte[] input) { itemGroupObject = itemgroup.CreateBuilder().MergeFrom(input).Build(); data = new List<Item>(); foreach (item lab in itemGroupObject.ItemsList) { // data.Add(new Item(item.Text, item.TopLeftY, item.TopLeftX, item.Height, item.Width)); data.Add(new Item(lab.Quantity, lab.Volume, lab.Data.Text, lab.Meta, lab.Data.Width, lab.Data.Height, lab.Data.TopLeftX, lab.Data.TopLeftY)); Console.WriteLine(lab.Data.Text); Console.WriteLine(lab.Quantity); Console.WriteLine(lab.Volume); Console.WriteLine(lab.Meta); Console.WriteLine(lab.Data.TopLeftX); Console.WriteLine(lab.Data.TopLeftY); Console.WriteLine(lab.Data.Width); Console.WriteLine(lab.Data.Height); } }
/// <summary> /// Concrete response for Interface replies /// </summary> /// <param name="input">The byte representation of the reply</param> public ItemResponse(byte[] input) { itemGroupObject = itemgroup.CreateBuilder().MergeFrom(input).Build(); data = new List <Item>(); foreach (item lab in itemGroupObject.ItemsList) { // data.Add(new Item(item.Text, item.TopLeftY, item.TopLeftX, item.Height, item.Width)); data.Add(new Item(lab.Quantity, lab.Volume, lab.Data.Text, lab.Meta, lab.Data.Width, lab.Data.Height, lab.Data.TopLeftX, lab.Data.TopLeftY)); Console.WriteLine(lab.Data.Text); Console.WriteLine(lab.Quantity); Console.WriteLine(lab.Volume); Console.WriteLine(lab.Meta); Console.WriteLine(lab.Data.TopLeftX); Console.WriteLine(lab.Data.TopLeftY); Console.WriteLine(lab.Data.Width); Console.WriteLine(lab.Data.Height); } }