1- using System ;
2- using System . Collections . Generic ;
3- using System . Linq ;
4- using System . Text ;
5- using System . Threading . Tasks ;
6- using System . Linq . Expressions ;
7- using static ExpressionToString . Tests . Functions ;
1+ using System . Linq . Expressions ;
82using static ExpressionToString . Tests . Categories ;
93using static System . Linq . Expressions . Expression ;
104using static ExpressionToString . Tests . Globals ;
5+ using System . Linq ;
116
127namespace ExpressionToString . Tests . Objects {
138 public static partial class FactoryMethods {
@@ -31,5 +26,41 @@ public static partial class FactoryMethods {
3126
3227 [ Category ( DebugInfos ) ]
3328 public static readonly Expression MakeClearDebugInfo = ClearDebugInfo ( document ) ;
29+
30+ [ Category ( Loops ) ]
31+ public static readonly Expression EmptyLoop = Loop ( Constant ( true ) ) ;
32+
33+ [ Category ( Loops ) ]
34+ public static readonly Expression EmptyLoop1 = Loop (
35+ Block (
36+ Constant ( true ) ,
37+ Constant ( true )
38+ )
39+ ) ;
40+
41+ [ Category ( Member ) ]
42+ public static readonly Expression InstanceMember = MakeMemberAccess (
43+ Constant ( "" ) ,
44+ typeof ( string ) . GetMember ( "Length" ) . Single ( )
45+ ) ;
46+
47+ [ Category ( Member ) ]
48+ public static readonly Expression StaticMember = MakeMemberAccess ( null , typeof ( string ) . GetMember ( "Empty" ) . Single ( ) ) ;
49+
50+ [ Category ( RuntimeVars ) ]
51+ public static readonly Expression ConstructRuntimeVariables = RuntimeVariables ( x , s1 ) ;
52+
53+ [ Category ( RuntimeVars ) ]
54+ public static readonly Expression RuntimeVariablesWithinBlock = Block (
55+ new [ ] { s2 } , //forces an explicit block
56+ Constant ( true ) ,
57+ RuntimeVariables ( x , s1 )
58+ ) ;
59+
60+ [ Category ( Defaults ) ]
61+ public static readonly Expression MakeDefaultRefType = Default ( typeof ( string ) ) ;
62+
63+ [ Category ( Defaults ) ]
64+ public static readonly Expression MakeDefaultValueType = Default ( typeof ( int ) ) ;
3465 }
3566}
0 commit comments