tModLoader v2024.10
A mod to make and play Terraria mods
ConfigManager Class Reference

Static Public Member Functions

static ? object AlternateCreateInstance (Type type)
 
static bool EnumerableEquals (IEnumerable a, IEnumerable b)
 
static ModConfig GeneratePopulatedClone (ModConfig original)
 
static ? T GetCustomAttributeFromCollectionMemberThenElementType< T > (MemberInfo memberInfo, Type elementType)
 
static ? T GetCustomAttributeFromMemberThenMemberType< T > (PropertyFieldWrapper memberInfo, object? item, object? array)
 
static IEnumerable< PropertyFieldWrapperGetFieldsAndProperties (object item)
 
static IEnumerable< PropertyFieldWrapperGetFieldsAndProperties (Type type)
 
static bool ObjectEquals (object? a, object? b)
 
static void SetPendingChanges (bool changes=true)
 
static Tuple< UIElement, UIElementWrapIt (UIElement parent, ref int top, PropertyFieldWrapper memberInfo, object item, int order, object? list=null, Type? arrayType=null, int index=-1)
 

Static Public Attributes

static readonly string ModConfigPath = Path.Combine(Main.SavePath, "ModConfigs")
 
static readonly JsonSerializerSettings serializerSettings
 
static readonly string ServerModConfigPath = Path.Combine(Main.SavePath, "ModConfigs", "Server")
 

Member Function Documentation

◆ GetCustomAttributeFromCollectionMemberThenElementType< T >()

static ? T ConfigManager.GetCustomAttributeFromCollectionMemberThenElementType< T > ( MemberInfo  memberInfo,
Type  elementType 
)
static
Type Constraints
T :Attribute 

◆ GetCustomAttributeFromMemberThenMemberType< T >()

static ? T ConfigManager.GetCustomAttributeFromMemberThenMemberType< T > ( PropertyFieldWrapper  memberInfo,
object?  item,
object?  array 
)
static
Type Constraints
T :Attribute 

Member Data Documentation

◆ serializerSettings

readonly JsonSerializerSettings ConfigManager.serializerSettings
static
Initial value:
= new() {
Formatting = Formatting.Indented,
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
ObjectCreationHandling = ObjectCreationHandling.Replace,
NullValueHandling = NullValueHandling.Ignore,
ContractResolver = new ReferenceDefaultsPreservingResolver()
}