/// <summary> /// Copies private member variables form another instance /// </summary> /// <param name="old"></param> private void CopyMembers(SqlServerDataset old) { this.DefaultSchemaName = old.DefaultSchemaName; this.isOnLinkedServer = old.isOnLinkedServer; this.isRemoteDataset = old.isRemoteDataset; }
protected override DatasetBase LoadDataset(string datasetName) { string key = String.Format("{0}.{1}", ConnectionStringNamePrefix, datasetName); SqlServerDataset ds = new SqlServerDataset( datasetName, ConfigurationManager.ConnectionStrings[key].ConnectionString); return(ds); }
protected override IEnumerable <KeyValuePair <string, DatasetBase> > LoadAllDatasets() { foreach (ConnectionStringSettings s in ConfigurationManager.ConnectionStrings) { if (s.Name.StartsWith(ConnectionStringNamePrefix)) { string name = s.Name.Substring(ConnectionStringNamePrefix.Length + 1); SqlServerDataset ds = new SqlServerDataset( name, s.ConnectionString); yield return(new KeyValuePair <string, DatasetBase>(name, ds)); } } }
/// <summary> /// Copy constructor /// </summary> /// <param name="old"></param> public SqlServerDataset(SqlServerDataset old) : base(old) { CopyMembers(old); }