summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Server/Plugins/LoadedAssemblyInformation.cs
blob: 720367cc94a408b3b43ac806336fa0be7754e543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.Reflection;
using System.Runtime.Loader;

namespace Impostor.Server.Plugins
{
    public class LoadedAssemblyInformation : IAssemblyInformation
    {
        private readonly Assembly _assembly;

        public LoadedAssemblyInformation(Assembly assembly)
        {
            AssemblyName = assembly.GetName();
            _assembly = assembly;
        }

        public AssemblyName AssemblyName { get; }

        public bool IsPlugin => false;

        public Assembly Load(AssemblyLoadContext context)
        {
            return _assembly;
        }
    }
}