private void Sink_OnServerAdded(MediaServerDiscovery sender, CpMediaServer server)
 {
     if (this.OnMediaServersChanged != null)
     {
         this.OnMediaServersChanged(this);
     }
 }
 public CdsContentFinder()
 {
     m_MediaServers = new MediaServerDiscovery(null,null,
       new MediaServerDiscovery.Delegate_OnGoodServersChange(Sink_OnServerAdded),
       new MediaServerDiscovery.Delegate_OnGoodServersChange(Sink_OnServerRemoved)
       );
 }
 /// <summary>
 /// Creates the static instance.
 /// </summary>
 private ContainerDiscovery()
 {
     this.m_ServerFinder = new MediaServerDiscovery
         (
         null,
         null,
         new MediaServerDiscovery.Delegate_OnGoodServersChange(this.Sink_OnServerAdded),
         new MediaServerDiscovery.Delegate_OnGoodServersChange(this.Sink_OnServerRemoved)
         );
 }
Esempio n. 4
0
 /// <summary>
 /// Executed when a server disappears.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="server"></param>
 private void Sink_OnServerRemoved(MediaServerDiscovery sender, CpMediaServer server)
 {
     this.AllRoots.RemoveRootContainer(server.Root);
     this.AllRoots.NotifyRootsOfChange();
 }
Esempio n. 5
0
 /// <summary>
 /// Executed when a server shows up.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="server"></param>
 private void Sink_OnServerAdded(MediaServerDiscovery sender, CpMediaServer server)
 {
     server.Root.Update();
     this.AllRoots.AddRootContainer(server.Root);
     this.AllRoots.NotifyRootsOfChange();
 }
 /// <summary>
 /// Executed when a server disappears.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="server"></param>
 private void Sink_OnServerRemoved(MediaServerDiscovery sender, CpMediaServer server)
 {
     this.AllRoots.RemoveRootContainer(server.Root);
     this.AllRoots.NotifyRootsOfChange();
 }
 /// <summary>
 /// Executed when a server shows up.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="server"></param>
 private void Sink_OnServerAdded(MediaServerDiscovery sender, CpMediaServer server)
 {
     server.Root.Update();
     this.AllRoots.AddRootContainer(server.Root);
     this.AllRoots.NotifyRootsOfChange();
 }
 /// <summary>
 /// Memory cleanup
 /// </summary>
 public void Dispose()
 {
     this.m_ServerFinder = null;
     this.m_ServerFinder.OnGoodServerAdded -= new MediaServerDiscovery.Delegate_OnGoodServersChange(this.Sink_OnServerAdded);
     this.m_ServerFinder.OnGoodServerRemoved -= new MediaServerDiscovery.Delegate_OnGoodServersChange(this.Sink_OnServerRemoved);
 }