hammett     2004/04/03 15:16:35

  Modified:    avalon-net/Castle/MicroKernel
                        Apache.Avalon.Castle.MicroKernel.csproj
  Added:       avalon-net/Castle/MicroKernel/Lifestyle/Default
                        SimpleLifestyleManagerFactory.cs
                        TransientLifestyleManager.cs
               avalon-net/Castle/MicroKernel/Lifestyle ILifestyleManager.cs
                        ILifestyleManagerFactory.cs
  Log:
  MicroKernel for Avalon Castle - Improvements.
  
  Revision  Changes    Path
  1.4       +0 -5      
avalon-sandbox/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj
  
  Index: Apache.Avalon.Castle.MicroKernel.csproj
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/avalon-net/Castle/MicroKernel/Apache.Avalon.Castle.MicroKernel.csproj,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Apache.Avalon.Castle.MicroKernel.csproj   3 Apr 2004 23:03:02 -0000       
1.3
  +++ Apache.Avalon.Castle.MicroKernel.csproj   3 Apr 2004 23:16:34 -0000       
1.4
  @@ -239,11 +239,6 @@
                       BuildAction = "Compile"
                   />
                   <File
  -                    RelPath = "Handler\ConstructionInfo.cs"
  -                    SubType = "Code"
  -                    BuildAction = "Compile"
  -                />
  -                <File
                       RelPath = "Handler\HandlerException.cs"
                       SubType = "Code"
                       BuildAction = "Compile"
  
  
  
  1.1                  
avalon-sandbox/avalon-net/Castle/MicroKernel/Lifestyle/Default/SimpleLifestyleManagerFactory.cs
  
  Index: SimpleLifestyleManagerFactory.cs
  ===================================================================
  // 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.Lifestyle.Default
  {
        using System;
        
        using Apache.Avalon.Castle.MicroKernel.Model;
  
        /// <summary>
        /// Summary description for SimpleLifestyleManagerFactory.
        /// </summary>
        public class SimpleLifestyleManagerFactory : ILifestyleManagerFactory
        {
                public SimpleLifestyleManagerFactory()
                {
                }
  
                #region ILifestyleManagerFactory Members
  
                public ILifestyleManager Create( IComponentFactory factory, 
IComponentModel model )
                {
                        return new TransientLifestyleManager( factory );
                }
  
                #endregion
        }
  }
  
  
  
  1.1                  
avalon-sandbox/avalon-net/Castle/MicroKernel/Lifestyle/Default/TransientLifestyleManager.cs
  
  Index: TransientLifestyleManager.cs
  ===================================================================
  // 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.Lifestyle.Default
  {
        using System;
  
        /// <summary>
        /// Summary description for TransientLifestyleManager.
        /// </summary>
        public class TransientLifestyleManager : ILifestyleManager
        {
                private IComponentFactory m_componentFactory;
  
                public TransientLifestyleManager(IComponentFactory 
componentFactory)
                {
                        m_componentFactory = componentFactory;
                }
  
                #region IResolver Members
  
                public object Resolve()
                {
                        return m_componentFactory.Incarnate();
                }
  
                public void Release( object instance )
                {
                        m_componentFactory.Etherialize( instance );
                }
  
                #endregion
        }
  }
  
  
  
  1.1                  
avalon-sandbox/avalon-net/Castle/MicroKernel/Lifestyle/ILifestyleManager.cs
  
  Index: ILifestyleManager.cs
  ===================================================================
  // 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
  {
        using System;
  
        /// <summary>
        /// Summary description for ILifestyleManager.
        /// </summary>
        public interface ILifestyleManager : IResolver
        {
                
        }
  }
  
  
  
  1.1                  
avalon-sandbox/avalon-net/Castle/MicroKernel/Lifestyle/ILifestyleManagerFactory.cs
  
  Index: ILifestyleManagerFactory.cs
  ===================================================================
  // 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
  {
        using System;
  
        using Apache.Avalon.Castle.MicroKernel.Model;
  
        /// <summary>
        /// Summary description for ILifestyleManagerFactory.
        /// </summary>
        public interface ILifestyleManagerFactory
        {
                ILifestyleManager Create( IComponentFactory factory, 
IComponentModel model );
        }
  }
  
  
  

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

Reply via email to