Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LoadCommand
public class LoadCommand
{
public string Database { get; set; }
public string Schema { get; set; }
public string Warehouse { get; set; }
public string Stage { get; set; }
public string TargetTable { get; set; }
public string[] Files { get; set; }
public bool Force { get; set; }
public bool Validate(out string message)
{
if (string.IsNullOrWhiteSpace(this.TargetTable))
{
message = $"{nameof(this.TargetTable)} is a required property";
return false;
}
if (string.IsNullOrWhiteSpace(this.Stage))
{
message = $"{nameof(this.Stage)} is a required property";
return false;
}
message = null;
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment