Exemplo n.º 1
0
        private Guid[] GetChildrenByType(DObject obj, ChildrenType type)
        {
            var childIds = new Guid[0];

            switch (type)
            {
            case ChildrenType.All:
                childIds = obj.Children.Select(c => c.ObjectId).ToArray();
                break;

            case ChildrenType.ListView:
                childIds = obj.GetChildrenForListView(this).ToArray();
                break;

            case ChildrenType.TreeView:
                break;

            case ChildrenType.Storage:
                childIds = obj.GetChildrenForPilotStorage(this).ToArray();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }

            return(childIds);
        }