Exemplo n.º 1
0
 public static ModelItem FindParent(EditingContext context, ModelItem childItem, ModelItem startingItem)
 {
     if (childItem == null)
     {
         throw new ArgumentNullException("childItem");
     }
     return(ModelParent.FindParent(context, childItem.ItemType, startingItem, childItem));
 }
Exemplo n.º 2
0
        public static ModelItem FindParent(Type childType, GestureData gestureData)
        {
            if (gestureData == null)
            {
                throw new ArgumentNullException("gestureData");
            }
            ModelItem targetModel = gestureData.TargetModel;

            if (targetModel == null)
            {
                return((ModelItem)null);
            }
            return(ModelParent.FindParent(gestureData.Context, childType, targetModel));
        }
Exemplo n.º 3
0
 public static void Parent(EditingContext context, ModelItem parentItem, ModelItem childItem)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (parentItem == null)
     {
         throw new ArgumentNullException("parentItem");
     }
     if (childItem == null)
     {
         throw new ArgumentNullException("childItem");
     }
     ModelParent.GetImplementation(context).Parent(parentItem, childItem);
 }
Exemplo n.º 4
0
 internal static ModelItem FindParent(EditingContext context, Type childType, ModelItem startingItem, ModelItem childItem)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (childType == null)
     {
         throw new ArgumentNullException("childType");
     }
     if (startingItem == null)
     {
         throw new ArgumentNullException("startingItem");
     }
     return(ModelParent.GetImplementation(context).FindParent(childType, startingItem, childItem));
 }
Exemplo n.º 5
0
        public static bool CanParent(EditingContext context, ModelItem parent, Type childType)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }
            if (childType == null)
            {
                throw new ArgumentNullException("childType");
            }
            ModelItem redirectedParent;

            return(ModelParent.GetImplementation(context).CanParent(parent, childType, (ModelItem)null, out redirectedParent));
        }
Exemplo n.º 6
0
 public static ModelItem FindParent(EditingContext context, Type childType, ModelItem startingItem)
 {
     return(ModelParent.FindParent(context, childType, startingItem, (ModelItem)null));
 }