Skip to content

Commit

Permalink
Add XML doc about duplicated SearchResourcesDir()
Browse files Browse the repository at this point in the history
  • Loading branch information
SadPencil committed Feb 24, 2024
1 parent 25834a4 commit aea8b9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ClientCore/ProgramConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ public static string GetAILevelName(int aiLevel)
Environment.Exit(1);
};

/// <summary>
/// This method finds the "Resources" directory by traversing the directory tree upwards from the startup path.
/// </summary>
/// <remarks>
/// This method is needed by both ClientCore and DXMainClient. However, since it is usually called at the very beginning,
/// where DXMainClient could not refer to ClientCore, this method is copied to both projects.
/// Remember to keep <see cref="ClientCore.ProgramConstants.SearchResourcesDir"/> and <see cref="DTAClient.Program.SearchResourcesDir"/> consistent if you have modified its source codes.
/// </remarks>
private static string SearchResourcesDir(string startupPath)
{
DirectoryInfo currentDir = new(startupPath);
Expand Down
2 changes: 1 addition & 1 deletion DXMainClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEven
}
#endif

// SearchResourcesDir is copied from ClientCore
/// <inheritdoc cref="ClientCore.ProgramConstants.SearchResourcesDir"/>
private static string SearchResourcesDir(string startupPath)
{
DirectoryInfo currentDir = new(startupPath);
Expand Down

0 comments on commit aea8b9d

Please sign in to comment.