Exemplo n.º 1
0
        public override string Validate()
        {
            if (string.IsNullOrWhiteSpace(_scriptName))
            {
                return(CoreTextResources.MandatoryFieldErrorMessage.Replace("[FieldName]", "Script Name"));
            }
            else if (!_scriptFilesComparer.TryParseNextRuntimeScriptFileName(_scriptName, out RuntimeScriptFile newRuntimeScriptFile))
            {
                return(CoreTextResources
                       .InvalidFilenameErrorMessage
                       .Replace("[Filename]", newRuntimeScriptFile.Filename)
                       .Replace("[FileTypeCode]", newRuntimeScriptFile.ScriptFileType.FileTypeCode)
                       .Replace("[FilenamePattern]", newRuntimeScriptFile.ScriptFileType.FilenamePattern));
            }


            return("");
        }