Microsoft.VisualStudio.Project.SolutionListener.SolutionListener C# (CSharp) Method

SolutionListener() protected method

protected SolutionListener ( System.IServiceProvider serviceProviderParameter ) : System
serviceProviderParameter System.IServiceProvider
return System
        protected SolutionListener(IServiceProvider serviceProviderParameter)
        {
            if (serviceProviderParameter == null)
            {
                throw new ArgumentNullException("serviceProviderParameter");
            }

            this.serviceProvider = serviceProviderParameter;
            this.solution = this.serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution;

            Debug.Assert(this.solution != null, "Could not get the IVsSolution object from the services exposed by this project");

            if(this.solution == null)
            {
                throw new InvalidOperationException();
            }

            this.InteropSafeIVsSolutionEvents = Utilities.GetOuterAs<IVsSolutionEvents>(this);
        }