Exemplo n.º 1
0
            internal override Map OnAccess(View thisView)
            {
                // each of the children that already exist (either from the property sheet or the backing collection)
                // must have routes created for each of the routes in this container.

                // and then we hold onto the routes in case there are more elements added after this. ?
                if (Initializers != null && Initializers.Count > 0)
                {
                    lock (this) {
                        while (Initializers.Count > 0)
                        {
                            var childView = Initializers.Dequeue()();
                            if (childView != null)
                            {
                                if (childView._map is ElementMap)
                                {
                                    MergeElement(childView);
                                }
                                else
                                {
                                    MergeChild(thisView, childView);
                                }
                            }
                        }
                    }

                    // now, run the childinitializers over each child.

                    /*
                     * if (childInitializers != null) {
                     *  foreach (var key in Keys) {
                     *      var childItem = this[key];
                     *      foreach (var i in childInitializers) {
                     *          if (childItem._map.Initializers == null) {
                     *              childItem._map.Initializers = new Queue<ToRoute>();
                     *          }
                     *          if (!childItem._map.Initializers.Contains(i)) {
                     *              childItem._map.Initializers.Enqueue(i);
                     *          }
                     *      }
                     *  }
                     * }
                     * */
                }
                return(this);
            }