Class ReadOnlyObject
ReadOnlyObject is a special object that may be Readonly to enable immutable objects even though properties have set operations. Will throw an InvalidOperationException if write is attempted when object is in ReadOnly mode.
Inheritance
System.Object
ReadOnlyObject
Implements
System.Runtime.Serialization.IDeserializationCallback
Namespace: ABB.Robotics.Controllers
Assembly: ABB.Robotics.Controllers.PC.dll
Syntax
public abstract class ReadOnlyObject : IDeserializationCallback
Constructors
ReadOnlyObject()
Initializes a new instance of the ReadOnlyObject class.
Declaration
protected ReadOnlyObject()
ReadOnlyObject(Boolean)
Initializes a new instance of the ReadOnlyObject class.
Declaration
protected ReadOnlyObject(bool isReadonly)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isReadonly | if set to |
Properties
IsReadOnly
Gets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
DemandWriteAccess()
Demands write access to object.
Declaration
protected void DemandWriteAccess()
Explicit Interface Implementations
IDeserializationCallback.OnDeserialization(Object)
Callback during serialization when entire graph is deserialized, now we are allowed to lock the object IF it was locked during serialization.
Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Send of callback. |
Implements
System.Runtime.Serialization.IDeserializationCallback