public RoslynKeyProcessorProvider(SVsServiceProvider sp) { var mySP = (VsServiceProvider)sp; componentModel = mySP.ComponentModel; // This is necessary for icons in IntelliSense // The initialization is re-entrant, which can // make MEF try to create this class again and // throw a re-entrancy exception from Lazy<T>. // I therefore initialize this asynchronously. Dispatcher.CurrentDispatcher.BeginInvoke(new Action(delegate { var imageService = new VsImageService(sp); imageService.InitializeLibrary(); // This is necessary for preview icons in CTP3, which doesn't // have a singleton CrispImage.DefaultImageLibrary. The GUID // is from SVsImageService, which has a private PIA. mySP.AddService(new Guid("ACC9EB93-CAD8-41DE-80DA-BD35CC5112AE"), imageService); })); }
public RoslynKeyProcessorProvider(SVsServiceProvider sp) { var mySP = (VsServiceProvider)sp; componentModel = mySP.ComponentModel; // This is necessary for icons in IntelliSense // The initialization is re-entrant, which can // make MEF try to create this class again and // throw a re-entrancy exception from Lazy<T>. // I therefore initialize this asynchronously. Dispatcher.CurrentDispatcher.BeginInvoke(new Action(delegate { var imageService = new VsImageService(sp); imageService.InitializeLibrary(); // This is necessary for preview icons in CTP3, which doesn't // have a singleton CrispImage.DefaultImageLibrary. The GUID // is from SVsImageService, which has a private PIA. mySP.AddService(new Guid("ACC9EB93-CAD8-41DE-80DA-BD35CC5112AE"), imageService); })); }