public FileChangeNotificationSystemEntry (string dirPath, FileChangeNotificationSystem owner) { if (String.IsNullOrEmpty (dirPath)) throw new ArgumentNullException ("dirPath"); if (owner == null) throw new ArgumentNullException ("owner"); watchedDirPath = dirPath; this.owner = owner; }
public FileChangeNotificationSystemEntry(string dirPath, FileChangeNotificationSystem owner) { if (String.IsNullOrEmpty(dirPath)) { throw new ArgumentNullException("dirPath"); } if (owner == null) { throw new ArgumentNullException("owner"); } watchedDirPath = dirPath; this.owner = owner; }
private static void InitFCN() { if (s_fcn == null) { IFileChangeNotificationSystem fcn = null; IServiceProvider host = ObjectCache.Host; if (host != null) { fcn = host.GetService(typeof(IFileChangeNotificationSystem)) as IFileChangeNotificationSystem; } if (fcn == null) { fcn = new FileChangeNotificationSystem(); } Interlocked.CompareExchange(ref s_fcn, fcn, null); } }
private static void InitFCN() { if (s_fcn == null) { IFileChangeNotificationSystem fcn = null; IServiceProvider host = ObjectCache.Host; if (host != null) { fcn = host.GetService(typeof(IFileChangeNotificationSystem)) as IFileChangeNotificationSystem; } if (fcn == null) { #if NET5_0_OR_GREATER if (OperatingSystem.IsBrowser() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS()) { throw new PlatformNotSupportedException(); } #endif fcn = new FileChangeNotificationSystem(); } Interlocked.CompareExchange(ref s_fcn, fcn, null); } }