コード例 #1
0
ファイル: PollNode.cs プロジェクト: zhaoyingju/Opserver
 /// <summary>
 /// Tries added this node to the global polling engine.  If another copy of this node is present (same unique key)
 /// then this method will return false, indicating it was not added and will not be polled.
 /// </summary>
 /// <remarks>If this return FALSE, be sure not to cache the node anywhere else, as it should likely be garbage collected</remarks>
 /// <returns>Whether the node was added to the list of global pollers</returns>
 public bool TryAddToGlobalPollers()
 {
     return(AddedToGlobalPollers = PollingEngine.TryAdd(this));
 }
コード例 #2
0
 /// <summary>
 /// Tries added this node to the global polling engine.  If another copy of this node is present (same unique key)
 /// then this method will return false, indicating it was not added and will not be polled.
 /// </summary>
 /// <remarks>If this return FALSE, be sure not to cache the node anywhere else, as it should likely be garbage collected</remarks>
 /// <returns>Whether the node was added to the list of global pollers</returns>
 public bool TryAddToGlobalPollers()
 {
     AddedToGlobalPollers = PollingEngine.TryAdd(this);
     RegisterProviders();
     return(AddedToGlobalPollers);
 }