Class FreezableParametersObject
Represents a parameters object that can be made immutable.
Namespace: MarcusW.VncClient.Utils
Assembly: MarcusW.VncClient.dll
Syntax
public abstract class FreezableParametersObject : object
Properties
| Improve this Doc View SourceIsFrozen
Gets whether this object is frozen.
Declaration
public bool IsFrozen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceGetDescendants()
Returns all referenced FreezableParametersObject descendants of this object or null, when there aren't any.
Declaration
protected abstract IEnumerable<FreezableParametersObject>? GetDescendants()
Returns
Type | Description |
---|---|
System.Nullable<IEnumerable<FreezableParametersObject>> |
ThrowIfFrozen()
Throws a
Declaration
protected void ThrowIfFrozen()
ThrowIfFrozen(Action)
Throws a action
is executed.
Declaration
protected void ThrowIfFrozen(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action to execute, if the object was not frozen. |
Validate()
Validates the parameters of this object and throws a ConnectParametersValidationException for the first error found.
Declaration
public abstract void Validate()
ValidateAndFreezeRecursively()
Validates this object and all descendants and makes them immutable in case the validation succeeded. When this happens, all following write operations will fail.
Declaration
public void ValidateAndFreezeRecursively()
ValidateRecursively()
Validates the parameters of this object and all descendants and throws a ConnectParametersValidationException for the first error found.
Declaration
public void ValidateRecursively()