-
Notifications
You must be signed in to change notification settings - Fork 30
References
MilleBo edited this page Jan 18, 2017
·
1 revision
There are five different reference classes inside Testura.Code:
-
VariableReference
- A simple variable reference -
MemberReference
- A field or property on a class -
MethodReference
- A method on a class -
ConstantReference
- A simple value -
NullReference
- A null value
The most simple case is to use them seperatly, for example:
Statement.Decleration.Assign("testVariable", new VariableReference("myVariable")));
Which will give you:
testVariable = myVariable;
Bur you can also chain then, for example:
Statement.Decleration.Assign("testVariable", new VariableReference("myVariable", new MemberReference("MyProperty", new MethodReference("MyMethod")));
Which will give you:
testVariable = myVariable.MyProperty.MyMethod();