public void Evaluate(int SpreadMax) { if (this.invalidateconnect || this.FSource.IsChanged) { if (this.oldsource != null) { this.oldsource.BeginQuery -= new DX11QueryableDelegate(AbstractQueryNode_BeginQuery); this.oldsource.EndQuery -= new DX11QueryableDelegate(AbstractQueryNode_EndQuery); } if (this.FSource[0] != null) { this.FSource[0].BeginQuery += new DX11QueryableDelegate(AbstractQueryNode_BeginQuery); this.FSource[0].EndQuery += new DX11QueryableDelegate(AbstractQueryNode_EndQuery); } this.oldsource = this.FSource[0]; this.invalidateconnect = false; } if (this.queryobject != null && this.oldsource != null) { this.queryobject.GetData(); } this.OnEvaluate(); }
void FSource_Disconnected(object sender, PinConnectionEventArgs args) { this.invalidateconnect = true; if (this.oldsource != null) { this.oldsource.BeginQuery -= new DX11QueryableDelegate(AbstractQueryNode_BeginQuery); this.oldsource.EndQuery -= new DX11QueryableDelegate(AbstractQueryNode_EndQuery); } this.oldsource = null; }