using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Reflection; using Barotrauma.LuaCs.Data; using Microsoft.CodeAnalysis; namespace Barotrauma.LuaCs.Services; public interface IPluginManagementService : IReusableService { /// /// Checks if the supplied resource is currently loaded. /// /// The resource to check. /// bool IsResourceLoaded(T resource) where T : IAssemblyResourceInfo; /// /// /// /// /// /// /// /// /// FluentResults.Result> GetImplementingTypes( string namespacePrefix = null, bool includeInterfaces = false, bool includeAbstractTypes = false, bool includeDefaultContext = true); /// /// Tries to get the Type given the fully qualified name. /// /// /// Type GetType(string typeName); /// /// Loads the provided assembly resources in the order of their dependencies and intra-mod priority load order. /// /// /// Success/Failure and list of failed resources, if any. FluentResults.Result> LoadAssemblyResources(ImmutableArray resource); /// /// Creates instances of the given type and provides Property Injection and instance reference caching. Disposes of /// all references that throw errors on /// /// List of Types /// /// /// IReadOnlyList> ActivateTypeInstances(ImmutableArray types, bool serviceInjection = true, bool hostInstanceReference = false) where T : IDisposable; FluentResults.Result UnloadHostedReferences(); /// /// Tries to gracefully unload all hosted plugin references /// /// FluentResults.Result UnloadAllAssemblyResources(); }