Beispiel #1
0
        public override IEnumerable <ModelItem> Find(ModelItem startingItem, Type type)
        {
            if (startingItem == null)
            {
                throw FxTrace.Exception.AsError(new ArgumentNullException("startingItem"));
            }

            if (type == null)
            {
                throw FxTrace.Exception.AsError(new ArgumentNullException("type"));
            }
            Fx.Assert(!type.IsValueType, "hmm why would some one search for modelitems for value types?");
            return(ModelTreeManager.Find(startingItem, delegate(ModelItem modelItem)
            {
                return type.IsAssignableFrom(modelItem.ItemType);
            }, false));
        }
Beispiel #2
0
 public override IEnumerable <ModelItem> Find(ModelItem startingItem, Predicate <Type> match)
 {
     return(ModelTreeManager.Find(startingItem, delegate(ModelItem m) { return match(m.ItemType); }, false));
 }