|
| 1 | +// <auto-generated/> |
| 2 | +#nullable disable |
| 3 | + |
| 4 | +using Foo; |
| 5 | + |
| 6 | +namespace ExpressiveSharp.Generated |
| 7 | +{ |
| 8 | + static partial class Foo_Entity |
| 9 | + { |
| 10 | + // [Expressive] |
| 11 | + // public string TrendLabel => Trend.ToString() ?? string.Empty; |
| 12 | + static global::System.Linq.Expressions.Expression<global::System.Func<global::Foo.Entity, string>> TrendLabel_Expression() |
| 13 | + { |
| 14 | + var p__this = global::System.Linq.Expressions.Expression.Parameter(typeof(global::Foo.Entity), "@this"); |
| 15 | + var expr_1 = global::System.Linq.Expressions.Expression.Property(p__this, typeof(global::Foo.Entity).GetProperty("Trend", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // Trend |
| 16 | + var expr_2 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); |
| 17 | + var expr_3 = global::System.Linq.Expressions.Expression.Constant(global::Foo.Trend.NoChange, typeof(global::Foo.Trend)); |
| 18 | + var expr_4 = global::System.Linq.Expressions.Expression.Convert(expr_3, typeof(global::Foo.Trend?)); |
| 19 | + var expr_5 = global::System.Linq.Expressions.Expression.Call(expr_4, typeof(global::Foo.Trend?).GetMethod("ToString", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { }, null), global::System.Array.Empty<global::System.Linq.Expressions.Expression>()); |
| 20 | + var expr_6 = global::System.Linq.Expressions.Expression.Equal(expr_1, expr_4); |
| 21 | + var expr_7 = global::System.Linq.Expressions.Expression.Condition(expr_6, expr_5, expr_2, typeof(string)); |
| 22 | + var expr_8 = global::System.Linq.Expressions.Expression.Constant(global::Foo.Trend.Decrease, typeof(global::Foo.Trend)); |
| 23 | + var expr_9 = global::System.Linq.Expressions.Expression.Convert(expr_8, typeof(global::Foo.Trend?)); |
| 24 | + var expr_10 = global::System.Linq.Expressions.Expression.Call(expr_9, typeof(global::Foo.Trend?).GetMethod("ToString", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { }, null), global::System.Array.Empty<global::System.Linq.Expressions.Expression>()); |
| 25 | + var expr_11 = global::System.Linq.Expressions.Expression.Equal(expr_1, expr_9); |
| 26 | + var expr_12 = global::System.Linq.Expressions.Expression.Condition(expr_11, expr_10, expr_7, typeof(string)); |
| 27 | + var expr_13 = global::System.Linq.Expressions.Expression.Constant(global::Foo.Trend.Increase, typeof(global::Foo.Trend)); |
| 28 | + var expr_14 = global::System.Linq.Expressions.Expression.Convert(expr_13, typeof(global::Foo.Trend?)); |
| 29 | + var expr_15 = global::System.Linq.Expressions.Expression.Call(expr_14, typeof(global::Foo.Trend?).GetMethod("ToString", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { }, null), global::System.Array.Empty<global::System.Linq.Expressions.Expression>()); |
| 30 | + var expr_16 = global::System.Linq.Expressions.Expression.Equal(expr_1, expr_14); |
| 31 | + var expr_17 = global::System.Linq.Expressions.Expression.Condition(expr_16, expr_15, expr_12, typeof(string)); |
| 32 | + var expr_18 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::Foo.Trend?)); |
| 33 | + var expr_19 = global::System.Linq.Expressions.Expression.Equal(expr_1, expr_18); |
| 34 | + var expr_20 = global::System.Linq.Expressions.Expression.Condition(expr_19, expr_2, expr_17, typeof(string)); |
| 35 | + var expr_21 = global::System.Linq.Expressions.Expression.Field(null, typeof(string).GetField("Empty", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static)); // string.Empty |
| 36 | + var expr_0 = global::System.Linq.Expressions.Expression.Coalesce(expr_20, expr_21); |
| 37 | + return global::System.Linq.Expressions.Expression.Lambda<global::System.Func<global::Foo.Entity, string>>(expr_0, p__this); |
| 38 | + } |
| 39 | + } |
| 40 | +} |
0 commit comments