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;
		}
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
        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);
            }
        }
 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);
     }
 }