INNER CODE UNIT · C#
_
ArcadeMakerSources/ArcadeMaker · src/ArcadeMaker.Core/IGame.cs:76
using var _ = fileStream; // dispose it if it exists
using ResXResourceReader? resourceReader = bundled ? new(bundledProjectFileStream!) : null;
// a method to get an absolute path from a relative one
string AbsPath(string relativePath) => fileDir + (relativePath.StartsWith('\\') ? "" : "\\") + relativePath;
// a method to save a resource, wether it's a bundled project file or normal
object? LoadResource(string key)
{
if (bundled)
{
var resourceDictionary = resourceReader!.GetEnumerator();
while (resourceDictionary.MoveNext())
{
if (key.Equals(resourceDictionary.Key))
return resourceDictionary.Value;
}