public void RegisterChangeTracker(PathChangeDelegate changeDelegate, IEnumerable <string> fileNameFilters, IEnumerable <MediaSourceChangeType> changeTypes) { _changeDelegateProxy = changeDelegate; using (ServiceRegistration.Get <IImpersonationService>().CheckImpersonationFor(CanonicalLocalResourcePath)) { if (_underlayingResource != null) { LocalFsResourceProvider lfsProvider = _underlayingResource.ParentProvider as LocalFsResourceProvider; lfsProvider.RegisterChangeTracker(PathChangedProxy, FixSharePath(LocalFileSystemPath), fileNameFilters, changeTypes); } } }
public void RegisterChangeTracker(PathChangeDelegate changeDelegate, IEnumerable <string> fileNameFilters, IEnumerable <MediaSourceChangeType> changeTypes) { _changeDelegateProxy = changeDelegate; using (ServiceRegistration.Get <IImpersonationService>().CheckImpersonationFor(CanonicalLocalResourcePath)) { if (_underlayingResource != null) { LocalFsResourceProvider lfsProvider = _underlayingResource.ParentProvider as LocalFsResourceProvider; string path = NetworkPath; if (!path.EndsWith(@"\")) { path += @"\"; } lfsProvider.RegisterChangeTracker(PathChangedProxy, path, fileNameFilters, changeTypes); } } }