WutheringWaves/Core/Resources/LocalResourceProvider.cs

12 lines
314 B
C#
Raw Normal View History

using System.Text.Json;
namespace Core.Resources;
internal class LocalResourceProvider : IResourceProvider
{
public JsonDocument GetJsonResource(string path)
{
using FileStream fileStream = File.Open(path, FileMode.Open, FileAccess.Read);
return JsonDocument.Parse(fileStream);
}
}