Exemplo n.º 1
0
 public static TProperty GetLazyProperty <TUiItem, TProperty>(this IUIItem parent, ref TProperty field, string automationId, Func <TUiItem, TProperty> create, bool isMandatory = true)
     where TUiItem : IUIItem
 {
     if (field == null)
     {
         TUiItem item = parent.CustomGet <TUiItem>(SearchCriteria.ByAutomationId(automationId), null, null, isMandatory);
         field = create(item);
     }
     return(field);
 }