Galen.Ci.EntityFramework.Deployer.Program.ValidateArguments C# (CSharp) Method

ValidateArguments() private static method

private static ValidateArguments ( Arguments args ) : void
args Arguments
return void
		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");
					}
				}
			}
		}