Table of Contents

Interface IDynamicModelObject

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Dynamic interface for object model classes that have properties. Classes that implement this interface may change its instance on update

public interface IDynamicModelObject : IModelObject, ICloneable, INotifyPropertyChanged
Inherited Members

Methods

Assign(IDynamicModelObject)

Assign the properties from another instance. This is required to update model properties which do not have a setter

IDynamicModelObject? Assign(IDynamicModelObject from)

Parameters

from IDynamicModelObject

Other instance

Returns

IDynamicModelObject

UpdateFromJson(JsonElement, bool)

Update this instance from a given JSON element

IDynamicModelObject? UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)

Parameters

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Returns

IDynamicModelObject

Updated instance

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader, bool)

Update this instance from a given JSON reader

IDynamicModelObject? UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)

Parameters

reader Utf8JsonReader

JSON reader

ignoreSbcProperties bool

Whether SBC properties are ignored

Returns

IDynamicModelObject

Updated instance

Exceptions

JsonException

Failed to deserialize data