初始化

This commit is contained in:
2025-11-20 14:07:55 +08:00
commit b9b1ff5ed4
318 changed files with 42662 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
using Microsoft.Extensions.Caching.Memory;
namespace WebAPIServer.Common
{
public class MyMemoryCache
{
public MemoryCache Cache { get; } = new MemoryCache(
new MemoryCacheOptions
{
SizeLimit = 4096
});
}
}

View File

@@ -0,0 +1,16 @@
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
namespace WebAPIServer.Common
{
public class StaticData
{
public static ScriptEngine eng = Python.CreateEngine();
public static ScriptScope scope = eng.CreateScope();
public static void GetWebAPIMethod()
{
eng.ExecuteFile("ScriptConfig\\webapi.py", scope);
}
}
}