コード例 #1
0
 /// <summary>
 /// Creates a deep copy of the passed object.
 /// </summary>
 /// <param name="old">A <b>Database Definition</b> object to create the deep copy from.</param>
 private void CopyMembers(RemoteDatabase old)
 {
     this.providerName       = old.providerName;
     this.connectionString   = old.connectionString;
     this.integratedSecurity = old.integratedSecurity;
     this.username           = old.username;
     this.password           = old.password;
     this.requiresSshTunnel  = old.requiresSshTunnel;
     this.sshHostName        = old.sshHostName;
     this.sshPortNumber      = old.sshPortNumber;
     this.sshUsername        = old.sshUsername;
     this.sshPassword        = old.sshPassword;
 }
コード例 #2
0
ファイル: DatasetFactory.cs プロジェクト: skyquery/graywulf
 public static DatasetBase CreateDataset(RemoteDatabase rd)
 {
     switch (rd.ProviderName)
     {
         case Schema.SqlServer.Constants.SqlServerProviderName:
             return CreateSqlServerDataset(rd);
         case Schema.MySql.Constants.MySqlProviderName:
             return CreateMySqlDataset(rd);
         case Schema.PostgreSql.Constants.PostgreSqlProviderName:
             return CreatePostgreSqlDataset(rd);
         default:
             throw new NotImplementedException();
     }
 }
コード例 #3
0
ファイル: DatasetFactory.cs プロジェクト: skyquery/graywulf
        private static Schema.MySql.MySqlDataset CreateMySqlDataset(RemoteDatabase rd)
        {
            var ds = new Schema.MySql.MySqlDataset()
            {
                Name = rd.Name,
                IsCacheable = true,
            };

            ds.ConnectionString = ds.GetSpecializedConnectionString(
                rd.ConnectionString,
                rd.IntegratedSecurity,
                rd.Username,
                rd.Password,
                false);

            return ds;
        }
コード例 #4
0
ファイル: RemoteDatabase.cs プロジェクト: horvatferi/graywulf
 /// <summary>
 /// Copy contructor for doing deep copy of the <b>Remote Database</b> objects.
 /// </summary>
 /// <param name="old">The <b>Remote Database</b> to copy from.</param>
 public RemoteDatabase(RemoteDatabase old)
     : base(old)
 {
     CopyMembers(old);
 }
コード例 #5
0
ファイル: RemoteDatabase.cs プロジェクト: horvatferi/graywulf
 /// <summary>
 /// Creates a deep copy of the passed object.
 /// </summary>
 /// <param name="old">A <b>Database Definition</b> object to create the deep copy from.</param>
 private void CopyMembers(RemoteDatabase old)
 {
     this.providerName = old.providerName;
     this.connectionString = old.connectionString;
     this.integratedSecurity = old.integratedSecurity;
     this.username = old.username;
     this.password = old.password;
     this.requiresSshTunnel = old.requiresSshTunnel;
     this.sshHostName = old.sshHostName;
     this.sshPortNumber = old.sshPortNumber;
     this.sshUsername = old.sshUsername;
     this.sshPassword = old.sshPassword;
 }
コード例 #6
0
 /// <summary>
 /// Copy contructor for doing deep copy of the <b>Remote Database</b> objects.
 /// </summary>
 /// <param name="old">The <b>Remote Database</b> to copy from.</param>
 public RemoteDatabase(RemoteDatabase old)
     : base(old)
 {
     CopyMembers(old);
 }