//****************************************************************************************************** // IAdapterCollection.cs - Gbtc // // Copyright © 2010, 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 Eclipse Public License -v 1.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.opensource.org/licenses/eclipse-1.0.php // // 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: // ---------------------------------------------------------------------------------------------------- // 09/02/2010 - J. Ritchie Carroll // Generated original version of source code. // //****************************************************************************************************** using System.Collections.Generic; using System.Data; namespace GSF.TimeSeries.Adapters { /// /// Represents the abstract interface for a collection of adapters. /// public interface IAdapterCollection : IAdapter, IList { /// /// Gets or sets specific data member (e.g., table name) in used to initialize this . /// /// /// Table name specified in from is expected /// to have the following table column names:
/// ID, AdapterName, AssemblyName, TypeName, ConnectionString
/// ID column type should be integer based, all other column types are expected to be string based. ///
string DataMember { get; set; } /// /// Resets the statistics of this collection. /// void ResetStatistics(); /// /// Attempts to get the adapter with the specified . /// /// ID of adapter to get. /// Adapter reference if found; otherwise null. /// true if adapter with the specified was found; otherwise false. bool TryGetAdapterByID(uint id, out IAdapter adapter); /// /// Attempts to get the adapter with the specified . /// /// Name of adapter to get. /// Adapter reference if found; otherwise null. /// true if adapter with the specified was found; otherwise false. bool TryGetAdapterByName(string name, out IAdapter adapter); /// /// Attempts to create an from the specified . /// /// containing item information to initialize. /// Initialized adapter if successful; otherwise null. /// true if item was successfully initialized; otherwise false. bool TryCreateAdapter(DataRow adapterRow, out IAdapter adapter); /// /// Attempts to initialize (or reinitialize) an individual based on its ID. /// /// The numeric ID associated with the to be initialized. /// true if item was successfully initialized; otherwise false. bool TryInitializeAdapterByID(uint id); } }