Class DynData<TTarget>
Inheritance
System.Object
DynData<TTarget>
Implements
System.IDisposable
Assembly: MonoMod.Utils.dll
Syntax
public sealed class DynData<TTarget> : Object, IDisposable where TTarget : class
Type Parameters
Constructors
DynData(TTarget)
Declaration
public DynData(TTarget obj)
Parameters
Type |
Name |
Description |
TTarget |
obj |
|
Fields
Disposable
Declaration
public static readonly HashSet<string> Disposable
Field Value
Type |
Description |
System.Collections.Generic.HashSet<System.String> |
|
Properties
Data
Declaration
public Dictionary<string, object> Data { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
Getters
Declaration
public Dictionary<string, Func<TTarget, object>> Getters { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Func<TTarget, System.Object>> |
|
IsAlive
Declaration
public bool IsAlive { get; }
Property Value
Type |
Description |
System.Boolean |
|
Item[String]
Declaration
public object this[string name] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
name |
|
Property Value
Type |
Description |
System.Object |
|
Setters
Declaration
public Dictionary<string, Action<TTarget, object>> Setters { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Action<TTarget, System.Object>> |
|
Target
Declaration
public TTarget Target { get; }
Property Value
Methods
Dispose()
Declaration
Finalize()
Declaration
protected override void Finalize()
Get<T>(String)
Declaration
public T Get<T>(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type Parameters
RegisterProperty(String, Func<TTarget, Object>, Action<TTarget, Object>)
Declaration
public void RegisterProperty(string name, Func<TTarget, object> getter, Action<TTarget, object> setter)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Func<TTarget, System.Object> |
getter |
|
System.Action<TTarget, System.Object> |
setter |
|
Set<T>(String, T)
Declaration
public void Set<T>(string name, T value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
T |
value |
|
Type Parameters
UnregisterProperty(String)
Declaration
public void UnregisterProperty(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Events
OnInitialize
Declaration
public static event Action<DynData<TTarget>, TTarget> OnInitialize
Event Type
Type |
Description |
System.Action<DynData<TTarget>, TTarget> |
|
Implements
System.IDisposable