Table of Contents

Class UserSession

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Class representing a user session

public class UserSession : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
Inheritance
UserSession
Implements
Inherited Members

Constructors

UserSession()

public UserSession()

Properties

AccessLevel

Access level of this session

public AccessLevel AccessLevel { get; set; }

Property Value

AccessLevel

Id

Identifier of this session

public int Id { get; set; }

Property Value

int

Origin

Origin of this session. For remote sessions, this equals the remote IP address

public string Origin { get; set; }

Property Value

string

OriginId

Corresponding identifier of the origin. If it is a remote session, it is the remote port, else it defaults to the PID of the current process

public int OriginId { get; set; }

Property Value

int

SessionType

Type of this session

public SessionType SessionType { get; set; }

Property Value

SessionType

Methods

Assign(IStaticModelObject)

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

public void Assign(IStaticModelObject from)

Parameters

from IStaticModelObject

Other instance

Clone()

Clone this instance

public object Clone()

Returns

object

Cloned instance

Remarks

This method is auto-generated

UpdateFromJson(JsonElement, bool)

Update this instance from a given JSON element

public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)

Parameters

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader, bool)

Update this instance from a given JSON element

public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)

Parameters

reader Utf8JsonReader

Reader to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data