Esempio n. 1
0
 public static ITypedElement CastAs(this ITypedElement focus, string typeName)
 {
     if (focus.Is(typeName))
     {
         return(focus);
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
 public static ITypedElement CastAs(this ITypedElement focus, string typeName)
 => focus.Is(typeName) ? focus : null;