コード例 #1
0
 /// <summary>
 /// Registers a LocalPeerListChangedHandler and returns the existing
 /// local peer list in one operation, so you are guaranteed not
 /// to miss any changes to the list.  Be careful - the event could
 /// actually fire before you do something with the returned value.
 /// </summary>
 /// <param name="newHandler"></param>
 /// <returns></returns>
 public static NodePeerList RegisterLocalPeerListChangedCallback(LocalPeerListChangedHandler newHandler)
 {
     lock (Instance.m_localPeerList_Lock)
     {
         OnLocalPeerListChanged += newHandler;
         return(LocalPeerList);
     }
 }
コード例 #2
0
 /// <summary>
 /// Registers a LocalPeerListChangedHandler and returns the existing
 /// local peer list in one operation, so you are guaranteed not
 /// to miss any changes to the list.  Be careful - the event could
 /// actually fire before you do something with the returned value.
 /// </summary>
 /// <param name="newHandler"></param>
 /// <returns></returns>
 public static NodePeerList RegisterLocalPeerListChangedCallback(LocalPeerListChangedHandler newHandler)
 {
     lock (Instance.m_localPeerList_Lock)
     {
         OnLocalPeerListChanged += newHandler;
         return LocalPeerList;
     }
 }