// DumpItem subscriptions public void Publish(IDumpItem di) { DISubsInfo si; if (!diSubs.TryGetValue(di, out si)) { si = new DISubsInfo(); diSubs[di] = si; // let the node know we need this DI to be published node.Publish(di); } si.RefCount++; }
// DumpItem subscriptions // The di.Expand field controls whether thr server publishes the item or not // Set it to true only if at least one subscriber is subscribed. public void Publish(IDumpItem di) { DISubsInfo si; if (!diSubs.TryGetValue(di, out si)) { si = new DISubsInfo(); diSubs[di] = si; //// make the server start publishing the DI //di.Expand = true; } si.Expanded = true; di.Expand = si.Expanded; si.RefCount++; }