Ejemplo n.º 1
0
 /// <summary>
 /// Create the object for a SQL datasource.
 /// </summary>
 /// <param name="name">The name for this datasource.</param>
 /// <param name="sqlDriverInfo">The DriverInfo for the selected SQL vendor.</param>
 /// <param name="connectionString">The connection string to connect to the database.</param>
 /// <param name="username">The username if credentials are needed to access the datasource.</param>
 /// <param name="password">The password if credentials are needed to access the datasource.</param>
 /// <param name="podFilename">The POD filename if datasets are being passed.</param>
 /// <param name="type">What type of datasource.</param>
 public DatasourceInfo(string name, AdoDriverInfo sqlDriverInfo, string connectionString, string username, string password, string podFilename, TYPE type)
 {
     this.name             = name;
     this.sqlDriverInfo    = sqlDriverInfo;
     this.connectionString = connectionString.Trim();
     this.username         = username;
     this.password         = password;
     if (!string.IsNullOrEmpty(podFilename))
     {
         this.podFilename = Path.GetFullPath(podFilename);
     }
     this.type = type;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Copy constructor. Does a deep copy.
 /// </summary>
 /// <param name="src">Initialize with the values in this object.</param>
 public DatasourceInfo(DatasourceInfo src)
 {
     type             = src.type;
     name             = src.name;
     filename         = src.filename;
     schemaFilename   = src.schemaFilename;
     sqlDriverInfo    = src.sqlDriverInfo;
     connectionString = src.connectionString;
     username         = src.username;
     password         = src.password;
     securitytoken    = src.securitytoken;
     podFilename      = src.podFilename;
     encoding         = src.encoding;
     restful          = src.restful;
 }