public void Register_named_singleton() { SimpleType type = new SimpleType(); _ctx.RegisterNamedSingleton("test", type); Assert.That(_ctx.GetObject<SimpleType>("test"), Is.SameAs(type)); }
public void Register_default_singleton() { SimpleType type = new SimpleType(); _ctx.RegisterDefaultSingleton(type); Assert.That(_ctx.GetObject<SimpleType>(), Is.SameAs(type)); }
public void Register_uniquely_named_singleton() { SimpleType type = new SimpleType(); var reference = _ctx.RegisterUniquelyNamedSingleton(type); Assert.That(_ctx.GetObject(reference), Is.SameAs(type)); }
public CollectionHolder(SimpleType[] values) { Array = values; }