Interface IValueConverter
The base interface for a value converter for use by objects generated by Generated<T>(Config, Boolean).
Namespace: IPA.Config.Stores
Assembly: IPA.Loader.dll
Syntax
public interface IValueConverter
Remarks
The object returned from FromValue(Value, Object), if fed into
The parent
parameter to
Converters do not need to perform null checks, as the serializer and deserializer will do that automatically.
Properties
| Improve this Doc View SourceType
Gets the type that this IValueConverter handles.
Declaration
Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
| Improve this Doc View SourceFromValue(Value, Object)
Converts the given Value to the object type handled by this converter.
Declaration
object? FromValue(Value value, object parent)
Parameters
Type | Name | Description |
---|---|---|
Value | value | the Value to deserialize |
Object | parent | the object that will own the result |
Returns
Type | Description |
---|---|
Nullable<Object> | the deserialized object |
ToValue(Nullable<Object>, Object)
Converts the given object to a Value.
Declaration
Value ToValue(object? obj, object parent)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Object> | obj | the object to convert |
Object | parent | the owning object of |
Returns
Type | Description |
---|---|
Value | a representation of |