hammett 2004/04/17 20:21:57
Modified: avalon-net/csframework/AvalonFramework/Attributes
AvalonContextAttribute.cs
AvalonDependencyAttribute.cs
AvalonEntryAttribute.cs AvalonLoggerAttribute.cs
Log:
Corrections
Revision Changes Path
1.4 +1 -1
avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonContextAttribute.cs
Index: AvalonContextAttribute.cs
===================================================================
RCS file:
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonContextAttribute.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AvalonContextAttribute.cs 28 Feb 2004 22:15:41 -0000 1.3
+++ AvalonContextAttribute.cs 18 Apr 2004 03:21:57 -0000 1.4
@@ -21,7 +21,7 @@
/// of a custom context interface classname that a
/// component may safely cast a supplied context instance to.
/// </summary>
- [AttributeUsage(
AttributeTargets.Property|AttributeTargets.Method|AttributeTargets.Class,
AllowMultiple=false,Inherited=true)]
+ [AttributeUsage(AttributeTargets.Class,AllowMultiple=false,Inherited=true)]
public class AvalonContextAttribute : Attribute
{
private Type m_contextType;
1.5 +1 -1
avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonDependencyAttribute.cs
Index: AvalonDependencyAttribute.cs
===================================================================
RCS file:
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonDependencyAttribute.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AvalonDependencyAttribute.cs 28 Feb 2004 22:15:41 -0000 1.4
+++ AvalonDependencyAttribute.cs 18 Apr 2004 03:21:57 -0000 1.5
@@ -16,5 +16,5 @@
{
using System;
- /// <summary>
/// An enumeration used to mark a dependency as optional or not.
/// </summary>
public enum Optional
{
/// <summary>
/// Use "True" if the dependency is not required for the component
/// to run properly.
/// </summary>
True,
/// <summary>
/// Use "False" if the component will not work without the dependnecy.
/// </summary>
False
}
///<summary>
/// Attribute to mark the dependencies for a component.
///</summary>
[AttributeUsage(
AttributeTargets.Constructor|AttributeTargets.Property|AttributeTargets.Method|AttributeTargets.Class,
AllowMultiple=true,Inherited=true)]
public sealed class AvalonDependencyAttribute : Attribute
{
private Type m_type;
private bool m_optional;
private string m_name;
///<summary>
/// Constructor to initialize the dependency's name.
///</summary>
///<param name="type">The type for the dependency</param>
///<param name="key">The dependency's lookup key</param>
///<param name="optional">Whether or not the dependency is
optional</param>
///<exception cref="ArgumentException">If the "type" value is not an
interface</exception>
public AvalonDependencyAttribute(Type type, string key, Optional
optional)
{
if (!type.IsInterface)
{
throw new ArgumentException(
"The type passed in does not represent an
interface",
"type" );
}
m_name = (null == key) ? type.Name : key;
m_optional = (optional == Optional.True);
m_type = type;
}
///<summary>
/// The lookup name of the dependency
///</summary>
public string Key
{
get
{
return m_name;
}
}
///<summary>
/// Is this dependency optional?
///</summary>
public bool IsOptional
{
get
{
return m_optional;
}
}
/// <summary>
/// The dependency type
/// </summary>
public Type DependencyType
{
get
{
return m_type;
}
}
}
+ /// <summary>
/// An enumeration used to mark a dependency as optional or not.
/// </summary>
public enum Optional
{
/// <summary>
/// Use "True" if the dependency is not required for the component
/// to run properly.
/// </summary>
True,
/// <summary>
/// Use "False" if the component will not work without the dependnecy.
/// </summary>
False
}
///<summary>
/// Attribute to mark the dependencies for a component.
///</summary>
[AttributeUsage(AttributeTargets.Class,AllowMultiple=true,Inherited=true)]
public sealed class AvalonDependencyAttribute : Attribute
{
private Type m_type;
private bool m_optional;
private string m_name;
///<summary>
/// Constructor to initialize the dependency's name.
///</summary>
///<param name="type">The type for the dependency</param>
///<param name="key">The dependency's lookup key</param>
///<param name="optional">Whether or not the dependency is
optional</param>
///<exception cref="ArgumentException">If the "type" value is not an
interface</exception>
public AvalonDependencyAttribute(Type type, string key, Optional
optional)
{
if (!type.IsInterface)
{
throw new ArgumentException(
"The type passed in does not represent an
interface",
"type" );
}
m_name = (null == key) ? type.Name : key;
m_optional = (optional == Optional.True);
m_type = type;
}
///<summary>
/// The lookup name of the dependency
///</summary>
public string Key
{
get
{
return m_name;
}
}
///<summary>
/// Is this dependency optional?
///</summary>
public bool IsOptional
{
get
{
return m_optional;
}
}
/// <summary>
/// The dependency type
/// </summary>
public Type DependencyType
{
get
{
return m_type;
}
}
}
}
1.5 +1 -3
avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonEntryAttribute.cs
Index: AvalonEntryAttribute.cs
===================================================================
RCS file:
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonEntryAttribute.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AvalonEntryAttribute.cs 28 Feb 2004 22:15:41 -0000 1.4
+++ AvalonEntryAttribute.cs 18 Apr 2004 03:21:57 -0000 1.5
@@ -20,9 +20,7 @@
/// The AvalonEntryAttribute Attribute declares a context entry
/// required by a component.
/// </summary>
- [AttributeUsage(
-
AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property,
- AllowMultiple=false,Inherited=true)]
+ [AttributeUsage(AttributeTargets.Class,AllowMultiple=false,Inherited=true)]
public class AvalonEntryAttribute : Attribute
{
private String m_alias;
1.4 +1 -1
avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonLoggerAttribute.cs
Index: AvalonLoggerAttribute.cs
===================================================================
RCS file:
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/Attributes/AvalonLoggerAttribute.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AvalonLoggerAttribute.cs 28 Feb 2004 22:15:41 -0000 1.3
+++ AvalonLoggerAttribute.cs 18 Apr 2004 03:21:57 -0000 1.4
@@ -16,5 +16,5 @@
{
using System;
- ///<summary>
/// Attribute to declare the name of a logging channel that is consumed
/// by a component.
///</summary>
[AttributeUsage(
AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property,
AllowMultiple=false,Inherited=false)]
public sealed class AvalonLoggerAttribute : Attribute
{
private string m_name;
/// <summary>
/// Marks a class with the logger channel name.
/// </summary>
/// <param name="name">The name of a subsidiary logging channel</param>
/// <param name="lifestyle">The lifestyle used for the
component</param>
public AvalonLoggerAttribute( string name )
{
m_name = name;
}
/// <summary>
/// The name of a subsidiary logging channel
/// relative to the logging channel that is
/// supplied to the component by the container.
/// </summary>
public string Name
{
get
{
return m_name;
}
}
}
+ ///<summary>
/// Attribute to declare the name of a logging channel that is consumed
/// by a component.
///</summary>
[AttributeUsage(AttributeTargets.Class,AllowMultiple=false,Inherited=false)]
public sealed class AvalonLoggerAttribute : Attribute
{
private string m_name;
/// <summary>
/// Marks a class with the logger channel name.
/// </summary>
/// <param name="name">The name of a subsidiary logging channel</param>
/// <param name="lifestyle">The lifestyle used for the
component</param>
public AvalonLoggerAttribute( string name )
{
m_name = name;
}
/// <summary>
/// The name of a subsidiary logging channel
/// relative to the logging channel that is
/// supplied to the component by the container.
/// </summary>
public string Name
{
get
{
return m_name;
}
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]