public void Initialize(IPeerMaintainer maintainer, PeerNodeConfig config, int wantedConnectionCount, Dictionary <EndpointAddress, Referral> referralCache)
 {
     this.maintainer            = maintainer;
     this.config                = config;
     this.wantedConnectionCount = wantedConnectionCount;
     this.UpdateEndpointsCollection(referralCache.Values);
     maintainer.NeighborClosed    += new NeighborClosedHandler(this.OnNeighborClosed);
     maintainer.NeighborConnected += new NeighborConnectedHandler(this.OnNeighborConnected);
     maintainer.MaintainerClosed  += new MaintainerClosedHandler(this.OnMaintainerClosed);
     maintainer.ReferralsAdded    += new ReferralsAddedHandler(this.OnReferralsAdded);
 }
        public void Initialize(IPeerMaintainer maintainer, PeerNodeConfig config, int wantedConnectionCount, Dictionary<EndpointAddress, Referral> referralCache)
        {
            this.maintainer = maintainer;
            this.config = config;
            this.wantedConnectionCount = wantedConnectionCount;
            UpdateEndpointsCollection(referralCache.Values);        // Add to the endpoints connection anything in the referralsCache

            // Hook up the event handlers
            maintainer.NeighborClosed += OnNeighborClosed;
            maintainer.NeighborConnected += OnNeighborConnected;
            maintainer.MaintainerClosed += OnMaintainerClosed;
            maintainer.ReferralsAdded += OnReferralsAdded;
        }
        public void Initialize(IPeerMaintainer maintainer, PeerNodeConfig config, int wantedConnectionCount, Dictionary <EndpointAddress, Referral> referralCache)
        {
            this.maintainer            = maintainer;
            this.config                = config;
            this.wantedConnectionCount = wantedConnectionCount;
            UpdateEndpointsCollection(referralCache.Values);        // Add to the endpoints connection anything in the referralsCache

            // Hook up the event handlers
            maintainer.NeighborClosed    += OnNeighborClosed;
            maintainer.NeighborConnected += OnNeighborConnected;
            maintainer.MaintainerClosed  += OnMaintainerClosed;
            maintainer.ReferralsAdded    += OnReferralsAdded;
        }
 public void Initialize(IPeerMaintainer maintainer, PeerNodeConfig config, int wantedConnectionCount, Dictionary<EndpointAddress, Referral> referralCache)
 {
     this.maintainer = maintainer;
     this.config = config;
     this.wantedConnectionCount = wantedConnectionCount;
     this.UpdateEndpointsCollection(referralCache.Values);
     maintainer.NeighborClosed += new NeighborClosedHandler(this.OnNeighborClosed);
     maintainer.NeighborConnected += new NeighborConnectedHandler(this.OnNeighborConnected);
     maintainer.MaintainerClosed += new MaintainerClosedHandler(this.OnMaintainerClosed);
     maintainer.ReferralsAdded += new ReferralsAddedHandler(this.OnReferralsAdded);
 }