private bool CheckoutForEdit(params string[] fileNames) { VsQueryEditFlags flags = VsQueryEditFlags.SilentMode | VsQueryEditFlags.DetectAnyChangedFile | // Force no prompting here to fix SLVS#801 (otherwise TFS would prompt about the slconfig // and generated ruleset files in new connected mode that are not in the solution) VsQueryEditFlags.ForceEdit_NoPrompting; if (KnownUIContexts.DebuggingContext.IsActive || KnownUIContexts.SolutionBuildingContext.IsActive) { // Don't reload files while debugging or building flags |= VsQueryEditFlags.NoReload; } uint verdict; uint moreInfo; ErrorHandler.ThrowOnFailure(this.QueryFileOperation.QueryEditFiles((uint)flags, fileNames.Length, fileNames, null, null, out verdict, out moreInfo)); var success = (tagVSQueryEditResult.QER_EditOK == (tagVSQueryEditResult)verdict); if (!success) { this.logger.WriteLine(Resources.Strings.SCCFS_FailedToCheckOutFilesForEditing, (tagVSQueryEditResultFlags)moreInfo); } return(success); }
private bool CheckoutForEdit(params string[] fileNames) { VsQueryEditFlags flags = VsQueryEditFlags.SilentMode | VsQueryEditFlags.DetectAnyChangedFile; if (KnownUIContexts.DebuggingContext.IsActive || KnownUIContexts.SolutionBuildingContext.IsActive) { // Don't reload files while debugging or building flags |= VsQueryEditFlags.NoReload; } uint verdict; uint moreInfo; ErrorHandler.ThrowOnFailure(this.QueryFileOperation.QueryEditFiles((uint)flags, fileNames.Length, fileNames, null, null, out verdict, out moreInfo)); return(tagVSQueryEditResult.QER_EditOK == (tagVSQueryEditResult)verdict); }