public Service ( IServiceProvider serviceProvider ) : void | ||
serviceProvider | IServiceProvider | The service provider. |
return | void |
/// <summary> /// Registers the services. /// </summary> private void RegisterServices() { DefaultUrlBuilder urlBuilder = new DefaultUrlBuilder(); urlBuilder.ServerUtil = serverUtility; AddService(typeof(IUrlBuilder), urlBuilder); AddService(typeof(IValidatorRegistry), new CachedValidationRegistry()); AddService(typeof(IEmailTemplateService), new MockEmailTemplateService(this)); AddService(typeof(IEmailSender), new MockSmtpSender(this)); AddService(typeof(IHelperDescriptorProvider), new DefaultHelperDescriptorProvider()); AddService(typeof(IFilterDescriptorProvider), new DefaultFilterDescriptorProvider()); AddService(typeof(ILayoutDescriptorProvider), new DefaultLayoutDescriptorProvider()); AddService(typeof(IRescueDescriptorProvider), new DefaultRescueDescriptorProvider()); AddService(typeof(IResourceDescriptorProvider), new DefaultResourceDescriptorProvider()); AddService(typeof(ITransformFilterDescriptorProvider), new DefaultTransformFilterDescriptorProvider()); DefaultControllerDescriptorProvider controllerDescProvider = new DefaultControllerDescriptorProvider(); controllerDescProvider.Service(this); AddService(typeof(IControllerDescriptorProvider), controllerDescProvider); AddService(typeof(IViewEngineManager), new DefaultViewEngineManager()); AddService(typeof(IScaffoldingSupport), new MockScaffoldingSupport()); }
public void Init() { builder = new DefaultControllerDescriptorProvider(); builder.Service(new TestServiceContainer()); }