public void set_to_default() { // SAMPLE: iconfiguredinstance-lifecycle IConfiguredInstance instance = new ConfiguredInstance(typeof(WidgetHolder)); // Use the SingletonThing lifecycle instance.Singleton(); // or supply an ILifecycle type instance.SetLifecycleTo<HttpContextLifecycle>(); // or supply an ILifecycle object instance.SetLifecycleTo(new Lifecycles_Samples.MyCustomLifecycle()); // or override to the default "transient" lifecycle instance.DefaultLifecycle(); // ENDSAMPLE instance.Lifecycle .ShouldBeOfType<TransientLifecycle>(); }