Exemplo n.º 1
0
 /// <summary>
 ///		Comprueba los datos
 /// </summary>
 protected override string Validate(Core.Models.JobProjectModel project)
 {
     if (string.IsNullOrWhiteSpace(Path))
     {
         return($"Path or file is undefined");
     }
     else
     {
         return(string.Empty);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///		Comprueba los datos de la sentencia
 /// </summary>
 internal bool ValidateData(Core.Models.JobProjectModel project, out string error)
 {
     // Inicializa los argumentos de salida
     error = string.Empty;
     // Comprueba los datos
     if (Enabled)
     {
         error = Validate(project);
     }
     // Devuelve el valor que indica si los datos son correctos
     return(string.IsNullOrWhiteSpace(error));
 }
Exemplo n.º 3
0
 /// <summary>
 ///		Valida la sentencia
 /// </summary>
 protected override string Validate(Core.Models.JobProjectModel project)
 {
     if (string.IsNullOrWhiteSpace(StorageKey))
     {
         return("Storage key undefined");
     }
     //else if (!project.Context.BlobStorages.ContainsKey(StorageKey))
     //	error = $"Can't find the blob storage {StorageKey}";
     else
     {
         return(Validate());
     }
 }
Exemplo n.º 4
0
        /// <summary>
        ///		Comprueba los datos
        /// </summary>
        protected override string Validate(Core.Models.JobProjectModel project)
        {
            string error = string.Empty;

            // Comprueba las sentencias
            foreach (BaseSentence sentence in Sentences)
            {
                if (!sentence.ValidateData(project, out string errorSentence))
                {
                    error += Environment.NewLine + errorSentence;
                }
            }
            // Devuelve el error
            return(error);
        }
Exemplo n.º 5
0
 /// <summary>
 ///		Comprueba los datos
 /// </summary>
 protected override string Validate(Core.Models.JobProjectModel project)
 {
     if (string.IsNullOrWhiteSpace(Source))
     {
         return($"Source path or file is undefined");
     }
     else if (string.IsNullOrWhiteSpace(Target))
     {
         return($"Target path or file is undefined");
     }
     else
     {
         return(string.Empty);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 ///		Comprueba los datos
 /// </summary>
 protected abstract string Validate(Core.Models.JobProjectModel project);