Netify
V1.1.1

Werden sofort benachrichtigt, wenn sich die Netzwerkverbindung ändert.
Sie können Ihr Projekt mit .NET CLI zu Netify hinzufügen:
dotnet add package Netify
oder Nuget Package Manager -Konsole:
Install-Package Netify
using Netify ;
using static System . Console ;
var networkStatusNotifier = new NetworkStatusNotifier ( ) ;
var sampleApp = new SampleApp ( networkStatusNotifier ) ;
networkStatusNotifier . Start ( ) ;
sampleApp . DoSomething ( ) ;
networkStatusNotifier . Stop ( ) ;
internal class SampleApp : INetworkObserver
{
public SampleApp ( INetworkStatusNotifier networkStatusNotifier )
{
networkStatusNotifier . AddObserver ( this ) ;
}
public void ConnectivityChanged ( ConnectivityStatus status )
{
WriteLine ( $ "Connectivity status changed: { status } " ) ;
}
public void DoSomething ( )
{
WriteLine ( "Change your connection status to see app reaction." ) ;
ReadKey ( ) ;
}
} 
