// // NpgsqlCircleProvider.cs // // Author: // Paul Schneider // // Copyright (c) 2015 GNU GPL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . using System; using Yavsc.Model.Circles; using System.Collections.Specialized; using System.Configuration; namespace WorkFlowProvider { /// /// Npgsql circle provider. /// public class NpgsqlCircleProvider : CircleProvider { /// /// Initializes a new instance of the class. /// public NpgsqlCircleProvider () { } #region implemented abstract members of CircleProvider /// /// Add the specified owner, title and users. /// /// Owner. /// Title. /// Users. public override void Add (string owner, string title, string[] users) { throw new NotImplementedException (); } /// /// Delete the specified owner and title. /// /// Owner. /// Title. public override void Delete (string owner, string title) { throw new NotImplementedException (); } /// /// Get the specified owner and title. /// /// Owner. /// Title. public override Circle Get (string owner, string title) { throw new NotImplementedException (); } /// /// List this instance. /// public override CircleInfoCollection List () { throw new NotImplementedException (); } #endregion string cnxstr = null; string applicationName = null; /// /// Initialize this object using the specified name and config. /// /// Name. /// Config. public override void Initialize (string name, NameValueCollection config) { if ( string.IsNullOrWhiteSpace(config ["connectionStringName"])) throw new ConfigurationErrorsException ("No name for Npgsql connection string found"); cnxstr = ConfigurationManager.ConnectionStrings [config ["connectionStringName"]].ConnectionString; applicationName = config["applicationName"] ?? "/"; } } }