Mass push
This commit is contained in:
@ -13,7 +13,6 @@ public class Configuration
|
||||
[Display(Name = "By Create Date Shortcut"), Required] public bool? ByCreateDateShortcut { get; set; }
|
||||
[Display(Name = "By Date"), Required] public bool? ByDay { get; set; }
|
||||
[Display(Name = "By Hash"), Required] public bool? ByHash { get; set; }
|
||||
[Display(Name = "By None"), Required] public bool? ByNone { get; set; }
|
||||
[Display(Name = "By Season"), Required] public bool? BySeason { get; set; }
|
||||
[Display(Name = "By Week"), Required] public bool? ByWeek { get; set; }
|
||||
[Display(Name = "Ignore Subdirectories for Rename"), Required] public bool? KeepFullPath { get; set; }
|
||||
@ -38,15 +37,20 @@ public class Configuration
|
||||
throw new NullReferenceException(nameof(configuration.ByDay));
|
||||
if (configuration.ByHash is null)
|
||||
throw new NullReferenceException(nameof(configuration.ByHash));
|
||||
if (configuration.ByNone is null)
|
||||
throw new NullReferenceException(nameof(configuration.ByNone));
|
||||
if (configuration.BySeason is null)
|
||||
throw new NullReferenceException(nameof(configuration.BySeason));
|
||||
if (configuration.ByWeek is null)
|
||||
throw new NullReferenceException(nameof(configuration.ByWeek));
|
||||
if (configuration.KeepFullPath is null)
|
||||
throw new NullReferenceException(nameof(configuration.KeepFullPath));
|
||||
result = new(configuration.PropertyConfiguration, configuration.ByCreateDateShortcut.Value, configuration.ByDay.Value, configuration.ByHash.Value, configuration.ByNone.Value, configuration.BySeason.Value, configuration.ByWeek.Value, configuration.KeepFullPath.Value);
|
||||
result = new(
|
||||
configuration.PropertyConfiguration,
|
||||
configuration.ByCreateDateShortcut.Value,
|
||||
configuration.ByDay.Value,
|
||||
configuration.ByHash.Value,
|
||||
configuration.BySeason.Value,
|
||||
configuration.ByWeek.Value,
|
||||
configuration.KeepFullPath.Value);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -66,7 +70,7 @@ public class Configuration
|
||||
result = Get(configuration);
|
||||
if (configuration is null)
|
||||
throw new NullReferenceException(nameof(configuration));
|
||||
result.SetAndUpdate(propertyConfiguration, numberOfJitters: null, numberOfTimesToUpsample: null, modelName: null, predictorModelName: null);
|
||||
result.SetAndUpdate(propertyConfiguration);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -12,17 +12,15 @@ public class Configuration
|
||||
public bool ByCreateDateShortcut { init; get; }
|
||||
public bool ByDay { init; get; }
|
||||
public bool ByHash { init; get; }
|
||||
public bool ByNone { init; get; }
|
||||
public bool BySeason { init; get; }
|
||||
public bool ByWeek { init; get; }
|
||||
public bool KeepFullPath { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public Configuration(Property.Models.Configuration propertyConfiguration, bool byCreateDateShortcut, bool byDay, bool byHash, bool byNone, bool bySeason, bool byWeek, bool keepFullPath)
|
||||
public Configuration(Property.Models.Configuration propertyConfiguration, bool byCreateDateShortcut, bool byDay, bool byHash, bool bySeason, bool byWeek, bool keepFullPath)
|
||||
{
|
||||
ByDay = byDay;
|
||||
ByHash = byHash;
|
||||
ByNone = byNone;
|
||||
ByWeek = byWeek;
|
||||
BySeason = bySeason;
|
||||
KeepFullPath = keepFullPath;
|
||||
@ -36,10 +34,10 @@ public class Configuration
|
||||
return result;
|
||||
}
|
||||
|
||||
public void SetAndUpdate(Property.Models.Configuration configuration, int? numberOfJitters, int? numberOfTimesToUpsample, string? modelName, string? predictorModelName)
|
||||
public void SetAndUpdate(Property.Models.Configuration configuration)
|
||||
{
|
||||
_PropertyConfiguration = configuration;
|
||||
_PropertyConfiguration.Update(numberOfJitters, numberOfTimesToUpsample, modelName, predictorModelName);
|
||||
_PropertyConfiguration.Update();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user