private static void ValidateArguments(Arguments args)
{
if (args.Mode==DeploymentMode.SeedOnly)
{
if (string.IsNullOrEmpty(args.DeploymentConfigurationFilePath)&&
string.IsNullOrEmpty(args.InitializerType))
{
throw new InvalidOperationException(
"Either DeploymentConfigurationFilePath or InitializerType must be specified");
}
}
else
{
if (args.Mode!=DeploymentMode.InitializeOnly)
{
if (string.IsNullOrEmpty(args.DeploymentConfigurationFilePath)&&
string.IsNullOrEmpty(args.MigrationsConfigurationType))
{
throw new InvalidOperationException(
"Either DeploymentConfigurationFilePath or MigrationsConfigurationType must be specified");
}
}
if (args.Mode!=DeploymentMode.MigrationOnly)
{
if (string.IsNullOrEmpty(args.DeploymentConfigurationFilePath)&&
string.IsNullOrEmpty(args.InitializerType))
{
throw new InvalidOperationException(
"Either DeploymentConfigurationFilePath or InitializerType must be specified");
}
}
}
}