Submit all LeafInputFiles together

This commit is contained in:
2016-03-28 10:20:50 -04:00
parent 4b2757b19a
commit 9e86b92f08
29 changed files with 353 additions and 268 deletions
+5 -5
View File
@@ -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);
}
}