public void SetRootInstance(object instance) { if (instance == null) { throw new ArgumentNullException("instance"); } Instance = instance; if (decommission == Decommission.LateBound) { // TODO: this may need to be extended if we lazily provide any other decimmission concerns RequiresDecommission = instance is IDisposable; } }
public override object Create(CreationContext context, Burden burden) { var instance = InternalCreate(context, burden); burden.SetRootInstance(instance); OnCreation(Model, instance); return instance; }