Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the PublishDatasourceToGatewayRequest
 /// class.
 /// </summary>
 /// <param name="dataSourceType">The datasource type</param>
 /// <param name="connectionDetails">The connection details</param>
 /// <param name="dataSourceName">The datasource name</param>
 public PublishDatasourceToGatewayRequest(string dataSourceType, string connectionDetails, CredentialDetails credentialDetails, string dataSourceName)
 {
     DataSourceType    = dataSourceType;
     ConnectionDetails = connectionDetails;
     CredentialDetails = credentialDetails;
     DataSourceName    = dataSourceName;
     CustomInit();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (DataSourceType == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DataSourceType");
     }
     if (ConnectionDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionDetails");
     }
     if (CredentialDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CredentialDetails");
     }
     if (DataSourceName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DataSourceName");
     }
     if (CredentialDetails != null)
     {
         CredentialDetails.Validate();
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the UpdateDatasourceRequest class.
 /// </summary>
 public UpdateDatasourceRequest(CredentialDetails credentialDetails = default(CredentialDetails))
 {
     CredentialDetails = credentialDetails;
     CustomInit();
 }