ServicedComponent::Activate Method ()

 

Called by the infrastructure when the object is created or allocated from a pool. Override this method to add custom initialization code to objects.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public protected:
virtual void Activate()

The following code example demonstrates the use of this method.

protected:
   virtual void Activate() override
   {
      MessageBox::Show( String::Format( "Now entering...\nApplication: {0}\nInstance: {1}\nContext: {2}\n", ContextUtil::ApplicationId.ToString(), ContextUtil::ApplicationInstanceId.ToString(), ContextUtil::ContextId.ToString() ) );
   }

.NET Framework
Available since 1.1
Return to top
Show: