Terraria ModLoader  0.11.5
A framework for Terraria mods
Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider Class Reference
+ Inheritance diagram for Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider:
+ Collaboration diagram for Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider:

Public Member Functions

 NullToDefaultValueProvider (IValueProvider baseProvider, Func< object > defaultValueGenerator)
 
override void SetValue (object target, object value)
 
- Public Member Functions inherited from Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.ValueProviderDecorator
 ValueProviderDecorator (IValueProvider baseProvider)
 
virtual object GetValue (object target)
 

Private Attributes

readonly Func< object > defaultValueGenerator
 

Detailed Description

Definition at line 382 of file ConfigManager.cs.

Constructor & Destructor Documentation

Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider.NullToDefaultValueProvider ( IValueProvider  baseProvider,
Func< object >  defaultValueGenerator 
)

Definition at line 391 of file ConfigManager.cs.

Member Function Documentation

override void Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider.SetValue ( object  target,
object  value 
)
virtual

Reimplemented from Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.ValueProviderDecorator.

Definition at line 395 of file ConfigManager.cs.

395  {
396  base.SetValue(target, value ?? defaultValueGenerator.Invoke());
397  //base.SetValue(target, value ?? defaultValue);
398  }

Member Data Documentation

readonly Func<object> Terraria.ModLoader.Config.ReferenceDefaultsPreservingResolver.NullToDefaultValueProvider.defaultValueGenerator
private

Definition at line 385 of file ConfigManager.cs.