link
Avalon
Avalon Castle - Managed Extensions
Home PlanetProductsCentral
Lifecycle

Your component may optionally implements the MRegistrationListener and receive lifecycle events during registration and de-registration. If your component wants to interact with MServer, implementing MRegistrationListener is the best oportunity to receive a MServer instance.

[ManagedComponent]
public class LifecycledService : MRegistrationListener
{
	public LifecycledService()
	{
	}

	[ManagedOperation]
	public void Start()
	{
	}

	[ManagedOperation]
	public void Stop()
	{
	}

	public void BeforeRegister(MServer server, ManagedObjectName name)
	{
	}

	public void AfterDeregister()
	{
	}

	public void AfterRegister()
	{
	}

	public void BeforeDeregister()
	{
	}
}