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
Surađujte s nama na GitHubu
Izvor za ovaj sadržaj možete pronaći na GitHubu, gdje možete stvarati i pregledavati probleme i zahtjeve za povlačenjem. Dodatne informacije potražite u našem vodiču za suradnike.