Download
NJection is provided under
the following MIT license
This is the recommended version to use for your application.
For prevoius version you may see the Past Releases section.
In order to see the diffrence between releases you can expand the changes link attached
to each version.
If you've spotted some areas of code that could be improved, please feel free to
send an email to njection.net@gmail.com.
All comments will be appreciated!
Current Release
-
New Expression Support
- Try - Creates a Try expression representing a try block with
any number of catch.
statements.
-
Catch - Represents a catch statement in a try block.
-
Switch - Represents a switch statement.
- SwitchCase - Represents a control expression that handles multiple selections by
passing control to SwitchCase.
- New - Represents a constructor call.
- NewArrayBounds - Rpresents creating a new array that has a specified rank.
- NewArrayInit - Represents creating a one-dimensional array and initializing it
from a list of elements.
- ArrayIndex - Represents creating a one-dimensional array and initializing it
from a list of elements.
- Index - Represents an access to an array, for assigning to, or reading from, an array
element.
- ListInit - Represents a constructor call that has a collection initializer.
- ListBinding - Initializes a list in a specific type where the list is exposed as
a public property or field.
- MemberInit - Represents calling a constructor and initializing one or mor
members of the new object.
- MemberBinding - Represents a recursive initialization of members of a field or
property.
- MemberAccess - Represents accessing a property or field.
- TypeEqual - Represents a a run time identity check for an expression with a given
type.
- TypeIs - Represents a compatible check for an expression with a given
type.
- Invoke - Represents an expression that applies lambda expression to a list
of arguments.
-
All Expressions
- The body element is obsolete, instead use the expression element.
-
Block Expression
- The result element is obsolete, instead the result value & type would be the last
expression of the Block expression.
-
Conditional Expression
- The expressions element is obsolete. test, ifTrue, IfFalse elements are now direct
children of the conditional expression.
-
Goto Expression
- LabeTarget element is obsolete, instead a label element containing the label
expression is required.
-
Binary Expression
- Binary's expressions element is obsolete . left & right elements are now direct
children of the Binary expression.
-
Lambda Expression
- Arguments for
the the Lambda expression are no longer defined in the definitions
element and using the ref attribute is no longer needed. Instead, defining an argumnet
for the the Lambda expression is done in the arguments element.
- func & action
elements which were indicated the type of the Lambda are obsolete.
Instead defining the type of the Lambda is done with the typeof attribute in the
Lambda expression e.g.
<expression
type="Lambda"
typeof="System.Action`1[System.String]">
- Lambda's return
elemnt which indicated the returned expression is obsolete.
Instead defining the return expression is done within a
Block expression.
- Lambda's variables
element has been changed to arguments.
-
Call Expression
- The static and
methodInfo elements of Call are obsolete.
Instead defining a call for a static type method is done by defining the kind attribute
to be Static e.g.
<expression
type="Call" kind="Static" typeof="System.Console"
methodName="Write">
-
Goto Expression
- The break & continue
elements which indicated the type of goto are obsolete.
Instead defining the type of goto is done with the kind attribute in the Goto expression
element e.g.
<expression
type="Goto" kind="Break">
- Goto expression
now supports 4 kinds: Goto, Break, Continue, Return.
-
Block Expression
- Block's variables
element has been changed to arguments.