예제 #1
0
 public static IEnumerable <T> FindNativeViewsByName <T>(this Services.ViewRenderService rendererService, string name)
 {
     foreach (var node in rendererService.NodesProcessed)
     {
         if (node.View.NativeObject is T && node.Node.name == name)
         {
             yield return((T)node.View.NativeObject);
         }
     }
 }
예제 #2
0
 public static IEnumerable <T> FindNativeViewsStartsWith <T>(this Services.ViewRenderService rendererService, string name, StringComparison stringComparison = StringComparison.InvariantCultureIgnoreCase)
 {
     foreach (var node in rendererService.NodesProcessed)
     {
         if (node.View.NativeObject is T && node.Node.name.StartsWith(name, stringComparison))
         {
             yield return((T)node.View.NativeObject);
         }
     }
 }
예제 #3
0
 public static T FindNativeViewByName <T>(this Services.ViewRenderService rendererService, string name)
 {
     foreach (var node in rendererService.NodesProcessed)
     {
         if (node.View.NativeObject is T && node.Node.name == name)
         {
             return((T)node.View.NativeObject);
         }
     }
     return(default(T));
 }