1 namespace System.Web.Mvc {
2 using System.Collections.Generic;
4 using System.Runtime.Serialization;
6 public static class DependencyResolverExtensions {
7 public static TService GetService<TService>(this IDependencyResolver resolver) {
8 return (TService)resolver.GetService(typeof(TService));
11 public static IEnumerable<TService> GetServices<TService>(this IDependencyResolver resolver) {
12 return resolver.GetServices(typeof(TService)).Cast<TService>();