public void Validate() { if (DataPath.Last() != System.IO.Path.DirectorySeparatorChar) { throw new System.Exception($"DataPath {DataPath} must end with {System.IO.Path.DirectorySeparatorChar}."); } if (!System.IO.Directory.Exists(DataPath)) { throw new System.Exception($"DataPath does not exist."); } if (!File.Exists(WebConfigPath)) { throw new System.Exception($"WebConfigPath does not exist."); } if (SnapShotFile.Length == 0 && SnapShotPath.Length != 0) { throw new System.Exception($"SnapShotFile is missing."); } if (SnapShotFile.Length != 0 && SnapShotPath.Length == 0) { throw new System.Exception($"SnapShotPath is missing."); } if (LogPath.Length == 0 && LogFilesRaw.Length != 0) { throw new System.Exception($"LogPath is missing."); } if (LogPath.Length != 0 && LogFilesRaw.Length == 0) { throw new System.Exception($"LogFiles is missing."); } if (AuthSalt == null) { throw new System.Exception($"AuthSalt is missing."); } if (AuthToken == null) { throw new System.Exception($"AuthToken is missing."); } if (Secret.Length == 0) { throw new System.Exception($"Secret is missing."); } }