using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using System.Xml.Linq; using Barotrauma.LuaCs.Configuration; using Barotrauma.LuaCs.Data; using Barotrauma.LuaCs.Services; using Barotrauma.LuaCs.Services.Safe; using Barotrauma.Networking; using FluentResults; namespace Barotrauma.LuaCs.Services; public partial interface IConfigService : IReusableService, ILuaConfigService { /// /// Registers a type initializer from instancing config types by indicated type from config. /// /// /// /// The as parsed from the configuration info. /// The resulting configuration instance. void RegisterTypeInitializer(Func> initializer, bool replaceIfExists = false) where TData : IEquatable where TConfig : IConfigBase; // Config Files/Resources Task LoadConfigsAsync(ImmutableArray configResources); Task LoadConfigsProfilesAsync(ImmutableArray configProfileResources); // Immediate Mode FluentResults.Result AddConfig(IConfigInfo configInfo) where TConfig : IConfigBase; // Utility FluentResults.Result ApplyProfileSettings(ContentPackage package, string profileName); FluentResults.Result DisposePackageData(ContentPackage package); FluentResults.Result DisposeAllPackageData(); FluentResults.Result> GetConfigsForPackage(ContentPackage package); FluentResults.Result Value)>>> GetProfilesForPackage(ContentPackage package); IReadOnlyDictionary<(ContentPackage Package, string Name), IConfigBase> GetAllConfigs(); bool TryGetConfig(ContentPackage package, string name, out T config) where T : IConfigBase; Task SaveAllConfigs(); Task SaveConfigsForPackage(ContentPackage package); Task SaveConfig((ContentPackage Package, string ConfigName) config); }