src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/IServiceProviderExtensions.cs
/// <summary>
/// Returns the specified interface from the service. This is useful when the service and interface differ
/// </summary>
Returns the specified interface from the service. This is useful when the service and interface differ
Returns the specified interface from the service . This is useful when the service and interface differ
public static InterfaceType GetService<InterfaceType, ServiceType>(this IServiceProvider sp)
            where InterfaceType : class
            where ServiceType : class
        {
            return (InterfaceType)sp.GetService(typeof(ServiceType));
        }
public static InterfaceType GetService < InterfaceType , ServiceType > ( this IServiceProvider sp ) where InterfaceType : class where ServiceType : class { return ( InterfaceType ) sp . GetService ( typeof ( ServiceType ) ) ; }
Returns the specified interface from the service.
Returns the specified interface from the service .
IServiceProvider
this