Ejemplo n.º 1
0
        public override void AcceptVisitor(IMappingModelVisitor visitor)
        {
            visitor.ProcessCollection(this);

            if (Key != null)
            {
                visitor.Visit(Key);
            }

            if (Index != null && (Collection == Collection.Array || Collection == Collection.List || Collection == Collection.Map))
            {
                visitor.Visit(Index);
            }

            if (Element != null)
            {
                visitor.Visit(Element);
            }

            if (CompositeElement != null)
            {
                visitor.Visit(CompositeElement);
            }

            if (Relationship != null)
            {
                visitor.Visit(Relationship);
            }

            foreach (var filter in Filters)
            {
                visitor.Visit(filter);
            }

            if (Cache != null)
            {
                visitor.Visit(Cache);
            }
        }