Table of Contents

Class IDataContextExtensions

Namespace
KSP.Api
Assembly
Assembly-CSharp.dll
public static class IDataContextExtensions
Inheritance
IDataContextExtensions
Inherited Members

Methods

AddAction(IDataContextWritable, string, Action)

public static IAction AddAction(this IDataContextWritable @this, string key, Action action)

Parameters

this IDataContextWritable
key string
action Action

Returns

IAction

AddAction(IDataContextWritable, string, Delegate)

public static IAction AddAction(this IDataContextWritable @this, string key, Delegate action)

Parameters

this IDataContextWritable
key string
action Delegate

Returns

IAction

AddPropertyWithRange(IDataContextWritable, string, IProperty, UIValueNumberRange)

public static void AddPropertyWithRange(this IDataContextWritable @this, string key, IProperty property, UIValueNumberRange numberRange)

Parameters

this IDataContextWritable
key string
property IProperty
numberRange UIValueNumberRange

CopyFrom(IDataContextWritable, IDataContextReadonly, bool)

public static void CopyFrom(this IDataContextWritable @this, IDataContextReadonly context, bool searchStack = false)

Parameters

this IDataContextWritable
context IDataContextReadonly
searchStack bool

GetAllProperties(IDataContextReadonly)

public static IEnumerable<KeyValuePair<string, IProperty>> GetAllProperties(this IDataContextReadonly context)

Parameters

context IDataContextReadonly

Returns

IEnumerable<KeyValuePair<string, IProperty>>

GetAllPropertiesWritable(IDataContextReadonly)

public static IEnumerable<KeyValuePair<string, IPropertyWritable>> GetAllPropertiesWritable(this IDataContextReadonly context)

Parameters

context IDataContextReadonly

Returns

IEnumerable<KeyValuePair<string, IPropertyWritable>>

GetAllPropertiesWritable<T>(IDataContextReadonly)

public static IEnumerable<KeyValuePair<string, IPropertyWritable<T>>> GetAllPropertiesWritable<T>(this IDataContextReadonly context)

Parameters

context IDataContextReadonly

Returns

IEnumerable<KeyValuePair<string, IPropertyWritable<T>>>

Type Parameters

T

GetAllProperties<T>(IDataContextReadonly)

public static IEnumerable<KeyValuePair<string, IProperty<T>>> GetAllProperties<T>(this IDataContextReadonly context)

Parameters

context IDataContextReadonly

Returns

IEnumerable<KeyValuePair<string, IProperty<T>>>

Type Parameters

T

ResolveAction(IDataContextReadonly, string, bool)

public static IAction ResolveAction(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IAction

ResolveLabel(IDataContextReadonly, string, bool)

public static string ResolveLabel(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

string

ResolveList(IDataContextReadonly, string, bool)

public static IContextListProperty ResolveList(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IContextListProperty

ResolveNumberRange(IDataContextReadonly, string, bool)

public static UIValueNumberRange ResolveNumberRange(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

UIValueNumberRange

ResolveProperty(IDataContextReadonly, string, bool)

public static IProperty ResolveProperty(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IProperty

ResolvePropertyWritable(IDataContextReadonly, string, bool)

public static IPropertyWritable ResolvePropertyWritable(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IPropertyWritable

ResolvePropertyWritable<T>(IDataContextReadonly, string, bool)

public static IPropertyWritable<T> ResolvePropertyWritable<T>(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IPropertyWritable<T>

Type Parameters

T

ResolveProperty<T>(IDataContextReadonly, string, bool)

public static IProperty<T> ResolveProperty<T>(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IProperty<T>

Type Parameters

T

ResolveSubContext(IDataContextReadonly, string, bool)

public static IDataContextReadonly ResolveSubContext(this IDataContextReadonly context, string keyPath, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
searchStack bool

Returns

IDataContextReadonly

TryResolvePropertyWritable(IDataContextReadonly, string, out IPropertyWritable, bool)

public static bool TryResolvePropertyWritable(this IDataContextReadonly context, string keyPath, out IPropertyWritable property, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
property IPropertyWritable
searchStack bool

Returns

bool

TryResolvePropertyWritable<T>(IDataContextReadonly, string, out IPropertyWritable<T>, bool)

public static bool TryResolvePropertyWritable<T>(this IDataContextReadonly context, string keyPath, out IPropertyWritable<T> property, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
property IPropertyWritable<T>
searchStack bool

Returns

bool

Type Parameters

T

TryResolveProperty<T>(IDataContextReadonly, string, out IProperty<T>, bool)

public static bool TryResolveProperty<T>(this IDataContextReadonly context, string keyPath, out IProperty<T> property, bool searchStack = true)

Parameters

context IDataContextReadonly
keyPath string
property IProperty<T>
searchStack bool

Returns

bool

Type Parameters

T

TryWriteProperty<T>(IDataContextReadonly, string, T, bool)

public static bool TryWriteProperty<T>(this IDataContextReadonly context, string keyPath, T newValue, bool attemptToConvert = false)

Parameters

context IDataContextReadonly
keyPath string
newValue T
attemptToConvert bool

Returns

bool

Type Parameters

T