/// <summary> /// Initialize the Host Side. /// This can be called from OnConnect by Addin AND from GetHostSide by Host Adapter. /// </summary> private void InitHostSide() { try { lock (m_hostLock) { if (m_hostSide == null) { Debug.Assert(m_applicationObject != null, "HostSide.InitHostSide: m_applicationObject is null!"); m_serviceProvider = new ServiceProvider((IOleServiceProvider)m_applicationObject); Debug.Assert(m_serviceProvider != null, "VsIdeTestHostAddin.InitHostSide: failed to init service provider!"); m_hostSide = new HostAdapterHostSide(m_serviceProvider); } } } catch (Exception ex) { Debug.Fail("HA.InitHostSide: " + ex.ToString()); throw; } }