public MethodData(ServiceProvider site) { this.provider = site; this.methodTipWindow = (IVsMethodTipWindow)VsShell.CreateInstance( provider, ref VsConstants.CLSID_VsMethodTipWindow, ref VsConstants.IID_IVsMethodTipWindow, typeof(IVsMethodTipWindow)); if (this.methodTipWindow != null) { methodTipWindow.SetMethodData( this ); } }
internal MethodData(IServiceProvider site) { this.provider = site; Microsoft.VisualStudio.Shell.Package pkg = (Microsoft.VisualStudio.Shell.Package)site.GetService(typeof(Microsoft.VisualStudio.Shell.Package)); if (pkg == null) { throw new NullReferenceException(typeof(Microsoft.VisualStudio.Shell.Package).FullName); } Guid riid = typeof(IVsMethodTipWindow).GUID; Guid clsid = typeof(VsMethodTipWindowClass).GUID; this.methodTipWindow = (IVsMethodTipWindow)pkg.CreateInstance(ref clsid, ref riid, typeof(IVsMethodTipWindow)); if (this.methodTipWindow != null) { NativeMethods.ThrowOnFailure(methodTipWindow.SetMethodData(this)); } }