|
static object | AlternateCreateInstance (Type type) |
|
static bool | EnumerableEquals (IEnumerable a, IEnumerable b) |
|
static ModConfig | GeneratePopulatedClone (ModConfig original) |
|
static T | GetCustomAttribute< T > (PropertyFieldWrapper memberInfo, object item, object array) |
|
static T | GetCustomAttribute< T > (PropertyFieldWrapper memberInfo, Type type) |
|
static IEnumerable< PropertyFieldWrapper > | GetFieldsAndProperties (object item) |
|
static bool | ObjectEquals (object a, object b) |
|
static void | SetPendingChanges (bool changes=true) |
|
static Tuple< UIElement, UIElement > | WrapIt (UIElement parent, ref int top, PropertyFieldWrapper memberInfo, object item, int order, object list=null, Type arrayType=null, int index=-1) |
|
Definition at line 18 of file ConfigManager.cs.
◆ AlternateCreateInstance()
static object Terraria.ModLoader.Config.ConfigManager.AlternateCreateInstance |
( |
Type |
type | ) |
|
|
static |
Definition at line 300 of file ConfigManager.cs.
301 {
302 if (type == typeof(string))
303 return "";
304 return Activator.CreateInstance(type);
305 }
◆ EnumerableEquals()
◆ GeneratePopulatedClone()
static ModConfig Terraria.ModLoader.Config.ConfigManager.GeneratePopulatedClone |
( |
ModConfig |
original | ) |
|
|
static |
◆ GetCustomAttribute< T >() [1/2]
static T Terraria.ModLoader.Config.ConfigManager.GetCustomAttribute< T > |
( |
PropertyFieldWrapper |
memberInfo, |
|
|
object |
item, |
|
|
object |
array |
|
) |
| |
|
static |
Definition at line 309 of file ConfigManager.cs.
310
311 T attribute = (T)
Attribute.GetCustomAttribute(memberInfo.Type, typeof(T),
true);
312 if (array != null)
313 {
314
315
316 }
317
318 attribute = (T)
Attribute.GetCustomAttribute(memberInfo.MemberInfo, typeof(T)) ?? attribute;
319 return attribute;
320
321 }
◆ GetCustomAttribute< T >() [2/2]
static T Terraria.ModLoader.Config.ConfigManager.GetCustomAttribute< T > |
( |
PropertyFieldWrapper |
memberInfo, |
|
|
Type |
type |
|
) |
| |
|
static |
Definition at line 323 of file ConfigManager.cs.
324
325 T attribute = (T)
Attribute.GetCustomAttribute(memberInfo.Type, typeof(T),
true);
326
327 attribute = (T)
Attribute.GetCustomAttribute(type, typeof(T),
true) ?? attribute;
328
329
330 attribute = (T)
Attribute.GetCustomAttribute(memberInfo.MemberInfo, typeof(T)) ?? attribute;
331 return attribute;
332 }
◆ GetFieldsAndProperties()
static IEnumerable< PropertyFieldWrapper > Terraria.ModLoader.Config.ConfigManager.GetFieldsAndProperties |
( |
object |
item | ) |
|
|
static |
Definition at line 278 of file ConfigManager.cs.
279 {
280 PropertyInfo[] properties = item.GetType().GetProperties(
281
282 BindingFlags.Public |
283 BindingFlags.Instance);
284
285 FieldInfo[] fields = item.GetType().GetFields(
286
287 BindingFlags.Public |
288 BindingFlags.Instance);
289
290 return fields.Select(x => new PropertyFieldWrapper(x)).Concat(properties.Select(x => new PropertyFieldWrapper(x)));
291 }
Referenced by Terraria.ModLoader.Config.ModConfig.NeedsReload().
◆ ObjectEquals()
static bool Terraria.ModLoader.Config.ConfigManager.ObjectEquals |
( |
object |
a, |
|
|
object |
b |
|
) |
| |
|
static |
◆ SetPendingChanges()
static void Terraria.ModLoader.Config.ConfigManager.SetPendingChanges |
( |
bool |
changes = true | ) |
|
|
static |
Definition at line 340 of file ConfigManager.cs.
340 {
341
342 Interface.modConfig.SetPendingChanges(changes);
343 }
◆ WrapIt()
static Tuple< UIElement, UIElement > Terraria.ModLoader.Config.ConfigManager.WrapIt |
( |
UIElement |
parent, |
|
|
ref int |
top, |
|
|
PropertyFieldWrapper |
memberInfo, |
|
|
object |
item, |
|
|
int |
order, |
|
|
object |
list = null , |
|
|
Type |
arrayType = null , |
|
|
int |
index = -1 |
|
) |
| |
|
static |
Definition at line 334 of file ConfigManager.cs.
335 {
336
337 return UIModConfig.WrapIt(parent, ref top, memberInfo, item, order, list, arrayType, index);
338 }
◆ converters
readonly IList<JsonConverter> Terraria.ModLoader.Config.ConfigManager.converters |
|
staticprivate |
Initial value:= new List<JsonConverter>() {
new Newtonsoft.Json.Converters.VersionConverter(),
}
Definition at line 48 of file ConfigManager.cs.
◆ LoadTimeConfigs
readonly IDictionary<Mod, List<ModConfig> > Terraria.ModLoader.Config.ConfigManager.LoadTimeConfigs = new Dictionary<Mod, List<ModConfig>>() |
|
staticprivate |
◆ ModConfigPath
readonly string Terraria.ModLoader.Config.ConfigManager.ModConfigPath = Path.Combine(Main.SavePath, "Mod Configs") |
|
static |
◆ serializerSettings
readonly JsonSerializerSettings Terraria.ModLoader.Config.ConfigManager.serializerSettings |
|
static |
Initial value:= new JsonSerializerSettings
{
Formatting = Formatting.Indented,
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
ObjectCreationHandling = ObjectCreationHandling.Replace,
NullValueHandling = NullValueHandling.Ignore,
ContractResolver = new ReferenceDefaultsPreservingResolver()
}
static readonly IList< JsonConverter > converters
Definition at line 28 of file ConfigManager.cs.
Referenced by Terraria.ModLoader.Config.ConfigManager.GeneratePopulatedClone().
◆ ServerModConfigPath
readonly string Terraria.ModLoader.Config.ConfigManager.ServerModConfigPath = Path.Combine(Main.SavePath, "Mod Configs", "Server") |
|
static |