Ejemplo n.º 1
0
        public ValidationResult Validate(ImportFolder directory)
        {
            var result = new ValidationResult {
                Source = directory.OriginalFullName
            };

            if (!NameIsValid(directory.Name))
            {
                result.AddWarning("Directory name is invalid");
            }
            if (directory.ServerRelativePath.Length > MaximumRelativePathLength)
            {
                result.AddError("Full directory name is too long. Maximum length is " + MaximumRelativePathLength);
            }
            if (directory.Name == "bin")
            {
                result.AddError("Directory name is blocked: " + directory.Name);
            }
            return(result);
        }
Ejemplo n.º 2
0
 public ImportFolder(ImportFolder importFolder) : this()
 {
     this.SourceDirectory = importFolder.SourceDirectory;
     this.OriginalParent  = importFolder.OriginalParent;
 }