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
{
///
/// Gets all types in searched that implement the type supplied.
///
///
///
///
///
///
FluentResults.Result> GetImplementingTypes(
bool includeInterfaces = false,
bool includeAbstractTypes = false,
bool includeDefaultContext = true);
///
/// Tries to find the type given the fully qualified name and filters.
///
///
///
///
///
///
Type GetType(string typeName, bool isByRefType = false, bool includeInterfaces = false, bool includeDefaultContext = true);
///
/// 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
///
///
///
ImmutableArray> ActivateTypeInstances(ImmutableArray types, bool serviceInjection = true,
bool hostInstanceReference = false) where T : IDisposable;
///
/// Unloads all managed , , and s.
///
/// Success of the operation.
Note: does not guarantee .NET runtime assembly unloading success.
FluentResults.Result UnloadManagedAssemblies();
}