Table of Contents

Class PropertyMultiValidator

Namespace
KSP.Api.CoreTypes
Assembly
Assembly-CSharp.dll
public class PropertyMultiValidator : IProperty<bool>, IProperty
Inheritance
PropertyMultiValidator
Implements
Inherited Members
Extension Methods

Constructors

PropertyMultiValidator(bool)

public PropertyMultiValidator(bool defaultWhenEmpty = true)

Parameters

defaultWhenEmpty bool

Fields

onChangedProxy

protected EventHandlerProxy<bool> onChangedProxy

Field Value

EventHandlerProxy<bool>

propertyValidators

protected Dictionary<IProperty, Func<object, bool>> propertyValidators

Field Value

Dictionary<IProperty, Func<object, bool>>

storedIsValid

protected bool storedIsValid

Field Value

bool

Properties

DefaultWhenEmpty

protected bool DefaultWhenEmpty { get; }

Property Value

bool

StoredType

public Type StoredType { get; }

Property Value

Type

Methods

AddValidation(IProperty, Func<object, bool>)

public void AddValidation(IProperty property, Func<object, bool> validator)

Parameters

property IProperty
validator Func<object, bool>

ClearValidations()

public void ClearValidations()

GetObject()

public object GetObject()

Returns

object

GetValue()

public bool GetValue()

Returns

bool

InvokeValueChanged(bool)

public virtual void InvokeValueChanged(bool newValue)

Parameters

newValue bool

RemoveValidation(IProperty)

public void RemoveValidation(IProperty property)

Parameters

property IProperty

RunAllValidators()

protected void RunAllValidators()

Events

OnChanged

public event Action OnChanged

Event Type

Action

OnChangedObject

public event Action<object> OnChangedObject

Event Type

Action<object>

OnChangedValue

public event Action<bool> OnChangedValue

Event Type

Action<bool>