Set assembly attributes : Assembly Attributes : Assembly C# Examples


C# Examples » Assembly » Assembly Attributes »

 

Set assembly attributes









    
using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.EnterpriseServices;

[assembly:  ApplicationName("Demo")]
[assembly:  Description("C#")]
[assembly:  ApplicationActivation(ActivationOption.Server)]
[assembly:  ApplicationAccessControl(false)]


public  interface  IGreeting  {
        string  Welcome(string  name);
}

[EventTrackingEnabled(true)]
[Description("Simple  Serviced  Component  Sample")]
public  class  SimpleComponent  :  ServicedComponent,  IGreeting  {
        public  SimpleComponent()  {
        }
        public  string  Welcome(string  name)  {
                //  simulate  some  processing  time
                System.Threading.Thread.Sleep(1000);
                return  "Hello,  "  +  name;
        }
}
class  Program  {
        static  void  Main(string[]  args)  {
                using  (SimpleComponent  obj  =  new  SimpleComponent())  {
                        for  (int  i  =  0;  i  <  10;  i++)  {
                                Console.WriteLine(obj.Welcome("Kathie"));
                        }
                }
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Assembly
» Assembly Attributes