avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: avalon-sandbox/avalon-net/csframework/AvalonFramework/Context DefaultContext.cs
Date Mon, 19 Jan 2004 01:22:55 GMT
hammett     2004/01/18 17:22:55

  Modified:    avalon-net/csframework/AvalonFramework/Attributes
                        AvalonDependencyAttribute.cs
                        AvalonEntryAttribute.cs
               avalon-net/csframework/AvalonFramework AvalonFramework.sln
  Added:       avalon-net/csframework/AvalonFramework/Context
                        DefaultContext.cs
  Log:
  Avalon Framework updates and corrections. - At this point the current Container implementation
should not compile anymore. Lot of work to do.
  
  Revision  Changes    Path
  1.2       +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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDependencyAttribute.cs	18 Jan 2004 22:56:53 -0000	1.1
  +++ AvalonDependencyAttribute.cs	19 Jan 2004 01:22:55 -0000	1.2
  @@ -49,5 +49,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.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.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;
			}
		}
}
   }
  
  
  
  1.2       +1 -1      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonEntryAttribute.cs	18 Jan 2004 22:56:53 -0000	1.1
  +++ AvalonEntryAttribute.cs	19 Jan 2004 01:22:55 -0000	1.2
  @@ -54,7 +54,7 @@
   	/// required by a component.
   	/// </summary>
   	[AttributeUsage(
  -		 AttributeTargets.Method|AttributeTargets.Property,
  +		 AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property,
   		 AllowMultiple=false,Inherited=true)]
   	public class AvalonEntryAttribute : Attribute
   	{
  
  
  
  1.4       +12 -20    avalon-sandbox/avalon-net/csframework/AvalonFramework/AvalonFramework.sln
  
  Index: AvalonFramework.sln
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/AvalonFramework.sln,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonFramework.sln	18 Jan 2004 22:56:54 -0000	1.3
  +++ AvalonFramework.sln	19 Jan 2004 01:22:55 -0000	1.4
  @@ -1,21 +1,17 @@
   Microsoft Visual Studio Solution File, Format Version 8.00
  -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonFramework", "AvalonFramework.csproj",
"{A4DA9A13-FD5A-42A0-97C5-18CEDA5CB1A5}"
  +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Avalon.Framework", "Apache.Avalon.Framework.csproj",
"{A4DA9A13-FD5A-42A0-97C5-18CEDA5CB1A5}"
   	ProjectSection(ProjectDependencies) = postProject
   	EndProjectSection
   EndProject
  -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonFrameworkTest", "..\AvalonFrameworkTest\AvalonFrameworkTest.csproj",
"{E690C5BB-6DA6-4375-8550-E4340CEA9FDD}"
  +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Avalon.Framework.Test", "..\AvalonFrameworkTest\Apache.Avalon.Framework.Test.csproj",
"{E690C5BB-6DA6-4375-8550-E4340CEA9FDD}"
   	ProjectSection(ProjectDependencies) = postProject
   	EndProjectSection
   EndProject
  -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonContainer", "..\..\cscontainer\AvalonContainer\AvalonContainer.csproj",
"{0638D63A-8CE2-435B-89B8-E67A3D1904F7}"
  +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Avalon.Meta", "..\..\Meta\Apache.Avalon.Meta.csproj",
"{1AFD63DC-D552-49B7-9088-03C1A4DED598}"
   	ProjectSection(ProjectDependencies) = postProject
   	EndProjectSection
   EndProject
  -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonContainerTest", "..\..\cscontainer\AvalonContainerTest\AvalonContainerTest.csproj",
"{DE388F53-A538-424E-B289-DB5D05BC0169}"
  -	ProjectSection(ProjectDependencies) = postProject
  -	EndProjectSection
  -EndProject
  -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Components", "..\..\cscontainer\Samples\Components\Components.csproj",
"{27FA06F3-EDE3-45C6-BC09-A2276E526203}"
  +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Avalon.Meta.Test", "..\..\MetaTest\Apache.Avalon.Meta.Test.csproj",
"{71F72AE0-E10D-4FA8-88B5-C6D9026E9A3A}"
   	ProjectSection(ProjectDependencies) = postProject
   	EndProjectSection
   EndProject
  @@ -33,18 +29,14 @@
   		{E690C5BB-6DA6-4375-8550-E4340CEA9FDD}.Debug.Build.0 = Debug|.NET
   		{E690C5BB-6DA6-4375-8550-E4340CEA9FDD}.Release.ActiveCfg = Release|.NET
   		{E690C5BB-6DA6-4375-8550-E4340CEA9FDD}.Release.Build.0 = Release|.NET
  -		{0638D63A-8CE2-435B-89B8-E67A3D1904F7}.Debug.ActiveCfg = Debug|.NET
  -		{0638D63A-8CE2-435B-89B8-E67A3D1904F7}.Debug.Build.0 = Debug|.NET
  -		{0638D63A-8CE2-435B-89B8-E67A3D1904F7}.Release.ActiveCfg = Release|.NET
  -		{0638D63A-8CE2-435B-89B8-E67A3D1904F7}.Release.Build.0 = Release|.NET
  -		{DE388F53-A538-424E-B289-DB5D05BC0169}.Debug.ActiveCfg = Debug|.NET
  -		{DE388F53-A538-424E-B289-DB5D05BC0169}.Debug.Build.0 = Debug|.NET
  -		{DE388F53-A538-424E-B289-DB5D05BC0169}.Release.ActiveCfg = Release|.NET
  -		{DE388F53-A538-424E-B289-DB5D05BC0169}.Release.Build.0 = Release|.NET
  -		{27FA06F3-EDE3-45C6-BC09-A2276E526203}.Debug.ActiveCfg = Debug|.NET
  -		{27FA06F3-EDE3-45C6-BC09-A2276E526203}.Debug.Build.0 = Debug|.NET
  -		{27FA06F3-EDE3-45C6-BC09-A2276E526203}.Release.ActiveCfg = Release|.NET
  -		{27FA06F3-EDE3-45C6-BC09-A2276E526203}.Release.Build.0 = Release|.NET
  +		{1AFD63DC-D552-49B7-9088-03C1A4DED598}.Debug.ActiveCfg = Debug|.NET
  +		{1AFD63DC-D552-49B7-9088-03C1A4DED598}.Debug.Build.0 = Debug|.NET
  +		{1AFD63DC-D552-49B7-9088-03C1A4DED598}.Release.ActiveCfg = Release|.NET
  +		{1AFD63DC-D552-49B7-9088-03C1A4DED598}.Release.Build.0 = Release|.NET
  +		{71F72AE0-E10D-4FA8-88B5-C6D9026E9A3A}.Debug.ActiveCfg = Debug|.NET
  +		{71F72AE0-E10D-4FA8-88B5-C6D9026E9A3A}.Debug.Build.0 = Debug|.NET
  +		{71F72AE0-E10D-4FA8-88B5-C6D9026E9A3A}.Release.ActiveCfg = Release|.NET
  +		{71F72AE0-E10D-4FA8-88B5-C6D9026E9A3A}.Release.Build.0 = Release|.NET
   	EndGlobalSection
   	GlobalSection(ExtensibilityGlobals) = postSolution
   	EndGlobalSection
  
  
  
  1.1                  avalon-sandbox/avalon-net/csframework/AvalonFramework/Context/DefaultContext.cs
  
  Index: DefaultContext.cs
  ===================================================================
  // ============================================================================
  //                   The Apache Software License, Version 1.1
  // ============================================================================
  // 
  // Copyright (C) 2002-2003 The Apache Software Foundation. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or without modifica-
  // tion, are permitted provided that the following conditions are met:
  // 
  // 1. Redistributions of  source code must  retain the above copyright  notice,
  //    this list of conditions and the following disclaimer.
  // 
  // 2. Redistributions in binary form must reproduce the above copyright notice,
  //    this list of conditions and the following disclaimer in the documentation
  //    and/or other materials provided with the distribution.
  // 
  // 3. The end-user documentation included with the redistribution, if any, must
  //    include  the following  acknowledgment:  "This product includes  software
  //    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  //    Alternately, this  acknowledgment may  appear in the software itself,  if
  //    and wherever such third-party acknowledgments normally appear.
  // 
  // 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"  
  //    must not be used to endorse or promote products derived from this  software 
  //    without  prior written permission. For written permission, please contact 
  //    apache@apache.org.
  // 
  // 5. Products  derived from this software may not  be called "Apache", nor may
  //    "Apache" appear  in their name,  without prior written permission  of the
  //    Apache Software Foundation.
  // 
  // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  // FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  // APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  // INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  // DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  // OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  // ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  // (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  // 
  // This software  consists of voluntary contributions made  by many individuals
  // on  behalf of the Apache Software  Foundation. For more  information on the 
  // Apache Software Foundation, please see <http://www.apache.org/>.
  // ============================================================================
  
  namespace Apache.Avalon.Framework
  {
  	using System;
  
  	/// <summary>
  	/// TODO: Implement this default context implementation
  	/// </summary>
  	public class DefaultContext : IContext
  	{
  		public DefaultContext()
  		{
  		}
  
  		#region IContext Members
  
  		public object this[object key]
  		{
  			get
  			{
  				// TODO:  Add Context.this getter implementation
  				return null;
  			}
  		}
  
  		#endregion
  	}
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message