From: Max - M. <ma...@mi...> - 2015-02-11 17:53:12
|
Hi all, Here are some points in the current API (and what is being refined/refactored in the new 1.9 version) that I have wondered about for some time Specifically and currently about graph events, calling IGraph.Assert(Triple t) would trigger a Graph.TripleAsserted and a Graph.Changed event calling IGraph.Assert(IEnumerable<Triple> t) on 10 triples will trigger 10 Graph.TripleAsserted and 10 Graph.Changed event In the second case, wouldn't it be more efficient and clear (and simple for a user) to trigger the 10 Graph.TripleAsserted events and only one overall Graph.Changed event for the global additions ? Going that way it may also be useful to add a direct Update method in the IGraph interface so both removals and additions can be notified with a single Graph.Changed event, ins't it ? I know I could always derive from a specific IGraph implementation but should it not be addressed directly in the base library (if deemed suitable) ? Max. |