/src/SampleLibrary/IOC/SampleStronglyTypedFactoryWithNamedService.cs

http://github.com/philiplaureano/LinFu · C# · 14 lines · 13 code · 1 blank · 0 comment · 0 complexity · 5bdf1edaa81f17fe50dcb3ecc46d270f MD5 · raw file

  1. using LinFu.IoC.Configuration;
  2. using LinFu.IoC.Interfaces;
  3. namespace SampleLibrary.IOC
  4. {
  5. [Factory(typeof(ISampleService), ServiceName = "Test")]
  6. public class SampleStronglyTypedFactoryWithNamedService : IFactory<ISampleService>
  7. {
  8. public ISampleService CreateInstance(IFactoryRequest request)
  9. {
  10. return new SampleClass();
  11. }
  12. }
  13. }