Esempio n. 1
0
 public static bool Is(this IElementNavigator focus, string typeName)
 {
     if (focus.IsTypeProvider())
     {
         return(focus.TypeName == typeName);     // I have no information about classes/subclasses
     }
     else
     {
         throw Error.InvalidOperation("Is operator is called on data which does not support ITypeNameProvider");
     }
 }
Esempio n. 2
0
        public static string ToString(IElementNavigator nav)
        {
            var result = "";

            if (nav.IsNamedNode())
            {
                result = nav.Name;
            }

            if (nav.IsTypeProvider())
            {
                result += ": " + nav.TypeName;
            }

            if (nav.Value != null)
            {
                result += " = " + nav.Value;
            }

            return(result);
        }