ApplicationNameAttribute(String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ApplicationNameAttribute class, specifying the name of the COM+ application to be used for the install of the components.
public:
ApplicationNameAttribute(System::String ^ name);
public ApplicationNameAttribute (string name);
new System.EnterpriseServices.ApplicationNameAttribute : string -> System.EnterpriseServices.ApplicationNameAttribute
Public Sub New (name As String)
Parameters
- name
- String
The name of the COM+ application.
Examples
The following example illustrates the use of this attribute to mark a ServicedComponent class.
[assembly:ApplicationName("Calculator")];
[assembly:ApplicationActivation(ActivationOption::Library)];
[assembly:System::Reflection::AssemblyKeyFile("Calculator.snk")];
public ref class Calculator: public ServicedComponent
{
public:
int Add( int x, int y )
{
return (x + y);
}
};
using System;
using System.EnterpriseServices;
[assembly: ApplicationName("Calculator")]
[assembly: ApplicationActivation(ActivationOption.Library)]
[assembly: System.Reflection.AssemblyKeyFile("Calculator.snk")]
public class Calculator : ServicedComponent
{
public int Add (int x, int y)
{
return(x+y);
}
}
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.