Exemple #1
0
 public DiskPersistenceLocation(IConfigSectionNode node) : base(node)
 {
     DiskPath = node.AttrByName(CONFIG_PATH_ATTR).Value;
     if (DiskPath.IsNullOrWhiteSpace())
     {
         throw new GDIDException(StringConsts.ARGUMENT_ERROR + "DiskPersistenceLocation(path=null|empty)");
     }
 }
Exemple #2
0
                                                   public override string Validate()
                                                   {
                                                       if (DiskPath.IsNullOrWhiteSpace())
                                                       {
                                                           return("Path is null");
                                                       }

                                                       if (DiskPath.Length > MAX_DISK_PATH_LENGTH)
                                                       {
                                                           return("`{0}` is too long".Args(DiskPath.TakeFirstChars(30)));
                                                       }

                                                       if (!Directory.Exists(DiskPath))
                                                       {
                                                           return("Path `{0}` does not exist".Args(DiskPath));
                                                       }

                                                       return(null);
                                                   }