Example #1
0
        public static V EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property)
            where T : ModifiableEntity
        {
            var lite = lineContainer.EntityCombo(property).LiteValue;

            return(lite is V ? (V)lite : (V)(object)lite.Retrieve());
        }
Example #2
0
        public static V EntityComboValue <T, V>(this ILineContainer <T> container, Expression <Func <T, V> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            var lite = container.EntityCombo(route, scope).LiteValue;

            return(lite is V ? (V)lite : (V)lite.Retrieve());
        }
Example #3
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property, V value, bool loseFocus = false)
            where T : ModifiableEntity
        {
            var combo = lineContainer.EntityCombo(property);

            combo.LiteValue = value as Lite <IEntity> ?? ((IEntity)value)?.ToLite();

            if (loseFocus)
            {
                lineContainer.Selenium.LoseFocus(lineContainer.Selenium.FindElement(combo.ComboLocator));
            }
        }
Example #4
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property, V value, bool loseFocus = false)
            where T : IModifiableEntity
        {
            var combo = lineContainer.EntityCombo(property);

            combo.LiteValue = value as Lite <IEntity> ?? ((IEntity?)value)?.ToLite();

            if (loseFocus)
            {
                combo.ComboElement.WrappedElement.LoseFocus();
            }
        }
Example #5
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> container, Expression <Func <T, V> > property, V value, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            container.EntityCombo(route, scope).LiteValue = value as Lite <IEntity> ?? ((IEntity)value).ToLite();
        }
Example #6
0
        public static EntityComboProxy EntityCombo <T>(this ILineContainer <T> container, Expression <Func <T, object> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            return(container.EntityCombo(route, scope));
        }