yes you would. you can expand the default tag and set the filter by writing your own and registering them when the application starts. there is only one thing to keep in mind - filters should have been very easily expanded, and therefore you just need to implement one of two straightforward interfaces (ISimpleFilter for parameterless filters or IFilter for filters with 1 parameter). For tags, the concept is the same, but since NDjango itself is written in F #, the ITag interface is a bit more difficult to consume with C # or VB. This is certainly doable, but a bit messy. From F # it is very simple.
in f # is as follows:
and ITag =
member Perform: Lexer.BlockToken -> IParser ->
Lexer.Token seq -> (Node list * Lexer.Token seq)
in C #, it looks like this:
public Tuple<FSharpList<Interfaces.Node>, IEnumerable<Lexer.Token>>
Perform(Lexer.BlockToken __p1, Interfaces.IParser __p2,
IEnumerable<Lexer.Token> __p3)
again - the filters are simple in C # - in fact, most of the filters that come with it are written in C #. tags are easy in f # but the messier bit in c #
, , , .
- ndjango.