You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ha...@apache.org on 2004/07/04 22:48:12 UTC

svn commit: rev 22579 - in avalon/trunk/central/laboratory/avalon-net: Castle/MicroKernel Castle/MicroKernel/Aspects Castle/MicroKernel/Concerns/Default Castle/MicroKernel/Handler Castle/MicroKernel/MicroKernelTest Castle/MicroKernel/MicroKernelTest/Business Castle/MicroKernel/MicroKernelTest/Business/Components Castle/MicroKernel/Subsystems/Configuration Castle/MicroKernel/Subsystems/Configuration/Default Castle/MicroKernel/Subsystems/Context/Default Castle/MicroKernel/Subsystems/Events Castle/MicroKernel/Subsystems/Events/Default Castle/MicroKernel/Subsystems/Logger Castle/MicroKernel/Subsystems/Logger/Default Castle/MicroKernel/Subsystems/Lookup Castle/MicroKernel/Subsystems/Lookup/Default Framework/AvalonFramework

Author: hammett
Date: Sun Jul  4 13:48:11 2004
New Revision: 22579

Added:
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/AbstractBusinessObject.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/BusinessObject.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObject.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObjectImpl.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccess.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccessImpl.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventManagerTestCase.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventSubsystemTestCase.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/LoggerManagerTestCase.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/Default/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/Default/EventManager.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/EventManagerData.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/IEventManager.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/Default/
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/Default/LookupCriteriaMatcher.cs   (contents, props changed)
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/ILookupCriteriaMatcher.cs   (contents, props changed)
Removed:
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/AvalonConfigurationSectionHandler.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/ContainerConfiguration.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/AvalonLoggerSectionHandler.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/LoggerConfiguration.cs
Modified:
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Aspects/AspectInvocationHandler.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/BaseKernel.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Concerns/Default/EnableLookupConcern.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Handler/AbstractHandler.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Kernel.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/KernelConstants.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Apache.Avalon.Castle.MicroKernel.Test.csproj
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/DefaultConfigurationManagerTestCase.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/DefaultConfigurationManager.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/IConfigurationManager.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Context/Default/ContextManager.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/LoggerManager.cs
   avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/ILoggerManager.cs
   avalon/trunk/central/laboratory/avalon-net/Framework/AvalonFramework/ILookupManager.cs
Log:
Event subsystem - Inspired by Dojo architecture.
Lookup Criteria and subsystem to allow custom criteria matcher algorithm.

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj	Sun Jul  4 13:48:11 2004
@@ -1,450 +1,455 @@
-<VisualStudioProject>
-    <CSHARP
-        ProjectType = "Local"
-        ProductVersion = "7.10.3077"
-        SchemaVersion = "2.0"
-        ProjectGuid = "{1E57B734-BA4B-4ADE-B4C2-78C7D4993AD4}"
-    >
-        <Build>
-            <Settings
-                ApplicationIcon = ""
-                AssemblyKeyContainerName = ""
-                AssemblyName = "Apache.Avalon.Castle.MicroKernel"
-                AssemblyOriginatorKeyFile = ""
-                DefaultClientScript = "JScript"
-                DefaultHTMLPageLayout = "Grid"
-                DefaultTargetSchema = "IE50"
-                DelaySign = "false"
-                OutputType = "Library"
-                PreBuildEvent = ""
-                PostBuildEvent = ""
-                RootNamespace = "Apache.Avalon.Castle.MicroKernel"
-                RunPostBuildEvent = "OnBuildSuccess"
-                StartupObject = ""
-            >
-                <Config
-                    Name = "Debug"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "DEBUG;TRACE"
-                    DocumentationFile = ""
-                    DebugSymbols = "true"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = ""
-                    Optimize = "false"
-                    OutputPath = "..\bin\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-                <Config
-                    Name = "Release"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "TRACE"
-                    DocumentationFile = ""
-                    DebugSymbols = "false"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = ""
-                    Optimize = "true"
-                    OutputPath = "bin\Release\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-            </Settings>
-            <References>
-                <Reference
-                    Name = "System"
-                    AssemblyName = "System"
-                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
-                />
-                <Reference
-                    Name = "System.Data"
-                    AssemblyName = "System.Data"
-                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
-                />
-                <Reference
-                    Name = "System.XML"
-                    AssemblyName = "System.Xml"
-                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
-                />
-                <Reference
-                    Name = "Apache.Avalon.DynamicProxy"
-                    AssemblyName = "Apache.Avalon.DynamicProxy"
-                    HintPath = "..\bin\Apache.Avalon.DynamicProxy.dll"
-                />
-                <Reference
-                    Name = "Apache.Avalon.Framework"
-                    AssemblyName = "Apache.Avalon.Framework"
-                    HintPath = "..\bin\Apache.Avalon.Framework.dll"
-                />
-            </References>
-        </Build>
-        <Files>
-            <Include>
-                <File
-                    RelPath = "AssemblyInfo.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "AssertUtil.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "AvalonKernel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "BaseKernel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "DefaultKernel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "IKernelSubsystem.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "IResolver.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Kernel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "KernelConstants.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Aspects\AspectInvocationHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Aspects\AspectPointCutFlags.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Aspects\IAspect.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Assemble\Assembler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\ConcernManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\ICommissionConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\IConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\ICreationConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\IDecommissionConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\IDestructionConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\AbstractConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\ConfigureConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\ContextConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\CreationConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\DestructionConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\EnableLoggerConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\EnableLookupConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\InitializeConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\ShutdownConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Concerns\Default\StartConcern.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Factory\IComponentFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Factory\Default\ComponentInstanceBurden.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Factory\Default\ConcernChainComponentFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Factory\Default\SimpleComponentFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\AbstractHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\HandlerException.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\IHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\IHandlerFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\State.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\Default\DefaultHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\Default\DefaultHandlerFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\Default\SimpleHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Handler\Default\SimpleHandlerFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\ILifestyleManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\ILifestyleManagerFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\UnsupportedLifestyleException.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\Default\AbstractLifestyleManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\Default\PerThreadLifestyleManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\Default\SimpleLifestyleManagerFactory.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\Default\SingletonLifestyleManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Lifestyle\Default\TransientLifestyleManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\IComponentModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\IComponentModelBuilder.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\IConstructionModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\IDependencyModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\ModelBuilderException.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\Default\DefaultComponentModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\Default\DefaultComponentModelBuilder.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\Default\DefaultConstructionModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Model\Default\DefaultDependencyModel.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\AbstractSubsystem.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Configuration\IConfigurationManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Configuration\Default\AvalonConfigurationSectionHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Configuration\Default\ContainerConfiguration.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Configuration\Default\DefaultConfigurationManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Context\IContextManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Context\Default\ContextManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Logger\ILoggerManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Logger\Default\AvalonLoggerSectionHandler.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Logger\Default\LoggerConfiguration.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Subsystems\Logger\Default\LoggerManager.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-            </Include>
-        </Files>
-    </CSHARP>
-</VisualStudioProject>
-
+<VisualStudioProject>
+    <CSHARP
+        ProjectType = "Local"
+        ProductVersion = "7.10.3077"
+        SchemaVersion = "2.0"
+        ProjectGuid = "{1E57B734-BA4B-4ADE-B4C2-78C7D4993AD4}"
+    >
+        <Build>
+            <Settings
+                ApplicationIcon = ""
+                AssemblyKeyContainerName = ""
+                AssemblyName = "Apache.Avalon.Castle.MicroKernel"
+                AssemblyOriginatorKeyFile = ""
+                DefaultClientScript = "JScript"
+                DefaultHTMLPageLayout = "Grid"
+                DefaultTargetSchema = "IE50"
+                DelaySign = "false"
+                OutputType = "Library"
+                PreBuildEvent = ""
+                PostBuildEvent = ""
+                RootNamespace = "Apache.Avalon.Castle.MicroKernel"
+                RunPostBuildEvent = "OnBuildSuccess"
+                StartupObject = ""
+            >
+                <Config
+                    Name = "Debug"
+                    AllowUnsafeBlocks = "false"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "DEBUG;TRACE"
+                    DocumentationFile = ""
+                    DebugSymbols = "true"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "false"
+                    OutputPath = "..\bin\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "4"
+                />
+                <Config
+                    Name = "Release"
+                    AllowUnsafeBlocks = "false"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "TRACE"
+                    DocumentationFile = ""
+                    DebugSymbols = "false"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "true"
+                    OutputPath = "bin\Release\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "4"
+                />
+            </Settings>
+            <References>
+                <Reference
+                    Name = "System"
+                    AssemblyName = "System"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+                />
+                <Reference
+                    Name = "System.Data"
+                    AssemblyName = "System.Data"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+                />
+                <Reference
+                    Name = "System.XML"
+                    AssemblyName = "System.Xml"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+                />
+                <Reference
+                    Name = "Apache.Avalon.Framework"
+                    AssemblyName = "Apache.Avalon.Framework"
+                    HintPath = "..\..\bin\Apache.Avalon.Framework.dll"
+                />
+                <Reference
+                    Name = "Apache.Avalon.DynamicProxy"
+                    AssemblyName = "Apache.Avalon.DynamicProxy"
+                    HintPath = "..\..\bin\Apache.Avalon.DynamicProxy.dll"
+                />
+            </References>
+        </Build>
+        <Files>
+            <Include>
+                <File
+                    RelPath = "AssemblyInfo.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "AssertUtil.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "AvalonKernel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "BaseKernel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "DefaultKernel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "IKernelSubsystem.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "IResolver.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Kernel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "KernelConstants.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Aspects\AspectInvocationHandler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Aspects\AspectPointCutFlags.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Aspects\IAspect.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Assemble\Assembler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\ConcernManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\ICommissionConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\IConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\ICreationConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\IDecommissionConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\IDestructionConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\AbstractConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\ConfigureConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\ContextConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\CreationConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\DestructionConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\EnableLoggerConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\EnableLookupConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\InitializeConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\ShutdownConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Concerns\Default\StartConcern.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Factory\IComponentFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Factory\Default\ComponentInstanceBurden.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Factory\Default\ConcernChainComponentFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Factory\Default\SimpleComponentFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\AbstractHandler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\HandlerException.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\IHandler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\IHandlerFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\State.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\Default\DefaultHandler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\Default\DefaultHandlerFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\Default\SimpleHandler.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Handler\Default\SimpleHandlerFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\ILifestyleManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\ILifestyleManagerFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\UnsupportedLifestyleException.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\Default\AbstractLifestyleManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\Default\PerThreadLifestyleManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\Default\SimpleLifestyleManagerFactory.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\Default\SingletonLifestyleManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Lifestyle\Default\TransientLifestyleManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\IComponentModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\IComponentModelBuilder.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\IConstructionModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\IDependencyModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\ModelBuilderException.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\Default\DefaultComponentModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\Default\DefaultComponentModelBuilder.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\Default\DefaultConstructionModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Model\Default\DefaultDependencyModel.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\AbstractSubsystem.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Configuration\IConfigurationManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Configuration\Default\DefaultConfigurationManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Context\IContextManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Context\Default\ContextManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Events\EventManagerData.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Events\IEventManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Events\Default\EventManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Logger\ILoggerManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Logger\Default\LoggerManager.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Lookup\ILookupCriteriaMatcher.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Subsystems\Lookup\Default\LookupCriteriaMatcher.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+            </Include>
+        </Files>
+    </CSHARP>
+</VisualStudioProject>
+

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Aspects/AspectInvocationHandler.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Aspects/AspectInvocationHandler.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Aspects/AspectInvocationHandler.cs	Sun Jul  4 13:48:11 2004
@@ -36,17 +36,8 @@
 
 		#region IInvocationHandler Members
 
-		public object Invoke(object proxy, MethodBase method, params object[] arguments)
+		public object Invoke(object proxy, MethodInfo method, params object[] arguments)
 		{
-			Type[] parameters = new Type[arguments.Length];
-
-			for(int i=0; i < arguments.Length; i++ )
-			{
-				parameters[i] = arguments[i].GetType();
-			}
-
-			MethodInfo targetMethod = m_target.GetType().GetMethod( method.Name, parameters );
-			
 			Object returnValue = null;
 			Exception exceptionThrowed = null;
 
@@ -54,7 +45,7 @@
 
 			try
 			{
-				targetMethod.Invoke( m_target, arguments );
+				method.Invoke( m_target, arguments );
 			}
 			catch(Exception ex)
 			{

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/BaseKernel.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/BaseKernel.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/BaseKernel.cs	Sun Jul  4 13:48:11 2004
@@ -20,6 +20,9 @@
 
 	using Apache.Avalon.DynamicProxy;
 	using Apache.Avalon.Castle.MicroKernel.Model;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Lookup.Default;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Events;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Events.Default;
 
 	/// <summary>
 	/// Summary description for BaseKernel.
@@ -58,6 +61,9 @@
 			m_handlerFactory = new Handler.Default.SimpleHandlerFactory();
 			m_lifestyleManagerFactory = new Lifestyle.Default.SimpleLifestyleManagerFactory();
 			m_componentModelBuilder = new Model.Default.DefaultComponentModelBuilder( this );
+
+			AddSubsystem( KernelConstants.LOOKUP, new LookupCriteriaMatcher() );
+			AddSubsystem( KernelConstants.EVENTS, new EventManager() );
 		}
 
 		#region Kernel Members
@@ -94,7 +100,7 @@
 
 			m_components[ key ] = handler;
 
-			OnNewHandler( service, handler );
+			OnNewHandler( key, service, implementation, handler );
 		}
 
 		/// <summary>
@@ -148,6 +154,12 @@
 			}
 		}
 
+		public IHandler GetHandler( String key, object criteria )
+		{
+			// TODO: IHandler GetHandler( String key, object criteria )
+			return null;
+		}
+
 		public IHandlerFactory HandlerFactory
 		{
 			get
@@ -259,10 +271,16 @@
 
 		#endregion
 
-		private void OnNewHandler( Type service, IHandler handler )
+		private void OnNewHandler( String key, Type service, Type implementation, IHandler handler )
 		{
 			m_services[ service ] = handler;
+			
+			RaiseDependencyEvent( service, handler );
+			RaiseSubsystemNewComponentEvent( key, service, implementation );
+		}
 
+		private void RaiseDependencyEvent( Type service, IHandler handler )
+		{
 			lock(m_dependencyToSatisfy)
 			{
 				if (!m_dependencyToSatisfy.Contains( service ))
@@ -275,6 +293,18 @@
 
 				m_dependencyToSatisfy.Remove( service );
 			}
+		}
+
+		private void RaiseSubsystemNewComponentEvent( String key, Type service, Type implementation )
+		{
+			IEventManager eventManager = (IEventManager) GetSubsystem( KernelConstants.EVENTS );
+
+			if (eventManager == null)
+			{
+				return;
+			}
+
+			eventManager.OnComponentAdded( new EventManagerData( key, service, implementation ) );
 		}
 	}
 }

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Concerns/Default/EnableLookupConcern.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Concerns/Default/EnableLookupConcern.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Concerns/Default/EnableLookupConcern.cs	Sun Jul  4 13:48:11 2004
@@ -139,6 +139,12 @@
 				return m_key2handler.Contains( role );
 			}
 
+			public object LookUp(string role, object criteria)
+			{
+				return null;
+				// return m_key2handler.Contains( role );
+			}
+
 			#endregion
 		}
 	}

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Handler/AbstractHandler.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Handler/AbstractHandler.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Handler/AbstractHandler.cs	Sun Jul  4 13:48:11 2004
@@ -107,6 +107,8 @@
 
 		protected virtual void RegisterInstance( object instance )
 		{
+			RaiseComponentCreatedEvent( instance );
+
 			if (!HasInstance( instance, false ))
 			{
 				// WeakReference reference = new WeakReference( instance );
@@ -117,6 +119,8 @@
 
 		protected virtual void UnregisterInstance( object instance )
 		{
+			RaiseComponentCreatedEvent( instance );
+
 			if (m_instances.Count == 0)
 			{
 				return;

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Kernel.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Kernel.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Kernel.cs	Sun Jul  4 13:48:11 2004
@@ -41,13 +41,6 @@
 		void AddAspect( AspectPointCutFlags flags, IAspect aspect );
 
 		/// <summary>
-		/// Adds a subsystem.
-		/// </summary>
-		/// <param name="key">Name of this subsystem</param>
-		/// <param name="system">Subsystem implementation</param>
-		void AddSubsystem( String key, IKernelSubsystem system );
-
-		/// <summary>
 		/// IComponentModel instance builder.
 		/// </summary>
 		IComponentModelBuilder ModelBuilder
@@ -65,6 +58,14 @@
 			get;
 		}
 
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="key"></param>
+		/// <param name="criteria"></param>
+		/// <returns></returns>
+		IHandler GetHandler( String key, object criteria );
+
 		/// <summary>
 		/// Gets or Sets the IHandlerFactory implementation
 		/// </summary>
@@ -114,6 +115,13 @@
 		/// <param name="service">The service interface</param>
 		/// <returns>IHandler implementation</returns>
 		IHandler GetHandlerForService( Type service );
+
+		/// <summary>
+		/// Adds a subsystem.
+		/// </summary>
+		/// <param name="key">Name of this subsystem</param>
+		/// <param name="system">Subsystem implementation</param>
+		void AddSubsystem( String key, IKernelSubsystem system );
 
 		/// <summary>
 		/// Returns a registered subsystem;

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/KernelConstants.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/KernelConstants.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/KernelConstants.cs	Sun Jul  4 13:48:11 2004
@@ -17,14 +17,33 @@
 	using System;
 
 	/// <summary>
-	/// Summary description for KernelConstants.
+	/// Holds general Subsystem's names.
 	/// </summary>
 	public abstract class KernelConstants
 	{
+		/// <summary>
+		/// Identifies the ConfigurationManager subsystem.
+		/// </summary>
 		public static readonly String CONFIGURATION = "configuration";
 
+		/// <summary>
+		/// Identifies the LoggerManager subsystem.
+		/// </summary>
 		public static readonly String LOGGER = "logger";
 
+		/// <summary>
+		/// Identifies the ContextManager subsystem.
+		/// </summary>
 		public static readonly String CONTEXT = "context";
+
+		/// <summary>
+		/// Identifies the LookupCriteriaMatcher subsystem.
+		/// </summary>
+		public static readonly String LOOKUP = "lookup";
+
+		/// <summary>
+		/// Identifies the EventManager subsystem.
+		/// </summary>
+		public static readonly String EVENTS = "events";
 	}
 }

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Apache.Avalon.Castle.MicroKernel.Test.csproj
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Apache.Avalon.Castle.MicroKernel.Test.csproj	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Apache.Avalon.Castle.MicroKernel.Test.csproj	Sun Jul  4 13:48:11 2004
@@ -80,11 +80,6 @@
                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                 />
                 <Reference
-                    Name = "nunit.framework"
-                    AssemblyName = "nunit.framework"
-                    HintPath = "..\..\..\..\..\..\..\..\dotnet\NUnit2\bin\nunit.framework.dll"
-                />
-                <Reference
                     Name = "MicroKernel"
                     Project = "{1E57B734-BA4B-4ADE-B4C2-78C7D4993AD4}"
                     Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
@@ -92,7 +87,12 @@
                 <Reference
                     Name = "Apache.Avalon.Framework"
                     AssemblyName = "Apache.Avalon.Framework"
-                    HintPath = "..\..\bin\Apache.Avalon.Framework.dll"
+                    HintPath = "..\..\..\bin\Apache.Avalon.Framework.dll"
+                />
+                <Reference
+                    Name = "nunit.framework"
+                    AssemblyName = "nunit.framework"
+                    HintPath = "..\..\..\..\..\..\..\..\..\..\dotnet\NUnit2\bin\nunit.framework.dll"
                 />
             </References>
         </Build>
@@ -144,12 +144,52 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "EventManagerTestCase.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "EventSubsystemTestCase.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "LoggerManagerTestCase.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
                     RelPath = "SimpleComponentFactoryTestCase.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\AbstractBusinessObject.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\BusinessObject.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\CustomerBusinessObject.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\CustomerBusinessObjectImpl.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\CustomerDataAccess.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Business\Components\CustomerDataAccessImpl.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/AbstractBusinessObject.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/AbstractBusinessObject.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,50 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for AbstractBusinessObject.
+	/// </summary>
+	public abstract class AbstractBusinessObject : BusinessObject
+	{
+		protected int m_id;
+
+		public AbstractBusinessObject()
+		{
+		}
+
+		#region BusinessObject Members
+
+		public virtual int ID
+		{
+			get
+			{
+				return m_id;
+			}
+		}
+
+		public virtual void Save()
+		{
+		}
+
+		public virtual void Remove()
+		{
+		}
+
+		#endregion
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/BusinessObject.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/BusinessObject.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,33 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for BusinessObject.
+	/// </summary>
+	public interface BusinessObject
+	{
+		int ID
+		{
+			get;
+		}
+
+		void Save();
+
+		void Remove();
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObject.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObject.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,38 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for CustomerBusinessObject.
+	/// </summary>
+	public interface CustomerBusinessObject : BusinessObject
+	{
+		String Name
+		{
+			get;
+			set;
+		}
+
+		String Address
+		{
+			get;
+			set;
+		}
+
+		bool IsAddressValid();
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObjectImpl.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerBusinessObjectImpl.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,64 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for CustomerBusinessObject.
+	/// </summary>
+	public class CustomerBusinessObjectImpl : AbstractBusinessObject, CustomerBusinessObject
+	{
+		private String m_name;
+		private String m_address;
+
+		public CustomerBusinessObjectImpl()
+		{
+		}
+
+		#region CustomerBusinessObject Members
+
+		public String Name
+		{
+			get
+			{
+				return m_name;
+			}
+			set
+			{
+				m_name = value;
+			}
+		}
+
+		public String Address
+		{
+			get
+			{
+				return m_address;
+			}
+			set
+			{
+				m_address = value;
+			}
+		}
+
+		public bool IsAddressValid()
+		{
+			return false;
+		}
+
+		#endregion
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccess.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccess.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,28 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for CustomerDataAccess.
+	/// </summary>
+	public interface CustomerDataAccess
+	{
+		void Save( CustomerBusinessObject customer );
+
+		CustomerBusinessObject Load( int id );
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccessImpl.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/Business/Components/CustomerDataAccessImpl.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,38 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test.Business.Components
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for CustomerDataAccess.
+	/// </summary>
+	public class CustomerDataAccessImpl : CustomerDataAccess
+	{
+	
+		#region CustomerDataAccess Members
+
+		public void Save(CustomerBusinessObject customer)
+		{
+		}
+
+		public CustomerBusinessObject Load(int id)
+		{
+			return null;
+		}
+
+		#endregion
+	}
+}

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/DefaultConfigurationManagerTestCase.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/DefaultConfigurationManagerTestCase.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/DefaultConfigurationManagerTestCase.cs	Sun Jul  4 13:48:11 2004
@@ -33,25 +33,28 @@
 	public class DefaultConfigurationManagerTestCase : Assertion
 	{
 		[Test]
-		public void TestUsage()
+		public void TestAdd()
 		{
 			DefaultConfigurationManager config = new DefaultConfigurationManager();
-			IConfiguration componentConfig = config.GetConfiguration( "component1" );
+			
+			config.Add( "key1", new DefaultConfiguration() );
+			config.Add( "key2", new DefaultConfiguration() );
 
-			AssertNotNull( componentConfig );
-			AssertEquals( "johndoe", componentConfig.GetChild("name", true).Value );
-			AssertEquals( "1099", componentConfig.GetChild("port", true).Value );
+			AssertEquals( 2, config.Configurations.Length );
 		}
 
 		[Test]
-		public void TestNoContentConfig()
+		public void TestObtention()
 		{
 			DefaultConfigurationManager config = new DefaultConfigurationManager();
-			IConfiguration componentConfig = config.GetConfiguration( "component2" );
+			
+			config.Add( "key1", new DefaultConfiguration() );
+			config.Add( "key2", new DefaultConfiguration() );
 
-			AssertNotNull( componentConfig );
-			AssertEquals( 0, componentConfig.Attributes.Count );
-			AssertEquals( 0, componentConfig.Children.Count );
+			AssertNotNull( config.GetConfiguration( "key1" ) );
+			AssertNotNull( config.GetConfiguration( "key2" ) );
+			AssertNotNull( config.GetConfiguration( "KeY1" ) );
+			AssertEquals( DefaultConfiguration.EmptyConfiguration, config.GetConfiguration( "key3" ) );
 		}
 	}
 }

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventManagerTestCase.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventManagerTestCase.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,70 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test
+{
+	using System;
+
+	using NUnit.Framework;
+
+	using Apache.Avalon.Castle.MicroKernel;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Events;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Events.Default;
+
+	/// <summary>
+	/// Summary description for EventManagerTestCase.
+	/// </summary>
+	[TestFixture]
+	public class EventManagerTestCase : Assertion
+	{
+		private Kernel m_kernel;
+		private bool m_invoked = false;
+
+		[SetUp]
+		public void CreateKernel()
+		{
+			m_kernel = new DefaultKernel();
+		}
+
+		[Test]
+		public void TestUsage()
+		{
+			EventManager manager = new EventManager();
+			manager.Init( m_kernel );
+
+			manager.ComponentAdded += new KernelDelegate(Evento);
+			manager.ComponentDestroyed += new KernelDelegate(Evento);
+			
+			Assert( !m_invoked );
+			
+			manager.OnComponentAdded( new EventManagerData( "key", typeof(Assertion), typeof(Assertion) ) );
+			
+			Assert( m_invoked );
+			m_invoked = false;
+
+			manager.OnComponentCreated( new EventManagerData( "key", typeof(Assertion), typeof(Assertion) ) );
+
+			Assert( !m_invoked );
+
+			manager.OnComponentDestroyed( new EventManagerData( "key", typeof(Assertion), typeof(Assertion) ) );
+			
+			Assert( m_invoked );
+		}
+
+		public void Evento( EventManagerData data )
+		{
+			m_invoked = true;
+		}
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventSubsystemTestCase.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/EventSubsystemTestCase.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,101 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test
+{
+	using System;
+
+	using NUnit.Framework;
+
+	using Apache.Avalon.Castle.MicroKernel;
+	using Apache.Avalon.Castle.MicroKernel.Test.Components;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Events;
+
+	/// <summary>
+	/// Summary description for EventSubsystemTestCase.
+	/// </summary>
+	[TestFixture]
+	public class EventSubsystemTestCase : Assertion
+	{
+		private bool m_componentAdded = false;
+		private bool m_componentCreated = false;
+		private bool m_componentDestroyed = false;
+
+		[Test]
+		public void TestComponentAddedEvent()
+		{
+			Kernel kernel = new DefaultKernel();
+
+			IEventManager eventManager = (IEventManager) kernel.GetSubsystem( KernelConstants.EVENTS );
+			eventManager.ComponentAdded += new KernelDelegate(OnComponentAdded);
+
+			kernel.AddComponent( "key", typeof(IMailService), typeof(SimpleMailService) );
+
+			Assert( m_componentAdded );
+		}
+
+		public void OnComponentAdded( EventManagerData data )
+		{
+			m_componentAdded = true;
+		}
+
+		[Test]
+		public void TestComponentCreatedEvent()
+		{
+			Kernel kernel = new DefaultKernel();
+
+			IEventManager eventManager = (IEventManager) kernel.GetSubsystem( KernelConstants.EVENTS );
+			eventManager.ComponentCreated += new KernelDelegate(OnComponentCreated);
+
+			kernel.AddComponent( "key", typeof(IMailService), typeof(SimpleMailService) );
+
+			Assert( !m_componentCreated );
+
+			kernel[ "key" ].Resolve();
+
+			Assert( m_componentCreated );
+		}
+
+		public void OnComponentCreated( EventManagerData data )
+		{
+			m_componentCreated = true;
+		}
+
+		[Test]
+		public void TestComponentDestroyedEvent()
+		{
+			Kernel kernel = new DefaultKernel();
+
+			IEventManager eventManager = (IEventManager) kernel.GetSubsystem( KernelConstants.EVENTS );
+			eventManager.ComponentDestroyed += new KernelDelegate(OnComponentDestroyed);
+
+			kernel.AddComponent( "key", typeof(IMailService), typeof(SimpleMailService) );
+
+			Assert( !m_componentDestroyed );
+
+			object instance = kernel[ "key" ].Resolve();
+
+			Assert( !m_componentDestroyed );
+
+			kernel[ "key" ].Release( instance );
+
+			Assert( m_componentDestroyed );
+		}
+
+		public void OnComponentDestroyed( EventManagerData data )
+		{
+			m_componentDestroyed = true;
+		}
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/LoggerManagerTestCase.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/MicroKernelTest/LoggerManagerTestCase.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,56 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Test
+{
+	using System;
+
+	using NUnit.Framework;
+
+	using Apache.Avalon.Framework;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Logger;
+	using Apache.Avalon.Castle.MicroKernel.Subsystems.Logger.Default;
+
+	/// <summary>
+	/// Summary description for LoggerManagerTestCase.
+	/// </summary>
+	[TestFixture]
+	public class LoggerManagerTestCase : Assertion
+	{
+		[Test]
+		public void TestUsage()
+		{
+			Kernel kernel = new BaseKernel();
+			LoggerManager manager = new LoggerManager();
+
+			kernel.AddSubsystem( KernelConstants.LOGGER, manager );
+			
+			IKernelSubsystem subsystem = kernel.GetSubsystem( KernelConstants.LOGGER );
+			AssertNotNull( subsystem );
+			AssertEquals( subsystem, manager );
+		}
+
+		[Test]
+		public void TestCreateLogger()
+		{
+			Kernel kernel = new BaseKernel();
+			LoggerManager manager = new LoggerManager();
+
+			kernel.AddSubsystem( KernelConstants.LOGGER, manager );
+			
+			ILogger logger = manager.CreateLogger( "name", "impl", null );
+			AssertNotNull( logger );
+		}
+	}
+}

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/DefaultConfigurationManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/DefaultConfigurationManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/Default/DefaultConfigurationManager.cs	Sun Jul  4 13:48:11 2004
@@ -15,6 +15,8 @@
 namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Configuration.Default
 {
 	using System;
+	using System.Collections;
+	using System.Collections.Specialized;
 	using System.Configuration;
 
 	using Apache.Avalon.Framework;
@@ -22,29 +24,69 @@
 	using Apache.Avalon.Castle.MicroKernel.Subsystems;
 
 	/// <summary>
-	/// The default implementation of IConfigurationManager uses the 
-	/// .config associated with the AppDomain to extract the components
-	/// configurations
+	/// The default implementation of <see cref="IConfigurationManager"/>
+	/// simply associates a configuration with a component name.
 	/// </summary>
 	public class DefaultConfigurationManager : AbstractSubsystem, IConfigurationManager
 	{
-		protected ContainerConfiguration m_config;
+		public Hashtable m_name2Config;
 
 		public DefaultConfigurationManager()
 		{
-			m_config = (ContainerConfiguration) ConfigurationSettings.GetConfig( 
-				AvalonConfigurationSectionHandler.Section );
+			m_name2Config = Hashtable.Synchronized( 
+				new Hashtable(
+					CaseInsensitiveHashCodeProvider.Default, 
+					CaseInsensitiveComparer.Default) );
 		}
+	
+		#region IConfigurationManager Members
 
-		#region IConfigurationManager Members
-
-		public IConfiguration GetConfiguration( String componentName )
-		{
-			AssertUtil.ArgumentNotNull( componentName, "componentName" );
-
-			return m_config.Configuration.GetChild( componentName, true );
-		}
-
-		#endregion
+		/// <summary>
+		/// Implementation should return a configuration for 
+		/// the component.
+		/// </summary>
+		/// <param name="model"></param>
+		/// <returns></returns>
+		public IConfiguration GetConfiguration(String componentName)
+		{
+			AssertUtil.ArgumentNotNull( componentName, "componentName" );
+
+			IConfiguration config = (IConfiguration) m_name2Config[ componentName ];
+
+			if ( config == null )
+			{
+				config = DefaultConfiguration.EmptyConfiguration;
+			}
+
+			return config;
+		}
+
+		/// <summary>
+		/// Implementation should associate a configuration for
+		/// the component name.
+		/// </summary>
+		/// <param name="componentName"></param>
+		/// <param name="configuration"></param>
+		public void Add(String componentName, IConfiguration configuration)
+		{
+			AssertUtil.ArgumentNotNull( componentName, "componentName" );
+			AssertUtil.ArgumentNotNull( configuration, "configuration" );
+
+			m_name2Config[ componentName ] = configuration;
+		}
+
+		/// <summary>
+		/// Returns configurations available.
+		/// </summary>
+		public IConfiguration[] Configurations
+		{
+			get
+			{
+				ArrayList list = new ArrayList( m_name2Config.Values );
+				return (IConfiguration[]) list.ToArray( typeof(IConfiguration) );
+			}
+		}
+
+		#endregion
 	}
 }

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/IConfigurationManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/IConfigurationManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Configuration/IConfigurationManager.cs	Sun Jul  4 13:48:11 2004
@@ -31,5 +31,21 @@
 		/// <param name="model"></param>
 		/// <returns></returns>
 		IConfiguration GetConfiguration( String componentName );
+
+		/// <summary>
+		/// Implementation should associate a configuration for
+		/// the component name.
+		/// </summary>
+		/// <param name="componentName"></param>
+		/// <param name="configuration"></param>
+		void Add( String componentName, IConfiguration configuration );
+
+		/// <summary>
+		/// Returns configurations available.
+		/// </summary>
+		IConfiguration[] Configurations
+		{
+			get;
+		}
 	}
 }

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Context/Default/ContextManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Context/Default/ContextManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Context/Default/ContextManager.cs	Sun Jul  4 13:48:11 2004
@@ -25,7 +25,7 @@
 	{
 		public ContextManager()
 		{
-			CreateDefault
+			
 		}
 
 		#region IContextManager Members
@@ -53,10 +53,11 @@
 		{
 			DefaultContext context = new DefaultContext();
 
+			/*
 			foreach(AvalonEntryAttribute entry in entries)
 			{
 				
-			}
+			}*/
 
 			context.MakeReadOnly();
 

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/Default/EventManager.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/Default/EventManager.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,112 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Events.Default
+{
+	using System;
+	using System.ComponentModel;
+
+	/// <summary>
+	/// Summary description for EventManager.
+	/// </summary>
+	public class EventManager : AbstractSubsystem, IEventManager
+	{
+		public static readonly object ComponentAddedEvent = new object();
+		public static readonly object ComponentCreatedEvent = new object();
+		public static readonly object ComponentDestroyedEvent = new object();
+
+		private EventHandlerList m_events = new EventHandlerList();
+
+		public EventManager()
+		{
+		}
+
+		#region IEventManager Members
+
+		public event KernelDelegate ComponentAdded
+		{
+			add
+			{
+				m_events.AddHandler( ComponentAddedEvent, value );
+			}
+			remove
+			{
+				m_events.RemoveHandler( ComponentAddedEvent, value );
+			}
+		}
+
+		public event KernelDelegate ComponentCreated
+		{
+			add
+			{
+				m_events.AddHandler( ComponentCreatedEvent, value );
+			}
+			remove
+			{
+				m_events.RemoveHandler( ComponentCreatedEvent, value );
+			}
+		}
+
+		public event KernelDelegate ComponentDestroyed
+		{
+			add
+			{
+				m_events.AddHandler( ComponentDestroyedEvent, value );
+			}
+			remove
+			{
+				m_events.RemoveHandler( ComponentDestroyedEvent, value );
+			}
+		}
+
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		public void OnComponentAdded( EventManagerData data )
+		{
+			RaiseEvent( ComponentAddedEvent, data );
+		}
+
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		public void OnComponentCreated( EventManagerData data )
+		{
+			RaiseEvent( ComponentCreatedEvent, data );
+		}
+		
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		public void OnComponentDestroyed( EventManagerData data )
+		{
+			RaiseEvent( ComponentDestroyedEvent, data );
+
+		}
+
+		#endregion
+
+		private void RaiseEvent( object eventKey, EventManagerData data )
+		{
+			KernelDelegate eventDelegate = (KernelDelegate) m_events[eventKey];
+			if (eventDelegate != null) 
+			{
+				eventDelegate( data );
+			}
+		}
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/EventManagerData.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/EventManagerData.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,79 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Events
+{
+	using System;
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class EventManagerData : EventArgs
+	{
+		private String m_componentName;
+		private Type m_service;
+		private Type m_implementation;
+		private object m_instance;
+
+		public EventManagerData( String componentName, Type service, Type implementation )
+		{
+			m_componentName = componentName;
+			m_service = service;
+			m_implementation = implementation;
+		}
+
+		public EventManagerData( String componentName, Type service, Type implementation, object componentInstance ) : 
+			this( componentName, service, implementation )
+		{
+			m_instance = componentInstance;
+		}
+
+		public String ComponentName
+		{
+			get
+			{
+				return m_componentName;
+			}
+		}
+
+		public Type Service
+		{
+			get
+			{
+				return m_service;
+			}
+		}
+
+		public Type Implementation
+		{
+			get
+			{
+				return m_implementation;
+			}
+		}
+
+		public Object Instance
+		{
+			get
+			{
+				return m_instance;
+			}
+			set
+			{
+				AssertUtil.ArgumentNotNull( value, "value" );
+				m_instance = value;
+			}
+		}
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/IEventManager.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Events/IEventManager.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,50 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Events
+{
+	using System;
+
+	public delegate void KernelDelegate( EventManagerData eventData );
+
+	/// <summary>
+	/// Allows hooks into the Kernel.
+	/// </summary>
+	public interface IEventManager : IKernelSubsystem
+	{
+		event KernelDelegate ComponentAdded;
+
+		event KernelDelegate ComponentCreated;
+
+		event KernelDelegate ComponentDestroyed;
+
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		void OnComponentAdded( EventManagerData data );
+
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		void OnComponentCreated( EventManagerData data );
+		
+		/// <summary>
+		/// Allows kernel and Subsystems to raise events.
+		/// </summary>
+		/// <param name="data"></param>
+		void OnComponentDestroyed( EventManagerData data );
+	}
+}

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/LoggerManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/LoggerManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/Default/LoggerManager.cs	Sun Jul  4 13:48:11 2004
@@ -27,12 +27,9 @@
 	/// </summary>
 	public class LoggerManager : AbstractSubsystem, ILoggerManager
 	{
-		private LoggerConfiguration m_configuration;
 
 		public LoggerManager()
 		{
-			m_configuration = (LoggerConfiguration)
-				ConfigurationSettings.GetConfig( AvalonLoggerSectionHandler.Section );
 		}
 
 		#region ILoggerManager Members
@@ -54,7 +51,7 @@
 				name = implementationName;
 			}
 
-			return m_configuration.RootLogger.CreateChildLogger( name );
+			return new ConsoleLogger().CreateChildLogger( name );
 		}
 
 		#endregion

Modified: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/ILoggerManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/ILoggerManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Logger/ILoggerManager.cs	Sun Jul  4 13:48:11 2004
@@ -24,6 +24,15 @@
 	/// </summary>
 	public interface ILoggerManager : IKernelSubsystem
 	{
+
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="loggerName"></param>
+		/// <param name="implementationName"></param>
+		/// <param name="loggerAtt"></param>
+		/// <returns></returns>
 		ILogger CreateLogger( String loggerName, String implementationName, AvalonLoggerAttribute loggerAtt );
 	}
 }

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/Default/LookupCriteriaMatcher.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/Default/LookupCriteriaMatcher.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,37 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Lookup.Default
+{
+	using System;
+
+	/// <summary>
+	/// Summary description for LookupCriteriaMatcher.
+	/// </summary>
+	public class LookupCriteriaMatcher : AbstractSubsystem, ILookupCriteriaMatcher
+	{
+		public LookupCriteriaMatcher()
+		{
+		}
+
+		#region ILookupCriteriaMatcher Members
+
+		public IHandler GetHandler(string name, object criteria)
+		{
+			return null;
+		}
+
+		#endregion
+	}
+}

Added: avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/ILookupCriteriaMatcher.cs
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/avalon-net/Castle/MicroKernel/Subsystems/Lookup/ILookupCriteriaMatcher.cs	Sun Jul  4 13:48:11 2004
@@ -0,0 +1,34 @@
+// Copyright 2004 The Apache Software Foundation
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace Apache.Avalon.Castle.MicroKernel.Subsystems.Lookup
+{
+	using System;
+
+	/// <summary>
+	/// ILookupCriteriaMatcher is used to decide which
+	/// <see cref="IHandler"/> to return given the specified criteria.
+	/// </summary>
+	public interface ILookupCriteriaMatcher : IKernelSubsystem
+	{
+		/// <summary>
+		/// Should implement an algorithm to decide which 
+		/// handler to return
+		/// </summary>
+		/// <param name="name">Component name</param>
+		/// <param name="criteria">Criteria - can be anything</param>
+		/// <returns>The selected handler.</returns>
+		IHandler GetHandler( string name, object criteria );
+	}
+}

Modified: avalon/trunk/central/laboratory/avalon-net/Framework/AvalonFramework/ILookupManager.cs
==============================================================================
--- avalon/trunk/central/laboratory/avalon-net/Framework/AvalonFramework/ILookupManager.cs	(original)
+++ avalon/trunk/central/laboratory/avalon-net/Framework/AvalonFramework/ILookupManager.cs	Sun Jul  4 13:48:11 2004
@@ -57,5 +57,14 @@
 		/// </remarks>
 		/// <param name="resource">The resource we are releasing.</param>
 		void Release(object resource);
+
+		/// <summary>
+		/// Returns a component instance that matches the specified 
+		/// criteria.
+		/// </summary>
+		/// <param name="role">A String identifying the lookup name to check.</param>
+		/// <param name="criteria">A specific criteria</param>
+		/// <returns>Component instance</returns>
+		object LookUp( string role, object criteria );
 	}
 }

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