|assume you have a simple working social network (I wrote one as an experiment):
nodes are class Person ... identity properties
edges are class Edge ... FromNode, ToNode, Intensity (nullable double): they are one way following standard graph conventions.
both and Node have CRUD methods in place ... working.
if Intensity value is null: it means FromNode to ToNode has no connection
when Intensity's value changes: it raises a PropertyChanging ... the change can be canceled Iimplemented, working)
an Edge Joe has a ToNode Mary and Intensity 50.
an Edge Mary has a ToNode Joe and Intensity 50
Joe's Node changes Intensity to 100 and raises PropertyChanging which Joe subscribes Mary to.
You see the possibility of runaway recursion if both Edges subscribe PropertyChanging to each other.
how to limit recursion ?
how to limit recursion when an Edge Intensity wants to raise raises PropertyChanging when a certain magnitude of change occurs ?
keep a count ? enforce a limit ?
appreciate your thoughts !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch