I'm trying to programmatically intercept and cancel a user's attempt to check out a file in TFS.
Am I correct in thinking that the proper way to go about this would be to handle the NewPendingChange in a Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer ?
What is the proper way for canceling the event from its event handler?
I was wrong! TFS does allow me to disable merge and multiple check outs on sln/csproj files!
In the "Team Foundation Server Settings > Source Control File Types..." dialog I was able to add new file types (one for sln and one for csproj) and set the File Merging attribute on them to "Disabled". Works like a charm.
Too bad I still don't know how to answer my original question - how to cancel a NewPendingChange event.