コード例 #1
0
		public void Register_named_singleton()
		{
			SimpleType type = new SimpleType();
			_ctx.RegisterNamedSingleton("test", type);

			Assert.That(_ctx.GetObject<SimpleType>("test"), Is.SameAs(type));
		}
コード例 #2
0
		public void Register_default_singleton()
		{
			SimpleType type = new SimpleType();
			_ctx.RegisterDefaultSingleton(type);
			
			Assert.That(_ctx.GetObject<SimpleType>(), Is.SameAs(type));
		}
コード例 #3
0
		public void Register_uniquely_named_singleton()
		{
			SimpleType type = new SimpleType();
			var reference = _ctx.RegisterUniquelyNamedSingleton(type);
			
			Assert.That(_ctx.GetObject(reference), Is.SameAs(type));
		}
コード例 #4
0
		public CollectionHolder(SimpleType[] values)
		{
			Array = values;
		}