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

            return(lite is V ? (V)lite : (V)(object)lite.Retrieve());
        }
        public static V EntityLineValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property)
            where T : IModifiableEntity
        {
            var lite = lineContainer.EntityLine(property).GetLite();

            return(lite is V ? (V)lite : (V)(object)lite?.RetrieveAndRemember() !);
        }
Exemple #3
0
        public static V EntityLineValue <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.EntityLine(route, scope).LiteValue;

            return(lite is V ? (V)lite : (V)lite.Retrieve());
        }
Exemple #4
0
 public static void EntityLineValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property, V value)
     where T : ModifiableEntity
 {
     lineContainer.EntityLine(property).LiteValue = value as Lite <IEntity> ?? ((IEntity)value)?.ToLite();
 }
Exemple #5
0
        public static void EntityLineValue <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.EntityLine(route, scope).LiteValue = value as Lite <IEntity> ?? ((IEntity)value).ToLite();
        }
Exemple #6
0
        public static EntityLineProxy EntityLine <T>(this ILineContainer <T> container, Expression <Func <T, object> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

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