/// <summary>
 /// Gets the name of the lios file.
 /// </summary>
 /// <param name="definition">The definition.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="requestDiskFileName">if set to <c>true</c> [request disk file name].</param>
 /// <returns>System.String.</returns>
 protected virtual string GetLIOSFileName(IDefinition definition, string fileName, bool requestDiskFileName)
 {
     if (requestDiskFileName)
     {
         return(Path.Combine(definition.ParentDirectory, $"{LIOSName}{GenerateNameHash(definition.OriginalModName)}{(string.IsNullOrWhiteSpace(definition.OriginalFileName) ? GenerateNameHash(fileName, true) : GenerateNameHash(definition.OriginalFileName, true))}{definition.Order:D4}{fileName.GenerateValidFileName()}"));
     }
     return(Path.Combine(definition.ParentDirectory, $"{LIOSName}{fileName.GenerateValidFileName()}"));
 }
Пример #2
0
 /// <summary>
 /// Gets the name of the lios file.
 /// </summary>
 /// <param name="definition">The definition.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="requestDiskFileName">if set to <c>true</c> [request disk file name].</param>
 /// <returns>System.String.</returns>
 protected virtual string GetLIOSFileName(IDefinition definition, string fileName, bool requestDiskFileName)
 {
     if (requestDiskFileName)
     {
         if (definition.ValueType != ValueType.OverWrittenObjectWithPreserveFileName)
         {
             return(Path.Combine(definition.ParentDirectory, $"{LIOSName}{GenerateNameHash(definition.OriginalModName)}{(string.IsNullOrWhiteSpace(definition.OriginalFileName) ? GenerateNameHash(fileName, true) : GenerateNameHash(definition.OriginalFileName, true))}{definition.Order:D4}{fileName.GenerateValidFileName()}"));
         }
         else
         {
             return(Path.Combine(definition.ParentDirectory, $"{LIOSName}{(string.IsNullOrWhiteSpace(definition.OriginalFileName) ? GenerateUniqueFileNameSignature(fileName) : GenerateUniqueFileNameSignature(definition.OriginalFileName))}{definition.Order:D4}{fileName.GenerateValidFileName()}"));
         }
     }
     return(Path.Combine(definition.ParentDirectory, $"{LIOSName}{fileName.GenerateValidFileName()}"));
 }