// // DataLinkObjectModel.cs - provides an ObjectModel to manipulate Microsoft Universal Data Link shortcuts // // Author: // Michael Becker // // Copyright (c) 2011-2020 Mike Becker's Software // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . using System; namespace UniversalEditor.ObjectModels.DataLink { /// /// Provides an to manipulate Microsoft Universal Data Link shortcuts. /// public class DataLinkObjectModel : ObjectModel { private static ObjectModelReference _omr = null; protected override ObjectModelReference MakeReferenceInternal() { if (_omr == null) { _omr = base.MakeReferenceInternal(); _omr.Path = new string[] { "General", "Data Link" }; } return _omr; } public override void Clear() { throw new NotImplementedException(); } public override void CopyTo(ObjectModel where) { throw new NotImplementedException(); } /// /// The name of the OLEDB provider to use in this data link. If no Provider is specified, /// the OLE DB Provider for ODBC (MSDASQL) is the default value. This provides backward /// compatibility with ODBC connection strings. /// public string ProviderName { get; set; } = String.Empty; /// /// The version number of the OLEDB provider to use. If unspecified, will use the version- /// independent OLEDB provider. /// public string ProviderVersion { get; set; } = null; public bool PersistSecurityInformation { get; set; } = false; /// /// The name of the data source or host name of the server from which to retrieve data. /// public string DataSourceName { get; set; } = String.Empty; /// /// The initial catalog or name of the database from which to retrieve data. /// public string InitialCatalog { get; set; } = String.Empty; /// /// Determines whether integrated security (e.g. Windows authentication) is to be used. /// public bool UseIntegratedSecurity { get; set; } = false; /// /// Additional properties to pass into the connection string. /// public PropertyList.Property.PropertyCollection Properties { get; } = new PropertyList.Property.PropertyCollection(); } }