Submit all LeafInputFiles together
This commit is contained in:
@@ -7,21 +7,21 @@ namespace LeafWeb.Core.Remote
|
||||
{
|
||||
public static class PiscalUtility
|
||||
{
|
||||
public static string GetPiscalDirectoryName(int id, string name, string identifier)
|
||||
public static string GetPiscalDirectoryName(int id, string identifier)
|
||||
{
|
||||
return $"{id}_{name.FilterAlphaNumeric()}_{identifier.FilterAlphaNumeric()}";
|
||||
return $"{id}_{identifier.FilterAlphaNumeric()}";
|
||||
}
|
||||
|
||||
public static string GetPiscalDirectoryName(LeafInputFile leafInputFile)
|
||||
public static string GetPiscalDirectoryName(LeafInput leafInput)
|
||||
{
|
||||
return GetPiscalDirectoryName(leafInputFile.Id, leafInputFile.LeafInput.Name, leafInputFile.LeafInput.Identifier);
|
||||
return GetPiscalDirectoryName(leafInput.Id, leafInput.Identifier);
|
||||
}
|
||||
|
||||
public static int GetIdFromDirectoryName(string directoryName)
|
||||
{
|
||||
var match = Regex.Match(directoryName, @"\d_");
|
||||
if (!match.Success)
|
||||
throw new FormatException("DirectoryName expected to be formatted {number}_{name}_{identifier}: " + directoryName);
|
||||
throw new FormatException("DirectoryName expected to be formatted {number}_{identifier}: " + directoryName);
|
||||
return int.Parse(match.Captures[0].Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user