using System.Reflection;
using Microsoft.CodeAnalysis;

namespace osu.Framework.Testing
{
    internal readonly struct AssemblyReference
    {
        public readonly Assembly Assembly;
        public readonly bool IgnoreAccessChecks;

        public AssemblyReference(Assembly assembly, bool ignoreAccessChecks)
        {
            Assembly = assembly;
            IgnoreAccessChecks = ignoreAccessChecks;
        }

        public MetadataReference GetReference() => MetadataReference.CreateFromFile(Assembly.Location);
    }
}
