public static TService GetService <TService>(GetServiceHandler getServiceMethod, bool throwIfMissing) where TService : class { TService serviceInstance = (TService)getServiceMethod(typeof(TService)); ThrowIfMissing <TService>(throwIfMissing, serviceInstance); return(serviceInstance); }
public static TService GetService <TService>(GetServiceHandler getServiceMethod) where TService : class { return(GetService <TService>(getServiceMethod, false)); }