hammett     2003/10/13 19:06:14

  Modified:    avalon-net/cscontainer/AvalonContainerTest
                        AvalonContainerTest.csproj
                        DependencyHandlingTestCase.cs
               avalon-net/cscontainer/AvalonContainerTest/Components
                        ErroneousComponent.cs
               avalon-net/cscontainer/AvalonContainer/Handler
                        DelegateHandler.cs HandlerProxy.cs
               avalon-net/cscontainer/AvalonContainer LifestyleManager.cs
               avalon-net/cscontainer/Samples/bin/Samples
                        Samples.Components.dll
               avalon-net/cscontainer/bin Apache.Avalon.Container.Test.dll
                        Apache.Avalon.Container.dll
                        Apache.Avalon.Framework.dll
               avalon-net/csframework/AvalonFrameworkTest
                        AvalonFrameworkTest.csproj
               avalon-net/csframework/AvalonFramework ContainerUtil.cs
               avalon-net/csframework/bin Apache.Avalon.Framework.Test.dll
                        Apache.Avalon.Framework.dll
  Added:       avalon-net/cscontainer/AvalonContainerTest
                        PublicConstructorTestCase.cs
  Log:
  Bug correction submitted to bugzilla.
  
  Revision  Changes    Path
  1.4       +10 -5     
avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/AvalonContainerTest.csproj
  
  Index: AvalonContainerTest.csproj
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/AvalonContainerTest.csproj,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonContainerTest.csproj        3 Oct 2003 03:13:14 -0000       1.3
  +++ AvalonContainerTest.csproj        14 Oct 2003 02:06:14 -0000      1.4
  @@ -85,15 +85,15 @@
                       Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
                   />
                   <Reference
  -                    Name = "nunit.framework"
  -                    AssemblyName = "nunit.framework"
  -                    HintPath = "C:\Program Files\NUnit V2.0\bin\nunit.framework.dll"
  -                />
  -                <Reference
                       Name = "AvalonFramework"
                       Project = "{A4DA9A13-FD5A-42A0-97C5-18CEDA5CB1A5}"
                       Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
                   />
  +                <Reference
  +                    Name = "nunit.framework"
  +                    AssemblyName = "nunit.framework"
  +                    HintPath = 
"..\..\..\..\..\..\..\dotnet\NUnit2\bin\nunit.framework.dll"
  +                />
               </References>
           </Build>
           <Files>
  @@ -120,6 +120,11 @@
                   />
                   <File
                       RelPath = "PicoContainerExtensionTestCase.cs"
  +                    SubType = "Code"
  +                    BuildAction = "Compile"
  +                />
  +                <File
  +                    RelPath = "PublicConstructorTestCase.cs"
                       SubType = "Code"
                       BuildAction = "Compile"
                   />
  
  
  
  1.4       +1 -1      
avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/DependencyHandlingTestCase.cs
  
  Index: DependencyHandlingTestCase.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/DependencyHandlingTestCase.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DependencyHandlingTestCase.cs     3 Oct 2003 03:13:14 -0000       1.3
  +++ DependencyHandlingTestCase.cs     14 Oct 2003 02:06:14 -0000      1.4
  @@ -61,7 +61,7 @@
                [Test]
                public void ShutDownOrderCheck()
                {
  -                     Assertion.AssertEquals(9, m_container.ShutDownOrder.Length);
  +                     Assertion.AssertEquals(10, m_container.ShutDownOrder.Length);
   
                        Assertion.AssertEquals(typeof(IEntityLocator).FullName, 
m_container.ShutDownOrder[0].Name);
                        Assertion.AssertEquals(typeof(IBus).FullName, 
m_container.ShutDownOrder[1].Name);
  
  
  
  1.1                  
avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/PublicConstructorTestCase.cs
  
  Index: PublicConstructorTestCase.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
  //    [EMAIL PROTECTED]
  //
  // 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.Container.Test
  {
        using System;
        using System.Security.Permissions;
        using System.IO;
        using System.Reflection;
        using NUnit.Framework;
  
        using Apache.Avalon.Container.Configuration;
        using Apache.Avalon.Framework;
        using Apache.Avalon.Container.Test.Components;
  
        /// <summary>
        /// Summary description for PublicConstructorTestCase.
        /// </summary>
        [TestFixture]
        public class PublicConstructorTestCase : ContainerTestCase
        {
                [Test]
                public void LookupForErroneousComponent()
                {
                        try
                        {
                                Object x = m_container.LookupManager[ 
typeof(IAirBus).FullName ];
                                Assertion.Fail( "A non-constructable component should 
not be lookup'ed." );
                        }
                        catch( LookupException )
                        {
                                // Ok, expected.
                        }
                        catch(Exception e)
                        {
                                Assertion.Fail( "We should receive a LookupException 
exception." );
                        }
                }
        }
  }
  
  
  
  1.2       +30 -0     
avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/Components/ErroneousComponent.cs
  
  Index: ErroneousComponent.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainerTest/Components/ErroneousComponent.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ErroneousComponent.cs     3 Oct 2003 03:13:15 -0000       1.1
  +++ ErroneousComponent.cs     14 Oct 2003 02:06:14 -0000      1.2
  @@ -65,6 +65,14 @@
                void LandOff();
        }
   
  +     /// <summary>
  +     /// Definition for IAirBus service.
  +     /// </summary>
  +     public interface IAirBus 
  +     {
  +             void ReachTheMoon();
  +     }
  +
        [AvalonService( typeof(IAirplane) )]
        [AvalonComponent( "Airplane", Lifestyle.Transient )]
        public class Airplane : IAirplane, ILookupEnabled
  @@ -108,4 +116,26 @@
   
                #endregion
        }
  +
  +
  +     [AvalonService( typeof(IAirBus) )]
  +     [AvalonComponent( "AirBus", Lifestyle.Transient )]
  +     public class AirBus : IAirBus
  +     {
  +             public AirBus(int passengersCount)
  +             {
  +             }
  +
  +             #region IAirBus Members
  +
  +             public void ReachTheMoon()
  +             {
  +                     // TODO:  Add AirBus.ReachTheMoon implementation
  +             }
  +
  +             #endregion
  +
  +     }
  +
  +     
   }
  
  
  
  1.2       +9 -1      
avalon-sandbox/avalon-net/cscontainer/AvalonContainer/Handler/DelegateHandler.cs
  
  Index: DelegateHandler.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainer/Handler/DelegateHandler.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DelegateHandler.cs        22 Sep 2003 23:49:24 -0000      1.1
  +++ DelegateHandler.cs        14 Oct 2003 02:06:14 -0000      1.2
  @@ -51,6 +51,7 @@
        using System.Threading;
        using System.Runtime.Remoting.Proxies;
   
  +     using Apache.Avalon.Framework;
        using Apache.Avalon.Container.Services;
   
        /// <summary>
  @@ -71,7 +72,14 @@
   
                public object GetInstance()
                {
  -                     return Factory.Create(m_componentEntry.ComponentType);
  +                     try
  +                     {
  +                             return Factory.Create(m_componentEntry.ComponentType);
  +                     }
  +                     catch(Exception inner)
  +                     {
  +                             throw new LookupException("Error instantiating 
component.", inner);
  +                     }
                }
   
                public void PutInstance(object instance)
  
  
  
  1.2       +6 -1      
avalon-sandbox/avalon-net/cscontainer/AvalonContainer/Handler/HandlerProxy.cs
  
  Index: HandlerProxy.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainer/Handler/HandlerProxy.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerProxy.cs   22 Sep 2003 23:49:24 -0000      1.1
  +++ HandlerProxy.cs   14 Oct 2003 02:06:14 -0000      1.2
  @@ -52,6 +52,7 @@
        using System.Runtime.Remoting.Messaging;
        using System.Runtime.Remoting.Proxies;
   
  +     using Apache.Avalon.Framework;
        using Apache.Avalon.Container.Services;
   
        /// <summary>
  @@ -78,9 +79,13 @@
                                m_manager.BeforeGetInstance(m_handler);
   
                                returnMessage = 
RemotingServices.ExecuteMessage(m_handler, call);
  +
                                object instance = returnMessage.ReturnValue;
   
  -                             m_manager.AfterGetInstance(m_handler, instance);
  +                             if (instance != null)
  +                             {
  +                                     m_manager.AfterGetInstance(m_handler, 
instance);
  +                             }
                        }
                        else if (IsPutInstanceCall(call))
                        {
  
  
  
  1.4       +0 -1      
avalon-sandbox/avalon-net/cscontainer/AvalonContainer/LifestyleManager.cs
  
  Index: LifestyleManager.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/cscontainer/AvalonContainer/LifestyleManager.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LifestyleManager.cs       3 Oct 2003 03:13:14 -0000       1.3
  +++ LifestyleManager.cs       14 Oct 2003 02:06:14 -0000      1.4
  @@ -86,7 +86,6 @@
                private ArrayList                m_loadedModules;
                private WeakMap                  m_knowReferences;
   
  -
                public LifecycleManager()
                {
                        m_loadedModules  = new ArrayList();
  
  
  
  1.5       +4 -4      
avalon-sandbox/avalon-net/cscontainer/Samples/bin/Samples/Samples.Components.dll
  
        <<Binary file>>
  
  
  1.5       +145 -130  
avalon-sandbox/avalon-net/cscontainer/bin/Apache.Avalon.Container.Test.dll
  
        <<Binary file>>
  
  
  1.5       +308 -310  
avalon-sandbox/avalon-net/cscontainer/bin/Apache.Avalon.Container.dll
  
        <<Binary file>>
  
  
  1.5       +97 -109   
avalon-sandbox/avalon-net/cscontainer/bin/Apache.Avalon.Framework.dll
  
        <<Binary file>>
  
  
  1.4       +1 -1      
avalon-sandbox/avalon-net/csframework/AvalonFrameworkTest/AvalonFrameworkTest.csproj
  
  Index: AvalonFrameworkTest.csproj
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFrameworkTest/AvalonFrameworkTest.csproj,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonFrameworkTest.csproj        25 Sep 2003 01:42:34 -0000      1.3
  +++ AvalonFrameworkTest.csproj        14 Oct 2003 02:06:14 -0000      1.4
  @@ -87,7 +87,7 @@
                   <Reference
                       Name = "nunit.framework"
                       AssemblyName = "nunit.framework"
  -                    HintPath = "C:\Program Files\NUnit V2.0\bin\nunit.framework.dll"
  +                    HintPath = 
"..\..\..\..\..\..\..\dotnet\NUnit2\bin\nunit.framework.dll"
                   />
               </References>
           </Build>
  
  
  
  1.3       +1 -1      
avalon-sandbox/avalon-net/csframework/AvalonFramework/ContainerUtil.cs
  
  Index: ContainerUtil.cs
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/csframework/AvalonFramework/ContainerUtil.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContainerUtil.cs  3 Oct 2003 03:13:14 -0000       1.2
  +++ ContainerUtil.cs  14 Oct 2003 02:06:14 -0000      1.3
  @@ -52,7 +52,7 @@
   {
        /// <summary>
        ///     Utility class that makes it easier to transfer
  -     /// a component throught it's lifecycle stages.
  +     /// a component through it's lifecycle stages.
        /// </summary>
        public class ContainerUtil
        {
  
  
  
  1.5       +3 -3      
avalon-sandbox/avalon-net/csframework/bin/Apache.Avalon.Framework.Test.dll
  
        <<Binary file>>
  
  
  1.5       +97 -109   
avalon-sandbox/avalon-net/csframework/bin/Apache.Avalon.Framework.dll
  
        <<Binary file>>
  
  

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

Reply via email to