void SolutionFileChanged(object sender, FileEventArgs args) { var docEvent = args.FirstOrDefault(f => !f.IsDirectory); if (docEvent != null) { OnDocumentChanged(docEvent.FileName.FullPath); } }
void FileService_FileChanged(object sender, FileEventArgs e) { var launchSettingsPath = aspNetCoreRunConf?.launchProfileProvider?.launchSettingsJsonPath; var launchSettings = e.FirstOrDefault(x => x.FileName == launchSettingsPath && !x.FileName.IsDirectory); if (launchSettings == null) { return; } aspNetCoreRunConf.RefreshLaunchSettings(); }
void FileService_FileChanged(object sender, FileEventArgs e) { var globalJson = e.FirstOrDefault(x => x.FileName.FileName.IndexOf("global.json", StringComparison.OrdinalIgnoreCase) == 0 && !x.FileName.IsDirectory); if (globalJson == null) { return; } // make sure the global.json file that has been changed is the one we got when loading the project if (Project.ParentSolution.ExtendedProperties [GlobalJsonPathExtendedPropertyName] is string globalJsonPath && globalJsonPath.IndexOf(globalJson.FileName, StringComparison.OrdinalIgnoreCase) == 0) { DetectSDK(restore: true); } }
async void FileService_FileChanged(object sender, FileEventArgs e) { var launchSettingsPath = launchProfileProvider?.LaunchSettingsJsonPath; var launchSettings = e.FirstOrDefault(x => x.FileName == launchSettingsPath && !x.FileName.IsDirectory); if (launchSettings == null) { return; } updating = true; launchProfileProvider.LoadLaunchSettings(); launchProfileProvider.SyncRunConfigurations(); await IdeApp.ProjectOperations.SaveAsync(Project); updating = false; }
void GotFileChanged (object sender, FileEventArgs args) { if (!isDisposed && !string.IsNullOrEmpty (ContentName)) { FilePath path = new FilePath (ContentName).CanonicalPath; var f = args.FirstOrDefault (fi => fi.FileName.CanonicalPath == path); if (f != null) HandleFileChanged (f.FileName); } }