Hi Marc,
thanks for your fast answer.
>> I want the user of the framework to be able to create a connection like
>> this:
[quoted text clipped - 5 lines]
> graph.AddConnection(i, "Input", o, "Output");
> But of course it still isn't compiler-verified.
But it's easier than my current approach, so if everything fails, I'll do
it that way.
> You could do various things involving delegates and lambdas, including
> treating a lambda as the missing "infoof" operator, which would allow
[quoted text clipped - 3 lines]
> That said, you are also duplicating a lot of what Binding does (at least
> for the UI).
I don't worry about complicated solutions for this problem, as long as the
usage for the user of the framework get's simpler :D.. But I'm sorry, I
forgot to mention that I'm using C# 2.0, so lambdas won't apply here I
think :(
> You haven't really indicated how it would be *used* (i.e. end-to-end,
> not just creation), which probably counts for a lot in terms of giving
> the best reply...
Ok, so here's what the framework should be used for:
The (dev) user can creates a tree graph by adding custom nodes and creating
connections. The connections are made between properties of nodes. Those
properties are marked declarative by using an [Input] or [Output]
attribute.
The nodes transfers the data from inputs to outputs on update calls, and
the connection transports the data from one node's output tp the connected
input of another node.
In my current domain, the tree represents a query to a custom datamodel.
The creation of the query is supported by a UI.
After creating the query tree, the user sets an input collection and calls
evalute on the tree. Inside, the tree nodes and connections are sorted to
be evaluated in the correct order, and then their update methods are
called.
The result of the query is the output of the last node.
Bye,
Marco
Marc Gravell - 28 Apr 2008 14:58 GMT
Just to warn you that this sounds *awfully* like what System.Expression
does... even if just to rule it out, you might want to see what .NET 3.5
and C# 3 bring to this...
Marc