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
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.