/src/SampleLibrary/IOC/SampleClassWithInjectionMethod.cs

http://github.com/philiplaureano/LinFu · C# · 23 lines · 18 code · 5 blank · 0 comment · 0 complexity · f80296ff343acafaef2a030483d95568 MD5 · raw file

  1. using System;
  2. using LinFu.IoC.Configuration;
  3. namespace SampleLibrary.IOC
  4. {
  5. public class SampleClassWithInjectionMethod : ISampleService
  6. {
  7. public ISampleService Property { get; private set; }
  8. public void DoSomething()
  9. {
  10. throw new NotImplementedException();
  11. }
  12. [Inject]
  13. public void DoSomething(ISampleService sample)
  14. {
  15. Property = sample;
  16. }
  17. }
  18. }