示例#1
0
 public HandlerAxis(IHandlerAxis handler, TraversingAxis axis)
 {
     if (handler == null)
     {
         throw new ArgumentNullException(nameof(handler));
     }
     _handler = handler;
     _axis    = axis;
 }
示例#2
0
 public static IHandlerAxis DescendantReverse(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.DescendantReverse));
 }
示例#3
0
 public static IHandlerAxis Ancestor(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.Ancestor));
 }
示例#4
0
 public static IHandlerAxis Sibling(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.Sibling));
 }
示例#5
0
 public static IHandlerAxis Child(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.Child));
 }
示例#6
0
 public static IHandlerAxis Root(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.Root));
 }
示例#7
0
 public static IHandler Publish(this IHandlerAxis handler)
 {
     return(handler.SelfDescendant().Notify());
 }
示例#8
0
 public static IHandlerAxis Axis(
     this IHandlerAxis handler, TraversingAxis axis)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, axis));
 }
示例#9
0
 public static IHandlerAxis SelfDescendant(this IHandlerAxis handler)
 {
     return(handler == null ? null
          : new HandlerAxis(handler, TraversingAxis.SelfOrDescendant));
 }