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); } } }
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); } } }
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)); }