//****************************************************************************************************** // ISupportLifecycle.cs - Gbtc // // Copyright © 2012, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), 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.opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 10/09/2008 - Pinal C. Patel // Generated original version of source code. // 09/14/2009 - Stephen C. Wills // Added new header and license agreement. // 11/23/2011 - J. Ritchie Carroll // Added required Disposed event for interface to allow deep automated life cycle management. // 12/14/2012 - Starlynn Danyelle Gilliam // Modified Header. // //****************************************************************************************************** using System; namespace GSF { /// /// Specifies that this object provides support for performing tasks during the key stages of object lifecycle. /// /// /// /// /// Lifecycle Stage /// Equivalent Member /// /// /// Birth /// /// /// /// Life (Work/Sleep) /// /// /// /// Death /// /// /// /// public interface ISupportLifecycle : IDisposable { /// /// Raised after the source object has been properly disposed. /// event EventHandler Disposed; /// /// Initializes the state of the object. /// /// /// /// Typical implementation of should allow the object state to be initialized only /// once. should be called automatically from one or more key entry points of the /// object. For example, if the object is a and it implements /// the interface then should /// be called from the method so that the object /// gets initialized automatically when consumed through the IDE designer surface. In addition to this /// should also be called from key or mandatory methods of the object, like 'Start()' /// or 'Connect()', so that the object gets initialized even when not consumed through the IDE designer surface. /// /// void Initialize(); /// /// Gets or sets a boolean value that indicates whether the object is enabled. /// /// /// Typical implementation of should suspend the internal processing when the object is /// disabled and resume processing when the object is enabled. /// bool Enabled { get; set; } /// /// Gets a flag that indicates whether the object has been disposed. /// bool IsDisposed { get; } } }