Support multiple service models for a component. WindsorServiceHostFactory will...
[castle.git] / MonoRail / Castle.MonoRail.Views.Brail.Tests / ViewSourceLoaderServiceProvider.cs
blob6727b8b2ca2307f63dc0b173512c9d8df22d5776
1 namespace Castle.MonoRail.Views.Brail.Tests
3 using System;
4 using Framework;
6 internal class ViewSourceLoaderServiceProvider : IServiceProvider
8 private string viewRootDir;
10 public ViewSourceLoaderServiceProvider(string viewRootDir)
12 this.viewRootDir = viewRootDir;
15 #region IServiceProvider Members
17 public object GetService(Type serviceType)
19 if (typeof (IViewSourceLoader) == serviceType)
21 FileAssemblyViewSourceLoader loader = new FileAssemblyViewSourceLoader();
22 loader.ViewRootDir = viewRootDir;
23 return loader;
25 return null;
28 #endregion