protected static TImplementation CreateAndRegister <TInterface, TImplementation>() where TImplementation : TInterface, new() { var instance = new TImplementation(); Factory.RegisterInstance <TInterface>(instance); return(instance); }
public void LazyConstructAndRegisterSingleton <TContract, TImplementation>() { TImplementation obj = default(TImplementation); Register <TContract, TImplementation>(null, obj, PropertiesTypeCondition.DisposeAll, InstanceTypeCondition.Share); }