INNER CODE UNIT · C#
UUID
GloriousPtr/ArcGameEngine · Arc-ScriptCore/src/Core/AssemblyHelper.cs:23
internal static ulong UUID() => BitConverter.ToUInt64(Guid.NewGuid().ToByteArray(), 0);
internal static Assembly LoadAssemblyWithSymbols(AssemblyLoadContext ctx, string dllPath)
{
string pdbPath = Path.Combine(Path.GetDirectoryName(dllPath), Path.GetFileNameWithoutExtension(dllPath) + ".pdb");
byte[] dll = File.ReadAllBytes(dllPath);
MemoryStream dllStream = new MemoryStream(dll);
MemoryStream pdbStream = null;
if (Path.Exists(pdbPath))
{
byte[] pdb = File.ReadAllBytes(pdbPath);
pdbStream = new MemoryStream(pdb);
}
return ctx.LoadFromStream(dllStream, pdbStream);
}
internal static ulong LoadAssemblyUsingPath(string path)