Edit

Share via


PresenceState Constructors

Definition

Overloads

PresenceState(PresenceCategoryWithMetaData)

Creates an instance of the PresenceState class.

PresenceState(PresenceStateType, Int32, PresenceActivity)

Creates an instance of the PresenceState(MachineState/AggregateMachineState/AggregateState/UserState) class.

PresenceState(Int32, PresenceActivity, PhoneCallType, String)

Creates an instance of the phone state category.

PresenceState(PresenceCategoryWithMetaData)

Creates an instance of the PresenceState class.

public:
 PresenceState(Microsoft::Rtc::Collaboration::Presence::PresenceCategoryWithMetaData ^ category);
public PresenceState (Microsoft.Rtc.Collaboration.Presence.PresenceCategoryWithMetaData category);
new Microsoft.Rtc.Collaboration.Presence.PresenceState : Microsoft.Rtc.Collaboration.Presence.PresenceCategoryWithMetaData -> Microsoft.Rtc.Collaboration.Presence.PresenceState
Public Sub New (category As PresenceCategoryWithMetaData)

Parameters

Exceptions

Thrown when category is null.

Thrown when category.Name is anything other than PresenceCategoryNames.State or the XML representing category.Category provided is invalid.

Applies to

PresenceState(PresenceStateType, Int32, PresenceActivity)

Creates an instance of the PresenceState(MachineState/AggregateMachineState/AggregateState/UserState) class.

public:
 PresenceState(Microsoft::Rtc::Collaboration::Presence::PresenceStateType stateType, int availability, Microsoft::Rtc::Collaboration::Presence::PresenceActivity ^ activity);
public PresenceState (Microsoft.Rtc.Collaboration.Presence.PresenceStateType stateType, int availability, Microsoft.Rtc.Collaboration.Presence.PresenceActivity activity);
new Microsoft.Rtc.Collaboration.Presence.PresenceState : Microsoft.Rtc.Collaboration.Presence.PresenceStateType * int * Microsoft.Rtc.Collaboration.Presence.PresenceActivity -> Microsoft.Rtc.Collaboration.Presence.PresenceState
Public Sub New (stateType As PresenceStateType, availability As Integer, activity As PresenceActivity)

Parameters

stateType
PresenceStateType

Type of presence state(MachineState/AggregateMachineState/AggregateState/UserState) instance being created.

availability
Int32

Availability value.

activity
PresenceActivity

Activity token for this availability.

Exceptions

Thrown when stateType is unknown, CalendarState or PhoneState.

Remarks

A presence state type of CalendarState or PresenceState cannot be created with this constructor. For PresenceState use the constructor which specifically takes phone uri as one of its parameters.

Applies to

PresenceState(Int32, PresenceActivity, PhoneCallType, String)

Creates an instance of the phone state category.

public:
 PresenceState(int availability, Microsoft::Rtc::Collaboration::Presence::PresenceActivity ^ activity, Microsoft::Rtc::Collaboration::Presence::PhoneCallType phoneCallType, System::String ^ phoneUri);
public PresenceState (int availability, Microsoft.Rtc.Collaboration.Presence.PresenceActivity activity, Microsoft.Rtc.Collaboration.Presence.PhoneCallType phoneCallType, string phoneUri);
new Microsoft.Rtc.Collaboration.Presence.PresenceState : int * Microsoft.Rtc.Collaboration.Presence.PresenceActivity * Microsoft.Rtc.Collaboration.Presence.PhoneCallType * string -> Microsoft.Rtc.Collaboration.Presence.PresenceState

Parameters

availability
Int32

Availability value.

activity
PresenceActivity

Activity token for this availability.

phoneCallType
PhoneCallType

Whether Phone state is for RCC, VoIP or PSTN calls.

phoneUri
String

The tel URI for the presence state.

Exceptions

Thrown when phoneUri is null.

Applies to