Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 9fdb252

Browse files
authored
Merge pull request #724 from github-for-unity/fixes/update-check-to-file-comments
Adding comments to AssemblyResources.ToFile(...)
2 parents 390e2e0 + a440c39 commit 9fdb252

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/GitHub.Api/Helpers/AssemblyResources.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ class AssemblyResources
1414
{
1515
public static NPath ToFile(ResourceType resourceType, string resource, NPath destinationPath, IEnvironment environment)
1616
{
17+
/*
18+
This function attempts to get files embedded in the callers assembly.
19+
GitHub.Unity which tends to contain logos
20+
GitHub.Api which tends to contain application resources
21+
22+
Each file's name is their physical path in the project.
23+
24+
When running tests, we assume the tests are looking for application resources, and default to returning GitHub.Api
25+
26+
First check for the resource in the calling assembly.
27+
If the resource cannot be found, fallback to looking in GitHub.Api's assembly.
28+
If the resource is still not found, it attempts to find it in the file system
29+
*/
30+
1731
var os = "";
1832
if (resourceType == ResourceType.Platform)
1933
{

0 commit comments

Comments
 (0)