bloritsch    2003/07/29 09:59:56

  Modified:    csframework/src/cs Attributes.cs
  Log:
  update csframework with new attributes
  
  Revision  Changes    Path
  1.6       +86 -59    avalon-sandbox/csframework/src/cs/Attributes.cs
  
  Index: Attributes.cs
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/csframework/src/cs/Attributes.cs,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Attributes.cs     27 Jun 2003 20:52:02 -0000      1.5
  +++ Attributes.cs     29 Jul 2003 16:59:55 -0000      1.6
  @@ -50,82 +50,109 @@
   namespace Apache.AvalonFramework
   {
   
  -///<summary>
  -/// Attribute used to mark the services that a component implements
  -///</summary>        
  -[AttributeUsage(AttributeTargets.Class,AllowMultiple=true)]
  -public sealed class AvalonService : Attribute
  -{
  -     private string m_name;
  -
        ///<summary>
  -     ///  Constructor to initialize the service's name.
  -     ///</summary>
  -     ///<param name="name">The name of the service</param>
  -     public AvalonService(string name)
  +     /// Attribute used to mark the services that a component implements
  +     ///</summary>   
  +     [AttributeUsage(AttributeTargets.Class,AllowMultiple=true)]
  +     public sealed class AvalonService : Attribute
        {
  -             m_name = name;
  +             private string m_name;
  +
  +             ///<summary>
  +             ///  Constructor to initialize the service's name.
  +             ///</summary>
  +             ///<param name="name">The name of the service</param>
  +             public AvalonService(string name)
  +             {
  +                     m_name = name;
  +             }
  +
  +             ///<summary>
  +             ///  The name of the service
  +             ///</summary>
  +             public string Name
  +             {
  +                     get
  +                     {
  +                             return m_name;
  +                     }
  +             }
        }
   
        ///<summary>
  -     ///  The name of the service
  +     ///  Attribute to mark the dependencies for a component.
        ///</summary>
  -     public string Name
  +     [AttributeUsage(AttributeTargets.Class,AllowMultiple=true)]
  +     public sealed class AvalonDependency : Attribute
        {
  -             get
  +             private string m_name;
  +
  +             ///<summary>
  +             ///  Boolean property to see if this dependency is required or not.
  +             ///</summary>
  +             public bool optional;
  +
  +             /// <summary>
  +             ///   String prperty to use to look up the dependency from the
  +             ///   <see cref="IServiceManager"/>
  +             /// </summary>
  +             public string key;
  +
  +             ///<summary>
  +             ///  Constructor to initialize the dependency's name.
  +             ///</summary>
  +             ///<param name="name">The dependency's name</param>
  +             public AvalonDependency(string name)
                {
  -                     return m_name;
  +                     m_name = name;
  +                     optional = false;
  +                     key = name;
                }
  -     }
  -}
   
  -///<summary>
  -///  Attribute to mark the dependencies for a component.
  -///</summary>
  -[AttributeUsage(AttributeTargets.Class,AllowMultiple=true)]
  -public sealed class AvalonDependency : Attribute
  -{
  -     private string m_name;
  +             ///<summary>
  +             ///  The name of the dependency
  +             ///</summary>
  +             public string Name
  +             {
  +                     get
  +                     {
  +                             return m_name;
  +                     }
  +             }
  +     }
   
        ///<summary>
  -     ///  Boolean property to see if this dependency is required or not.
  +     ///  Attribute used to mark a component as an Avalon component.
        ///</summary>
  -     public bool optional;
  +     [AttributeUsage(AttributeTargets.Class,AllowMultiple=false)]
  +     public sealed class AvalonComponent : Attribute
  +     {}
   
        /// <summary>
  -     ///   String prperty to use to look up the dependency from the
  -     ///   <see cref="IServiceManager"/>
  +     ///   Mark a method as the configure method in a component.
        /// </summary>
  -     public string key;
  -
  -     ///<summary>
  -     ///  Constructor to initialize the dependency's name.
  -     ///</summary>
  -     ///<param name="name">The dependency's name</param>
  -     public AvalonDependency(string name)
  -     {
  -             m_name = name;
  -             optional = false;
  -             key = name;
  -     }
  +     [AttributeUsage(AttributeTargets.Method,AllowMultiple=false)]
  +     public sealed class AvalonConfiguration : Attribute
  +     {}
   
  -     ///<summary>
  -     ///  The name of the dependency
  -     ///</summary>
  -     public string Name
  -     {
  -             get
  -             {
  -                     return m_name;
  -             }
  -     }
  -}
  +     /// <summary>
  +     ///   Mark a method as the contextualize method in a component.
  +     /// </summary>
  +     [AttributeUsage(AttributeTargets.Method,AllowMultiple=false)]
  +     public sealed class AvalonLookup : Attribute
  +     {}
   
  -///<summary>
  -///  Attribute used to mark a component as an Avalon component.
  -///</summary>
  -[AttributeUsage(AttributeTargets.Class,AllowMultiple=false)]
  -public sealed class AvalonComponent : Attribute
  -{}
  +     /// <summary>
  +     ///   Mark a method as the initialize method in a component.
  +     /// </summary>
  +     [AttributeUsage(AttributeTargets.Method,AllowMultiple=false)]
  +     public sealed class AvalonInitialize : Attribute
  +     {}
   
  +     /// <summary>
  +     ///   Mark a method as the dispose method in a component.
  +     /// </summary>
  +     [AttributeUsage(AttributeTargets.Method,AllowMultiple=false)]
  +     public sealed class AvalonDispose : Attribute
  +     {}
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to