System.Net.NetworkInformation.NetworkChange.OnSocketEvent C# (CSharp) Method

OnSocketEvent() private static method

private static OnSocketEvent ( Interop kind ) : void
kind Interop
return void
        private static void OnSocketEvent(Interop.Sys.NetworkChangeKind kind)
        {
            switch (kind)
            {
                case Interop.Sys.NetworkChangeKind.AddressAdded:
                case Interop.Sys.NetworkChangeKind.AddressRemoved:
                    s_addressChangedSubscribers?.Invoke(null, EventArgs.Empty);
                    break;
                case Interop.Sys.NetworkChangeKind.AvailabilityChanged:
                    lock (s_availabilityLock)
                    {
                        if (!s_availabilityHasChanged)
                        {
                            s_availabilityTimer.Change(AvailabilityTimerWindowMilliseconds, -1);
                        }

                        s_availabilityHasChanged = true;
                    }
                    break;
            }
        }