GNOME Bugzilla – Bug 630296
Add 'network status' support for Windows.
Last modified: 2010-09-22 18:19:30 UTC
Created attachment 170791 [details] [review] Implement network status support for windows. The following patch adds support for detecting the network status (connected or not) on Windows, using the classes from the System.Net.NetworkInformation namespace.
Review of attachment 170791 [details] [review]: Looks pretty good - I have a few nitpicks. ::: src/Core/Banshee.Services/Banshee.Networking/DotNetNetworking.cs @@ +35,3 @@ + public class DotNetNetworking : INetworkAvailabilityService + { + public static bool Available { get { try { return Type.GetType ("Mono.Runtime") == null; } catch { return true; } } } Might as well call this ManagerPresent like the others do, no? @@ +40,3 @@ + + public State State + { put this { up on the previous line (for properties) @@ +59,3 @@ + void OnNetworkAvailabilityChanged (object o, NetworkAvailabilityEventArgs args) + { + StateChangeHandler sc = StateChange; rewrite this as var handler = StateChanged; if (handler != null) { ... }
Created attachment 170850 [details] [review] Updated patch with fixes Updated based on feedback.
Review of attachment 170850 [details] [review]: Committed, thanks!