/src/SampleLibrary/IOC/SampleClassWithMultipleNonServiceArgumentConstructors.cs

http://github.com/philiplaureano/LinFu · C# · 32 lines · 25 code · 5 blank · 2 comment · 0 complexity · 6a4e13de2aa0dabe732b9e6f7927e76b MD5 · raw file

  1. using System;
  2. using LinFu.IoC.Configuration;
  3. namespace SampleLibrary.IOC
  4. {
  5. [Implements(typeof(ISampleService), ServiceName = "ClassWithMultipleNonServiceArgumentConstructors")]
  6. public class SampleClassWithMultipleNonServiceArgumentConstructors : ISampleService
  7. {
  8. public SampleClassWithMultipleNonServiceArgumentConstructors(string arg1)
  9. {
  10. // Throw an exception if the incorrect constructor is selected
  11. throw new InvalidOperationException("Incorrect Constructor Selected");
  12. }
  13. public SampleClassWithMultipleNonServiceArgumentConstructors(string arg1, int arg2)
  14. {
  15. // Throw an exception if the incorrect constructor is selected
  16. throw new InvalidOperationException("Incorrect Constructor Selected");
  17. }
  18. public SampleClassWithMultipleNonServiceArgumentConstructors(string arg1, int arg2, SampleEnum arg3,
  19. decimal arg4, int arg5)
  20. {
  21. }
  22. public void DoSomething()
  23. {
  24. throw new NotImplementedException();
  25. }
  26. }
  27. }