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
Id
Identifier of this session
public int Id { get; set; }
Property Value
Origin
Origin of this session. For remote sessions, this equals the remote IP address
public string Origin { get; set; }
Property Value
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
SessionType
Type of this session
public SessionType SessionType { get; set; }
Property Value
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
fromIStaticModelObjectOther 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
jsonElementJsonElementElement to update this intance from
ignoreSbcPropertiesboolWhether 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
readerUtf8JsonReaderReader to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data