public int CreateUniqueEventName(string pszClassName, string pszObjectName, string pszNameOfEvent, out string pbstrEventHandlerName) { string result = null; var waitIndicator = ComponentModel.GetService <IWaitIndicator>(); waitIndicator.Wait( "Intellisense", allowCancel: false, action: c => result = ContainedLanguageCodeSupport.CreateUniqueEventName(GetThisDocument(), pszClassName, pszObjectName, pszNameOfEvent, c.CancellationToken)); pbstrEventHandlerName = result; return(VSConstants.S_OK); }
public int CreateUniqueEventName(string pszClassName, string pszObjectName, string pszNameOfEvent, out string pbstrEventHandlerName) { string result = null; var uiThreadOperationExecutor = ComponentModel.GetService <IUIThreadOperationExecutor>(); uiThreadOperationExecutor.Execute( "Intellisense", defaultDescription: "", allowCancellation: false, showProgress: false, action: c => result = ContainedLanguageCodeSupport.CreateUniqueEventName(GetThisDocument(), GlobalOptions, pszClassName, pszObjectName, pszNameOfEvent, c.UserCancellationToken)); pbstrEventHandlerName = result; return(VSConstants.S_OK); }