public static List <ContainerMap> BuildFromMessage(Message message) { List <ContainerMap> reslist = new List <ContainerMap>(); for (int i = 0; i < message.ContainersLength; i++) { ContainerMap resStruct = null; var cont = message.Containers(i); if (cont.HasValue) { var contval = cont.Value; var created_at = DateTime.Parse(contval.CreatedAt); var bt = Session.Instance().GetBlockTypeByNameKey(Session.containerTypeName); long _order = 0; BlockAddress _fh_id = -1; BlockAddress _predecessor = -1; BlockAddress _successor = -1; resStruct = new ContainerMap(contval.Name, contval.CtId, bt, contval.ParentId, _order, _fh_id, _predecessor, _successor, created_at); reslist.Add(resStruct); } } return(reslist); }
/// <summary> /// Конструктор /// </summary> public ContainerNode(ContainerMap cMap) { this.cMap = cMap; }