ActivatedServiceTypeEntry Class
Holds values for an object type registered on the service end as one that can be activated on request from a client.
System.Runtime.Remoting::TypeEntry
System.Runtime.Remoting::ActivatedServiceTypeEntry
Assembly: mscorlib (in mscorlib.dll)
The ActivatedServiceTypeEntry type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ActivatedServiceTypeEntry(Type) | Initializes a new instance of the ActivatedServiceTypeEntry class with the given Type. |
![]() | ActivatedServiceTypeEntry(String, String) | Initializes a new instance of the ActivatedServiceTypeEntry class with the given type name and assembly name. |
| Name | Description | |
|---|---|---|
![]() | AssemblyName | Gets the assembly name of the object type configured to be a remote-activated type. (Inherited from TypeEntry.) |
![]() | ContextAttributes | Gets or sets the context attributes for the client-activated service type. |
![]() | ObjectType | Gets the Type of the client-activated service type. |
![]() | TypeName | Gets the full type name of the object type configured to be a remote-activated type. (Inherited from TypeEntry.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns the type and assembly name of the client-activated service type as a String. (Overrides Object::ToString().) |
The current class is used by the RemotingConfiguration::RegisterActivatedServiceType method, which is the server-side counterpart of the RemotingConfiguration::RegisterActivatedClientType method. The RegisterActivatedServiceType method is used on the server to allow remote activation by clients of specified object types.
To create a client-activated object on the server, you must know its Type, and it must be registered on the server end by using the RegisterActivatedServiceType method. To obtain a proxy for a new client-activated object, the client must first register a channel with ChannelServices and then activate the object by calling new or Activator::CreateInstance.
To activate a client-activated object type with the new keyword, you must first register the object type on the client using the RegisterActivatedClientType method. By calling RegisterActivatedClientType you are giving the remoting infrastructure the location of the remote application where new attempts to create it. If, on the other hand, you use the CreateInstance method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the CreateInstance method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the UrlAttribute class.
For a detailed description of client-activated objects and remote object activation, see [<topic://cpconActivation>].
#using <System.Runtime.Remoting.dll> #using <ActivatedServiceTypeEntry_ObjectType_Share.dll> using namespace System; using namespace System::Runtime::Remoting; using namespace System::Runtime::Remoting::Channels; using namespace System::Runtime::Remoting::Channels::Tcp; void main() { ChannelServices::RegisterChannel( gcnew TcpChannel( 8082 ) ); // Create an instance of 'ActivatedServiceTypeEntry' class // which holds the values for 'HelloServer' type. ActivatedServiceTypeEntry^ myActivatedServiceTypeEntry = gcnew ActivatedServiceTypeEntry( HelloServer::typeid ); // Register an object Type on the service end so that // it can be activated on request from a client. RemotingConfiguration::RegisterActivatedServiceType( myActivatedServiceTypeEntry ); // Get the registered activated service types. array<ActivatedServiceTypeEntry^>^ activatedServiceEntries = RemotingConfiguration::GetRegisteredActivatedServiceTypes(); Console::WriteLine( "Information of first registered activated" + " service type :" ); Console::WriteLine( "Object type: {0}", activatedServiceEntries[ 0 ]->ObjectType->ToString() ); Console::WriteLine( "Description: {0}", activatedServiceEntries[ 0 ]->ToString() ); Console::WriteLine( "Press enter to stop this process" ); Console::ReadLine(); }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
