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