using System; namespace Developpez.Dotnet.System.Providers { /// /// Fournisseur d'informations systèmes /// /// Infrastructure internal static class SystemInterop { #region Fournisseur /* * Il serait bien que ça tourne aussi sur Mono, mais on ne peux pas * forcément avoir les mêmes informations de la même manière sur tous les * systèmes ... sépération ? */ /// /// Fournisseur actuel /// private static readonly ISystemInteropProvider _systemProvider; /// /// Fournisseur actuel /// public static ISystemInteropProvider Provider { get { return _systemProvider; } } static SystemInterop() { switch (Environment.OSVersion.Platform) { case PlatformID.Win32Windows: case PlatformID.Win32NT: { _systemProvider = new WindowsProvider(); break; } case PlatformID.Unix: { _systemProvider = new UnixProvider(); break; } default: /* aie */ { _systemProvider = new NullSystemProvider(); break; } } } #endregion } }