Class TypeConverter

A serializer/deserializer combo for some type(s). Used by the config system.

Inheritance
System.Object TypeConverter
Inherited Members
System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx.Configuration
Assembly: BepInEx.dll
Syntax
public class TypeConverter

Properties

ConvertToObject

Used to deserialize the type from a string. String is the data to deserialize, Type is the object's type, should return instance to an object of Type.

Declaration
public Func<string, Type, object> ConvertToObject { get; set; }
Property Value
Type Description
System.Func<System.String, System.Type, System.Object>

ConvertToString

Used to serialize the type into a (hopefully) human-readable string. Object is the instance to serialize, Type is the object's type.

Declaration
public Func<object, Type, string> ConvertToString { get; set; }
Property Value
Type Description
System.Func<System.Object, System.Type, System.String>