Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 13307 invoked from network); 3 Apr 2004 23:07:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Apr 2004 23:07:31 -0000 Received: (qmail 62683 invoked by uid 500); 3 Apr 2004 23:07:17 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 62640 invoked by uid 500); 3 Apr 2004 23:07:17 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 62622 invoked by uid 500); 3 Apr 2004 23:07:17 -0000 Received: (qmail 62618 invoked from network); 3 Apr 2004 23:07:17 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 3 Apr 2004 23:07:17 -0000 Received: (qmail 13229 invoked by uid 1748); 3 Apr 2004 23:07:30 -0000 Date: 3 Apr 2004 23:07:30 -0000 Message-ID: <20040403230730.13228.qmail@minotaur.apache.org> From: hammett@apache.org To: avalon-sandbox-cvs@apache.org Subject: cvs commit: avalon-sandbox/avalon-net/Castle/MicroKernel/LifestyleManagers/Default SimpleLifestyleManagerFactory.cs TransientLifestyleManager.cs X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hammett 2004/04/03 15:07:30 Added: avalon-net/Castle/MicroKernel/LifestyleManagers ILifestyleManager.cs ILifestyleManagerFactory.cs avalon-net/Castle/MicroKernel/LifestyleManagers/Default SimpleLifestyleManagerFactory.cs TransientLifestyleManager.cs Log: MicroKernel for Avalon Castle - Improvements. Revision Changes Path 1.1 avalon-sandbox/avalon-net/Castle/MicroKernel/LifestyleManagers/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 description for ILifestyleManager. /// public interface ILifestyleManager : IResolver { } } 1.1 avalon-sandbox/avalon-net/Castle/MicroKernel/LifestyleManagers/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 description for ILifestyleManagerFactory. /// public interface ILifestyleManagerFactory { ILifestyleManager Create( IComponentFactory factory, IComponentModel model ); } } 1.1 avalon-sandbox/avalon-net/Castle/MicroKernel/LifestyleManagers/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 description for SimpleLifestyleManagerFactory. /// 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/LifestyleManagers/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 description for TransientLifestyleManager. /// 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 } } --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org