~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                RuntimeAssemblyContext assemblyContext;
57
57
                ComposedAssemblyContext composedAssemblyContext;
58
58
                ITimeTracker timer;
 
59
                SynchronizationContext mainContext;
59
60
                
60
61
                protected bool ShuttingDown { get; private set; }
61
62
                
73
74
                
74
75
                internal void StartInitialization ()
75
76
                {
 
77
                        // Store the main sync context, since we'll need later on for subscribing
 
78
                        // add-in extension points (Mono.Addins isn't currently thread safe)
 
79
                        mainContext = SynchronizationContext.Current;
 
80
                        
76
81
                        // Initialize the service in a background thread.
77
82
                        Thread t = new Thread (new ThreadStart (BackgroundInitialize)) {
78
83
                                Name = "Assembly service initialization",
204
209
                public virtual Process ExecuteAssembly (ProcessStartInfo pinfo, TargetFramework fx)
205
210
                {
206
211
                        if (fx == null) {
207
 
                                string fxId = Runtime.SystemAssemblyService.GetTargetFrameworkForAssembly (this, pinfo.FileName);
 
212
                                TargetFrameworkMoniker fxId = Runtime.SystemAssemblyService.GetTargetFrameworkForAssembly (this, pinfo.FileName);
208
213
                                fx = Runtime.SystemAssemblyService.GetTargetFramework (fxId);
209
214
                                if (!IsInstalled (fx)) {
210
215
                                        // Look for a compatible framework which is installed
400
405
                        timer.Trace ("Registering support packages");
401
406
                        
402
407
                        // Get assemblies registered using the extension point
403
 
                        AddinManager.AddExtensionNodeHandler ("/MonoDevelop/Core/SupportPackages", OnPackagesChanged);
 
408
                        mainContext.Send (delegate {
 
409
                                AddinManager.AddExtensionNodeHandler ("/MonoDevelop/Core/SupportPackages", OnPackagesChanged);
 
410
                        }, null);
404
411
                }
405
412
                
406
413
                void OnPackagesChanged (object s, ExtensionNodeEventArgs args)