public static IVsUIShell GetIVsUIShell(IServiceProvider serviceProvider) { IVsDataHostService hostService = serviceProvider.GetService( typeof(IVsDataHostService)) as IVsDataHostService; return(hostService.GetService <IVsUIShell>()); }
public static void UpdateUI(IVsDataHostService hostService) { if (hostService.UIThread == Thread.CurrentThread) { // Called on UI thread, directly call method ActuallyUpdateUI(hostService); } else { // Called from background thread, invoke on UI thread hostService.InvokeOnUIThread( new UpdateUIDelegate(ActuallyUpdateUI), hostService); } }
public static IVsUIShell GetIVsUIShell(IVsDataHostService hostService) { return(hostService.TryGetService <IVsUIShell>(SID_IVsUIShell)); }
private static void ActuallyUpdateUI(IVsDataHostService hostService) { IVsUIShell uiShell = hostService.GetService <IVsUIShell>(); uiShell.UpdateCommandUI(0); // fImmediateUpdate == false }
public static IVsUIShell GetIVsUIShell(IVsDataHostService hostService) { return(hostService.TryGetService <SVsUIShell, IVsUIShell>()); }