public InjectedConfiguredSingleton(TestDomain domain) { this.Domain = domain; Console.WriteLine(String.Format( "{0}: constructor with: {1}", this.GetType().Name, domain.GetType().Name)); }
public InjectedEveryNew(TestDomain domain) { this.Domain = domain; Console.WriteLine(String.Format( "{0}: constructor with: {1}", this.GetType().Name, domain.GetType().Name)); }
public static void Main(string[] arguments) { TestDomain domain; BasicDomainConfiguration configuration; Stream stream; domain = new TestDomain(); configuration = new BasicDomainConfiguration(); stream = File.OpenRead("DomainTests.xml"); try { configuration.Load(stream); } finally { stream.Close(); } domain.Initialize(configuration); Console.WriteLine(String.Format( "* I have got: {0}", domain.EveryNew.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Singleton.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Ordered0.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Ordered1.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.EveryNew.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Singleton.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Ordered0.Get().GetType().Name)); Console.WriteLine(String.Format( "* I have got: {0}", domain.Ordered1.Get().GetType().Name)); Console.WriteLine("press ENTER to exit"); Console.ReadLine(); }