Save Url and Get New Root Directory
This commit is contained in:
@ -77,7 +77,7 @@ public class Configuration : Shared.Models.Properties.IPropertyConfiguration
|
||||
|
||||
public void ChangeRootDirectory(string rootDirectory) => _RootDirectory = rootDirectory;
|
||||
|
||||
public static void Verify(Configuration propertyConfiguration)
|
||||
public static void Verify(Configuration propertyConfiguration, bool requireExist)
|
||||
{
|
||||
if (propertyConfiguration is null)
|
||||
throw new NullReferenceException(nameof(propertyConfiguration));
|
||||
@ -101,7 +101,7 @@ public class Configuration : Shared.Models.Properties.IPropertyConfiguration
|
||||
throw new NullReferenceException(nameof(propertyConfiguration.FileNameDirectorySeparator));
|
||||
if (string.IsNullOrEmpty(propertyConfiguration.Pattern))
|
||||
throw new NullReferenceException(nameof(propertyConfiguration.Pattern));
|
||||
if (string.IsNullOrEmpty(propertyConfiguration.RootDirectory) || !Directory.Exists(propertyConfiguration.RootDirectory))
|
||||
if (string.IsNullOrEmpty(propertyConfiguration.RootDirectory) || (requireExist && !Directory.Exists(propertyConfiguration.RootDirectory)))
|
||||
throw new NullReferenceException(nameof(propertyConfiguration.RootDirectory));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user