Browse Source

Fixed InvalidOperationException in ReflectorAddIn when the 'run as administrator' compatibility option is set on Reflector.exe.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4533 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
36b451624a
  1. 8
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/ReflectorController.cs
  2. 10
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

8
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/ReflectorController.cs

@ -57,8 +57,12 @@ namespace ReflectorAddIn @@ -57,8 +57,12 @@ namespace ReflectorAddIn
// start Reflector
ProcessStartInfo psi = new ProcessStartInfo(reflectorExeFullPath);
psi.WorkingDirectory = Path.GetDirectoryName(psi.FileName);
using(Process p = Process.Start(psi)) {
p.WaitForInputIdle(7500);
using (Process p = Process.Start(psi)) {
try {
p.WaitForInputIdle(10000);
} catch (InvalidOperationException) {
// can happen if Reflector is configured to run elevated
}
}
for (int retryCount = 0; retryCount < 10; retryCount++) {

10
src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

@ -787,15 +787,17 @@ namespace ICSharpCode.SharpDevelop @@ -787,15 +787,17 @@ namespace ICSharpCode.SharpDevelop
static void OnParseInformationUpdated(ParseInformationEventArgs e)
{
if (ParseInformationUpdated != null) {
ParseInformationUpdated(null, e);
ParseInformationEventHandler handler = ParseInformationUpdated;
if (handler != null) {
handler(null, e);
}
}
static void OnLoadSolutionProjectsThreadEnded(EventArgs e)
{
if (LoadSolutionProjectsThreadEnded != null) {
LoadSolutionProjectsThreadEnded(null, e);
EventHandler handler = LoadSolutionProjectsThreadEnded;
if (handler != null) {
handler(null, e);
}
}

Loading…
Cancel
Save