AssemblyTool/RecodeItLib/Models/CrossCompilerProjectModel.cs

99 lines
2.7 KiB
C#
Raw Normal View History

2024-06-19 06:22:18 -04:00
using ReCodeIt.Utils;
namespace ReCodeIt.Models;
2024-06-18 17:35:31 -04:00
public class CrossCompilerProjectModel
{
#region REQUIRED_ON_CREATION
/// <summary>
/// The path of the original assembly
///
/// (Required on creation)
/// </summary>
2024-06-18 17:35:31 -04:00
public string OriginalAssemblyPath { get; set; }
/// <summary>
/// The path to the working directory vs project
///
/// (Required on creation)
/// </summary>
public string VisualStudioSolutionPath { get; set; }
2024-06-18 17:35:31 -04:00
2024-06-20 13:58:39 -04:00
/// <summary>
2024-06-20 14:23:11 -04:00
/// The path to the dependency folder for the active solution. Also where the remapped dll is
/// built to and replaced
2024-06-20 13:58:39 -04:00
///
/// (Required on creation)
/// </summary>
public string VisualStudioDependencyPath { get; set; }
/// <summary>
/// This is where the final dll is built to
///
/// (Required on creation)
/// </summary>
public string BuildDirectory { get; set; }
#endregion REQUIRED_ON_CREATION
2024-06-19 06:22:18 -04:00
/// <summary>
/// The path to the working directory vs project
/// </summary>
public string VisualStudioSolutionDirectoryPath => Path.GetDirectoryName(VisualStudioSolutionPath)!;
/// <summary>
/// The path the the cloned solution
/// </summary>
public string VisualStudioClonedSolutionPath => Path.Combine(
DataProvider.ReCodeItProjectsPath,
SolutionName,
SolutionName + ".sln");
public string VisualStudioClonedSolutionDirectory => Path.Combine(
DataProvider.ReCodeItProjectsPath,
SolutionName);
/// <summary>
2024-06-20 13:58:39 -04:00
/// The path to the cloned solutions dependency folder
/// </summary>
2024-06-20 14:23:11 -04:00
public string VisualStudioClonedDependencyPath
{
get
{
// Take just the folder name
var folderName = VisualStudioDependencyPath.Split('\\').Last();
return Path.Combine(VisualStudioClonedSolutionDirectory, folderName);
}
}
2024-06-18 17:35:31 -04:00
2024-06-20 13:58:39 -04:00
public string ProjectDllName => SolutionName + ".dll";
public string OriginalAssemblyDllName => Path.GetFileName(OriginalAssemblyPath);
2024-06-18 17:35:31 -04:00
/// <summary>
/// Name of the solution
/// </summary>
public string SolutionName { get; set; }
/// <summary>
/// Remapped output hash
/// </summary>
public string OriginalAssemblyHash { get; set; }
/// <summary>
/// Remapped output hash
/// </summary>
2024-06-18 17:35:31 -04:00
public string RemappedAssemblyHash { get; set; }
/// <summary>
/// Key: Remapped name, value: old name
/// </summary>
public Dictionary<string, string> ChangedTypes { get; set; } = [];
/// <summary>
/// Remap models used on this project
/// </summary>
public List<RemapModel> RemapModels { get; set; } = [];
}