Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DbExplorer.Interfaces/DbConnectionBase.cs @ 17607

Last change on this file since 17607 was 16994, checked in by gkronber, 6 years ago

#2520 Update plugin dependencies and references for HL.DataImporter for new persistence

File size: 1.9 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System.Data.Common;
23
24namespace HeuristicLab.DataImporter.DbExplorer.Interfaces {
25  public abstract class DbConnectionBase {
26    private string databaseName;
27    public string DatabaseName {
28      get { return this.databaseName; }
29      set { this.databaseName = value; }
30    }
31
32    private string userName;
33    public string UserName {
34      get { return this.userName; }
35      set { this.userName = value; }
36    }
37
38    private string password;
39    public string Password {
40      get { return this.password; }
41      set { this.password = value; }
42    }
43   
44    protected DbConnectionBase(string databaseName, string userName, string password) {
45      this.databaseName = databaseName;
46      this.userName = userName;
47      this.password = password;
48    }
49
50    public abstract DbConnection CreateConnection();
51    public abstract bool TestConnection();
52
53    private string errorMessage;
54    public string ErrorMessage {
55      get { return this.errorMessage; }
56      protected set { this.errorMessage = value; }
57    }
58  }
59}
Note: See TracBrowser for help on using the repository browser.