AllJoynSession AllJoynSession AllJoynSession AllJoynSession Class

Definition

Represents an AllJoyn session created with a provider to consume the services available from that provider.

public : sealed class AllJoynSession : IAllJoynSessionpublic sealed class AllJoynSession : IAllJoynSessionPublic NotInheritable Class AllJoynSession Implements IAllJoynSession// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Properties

Id Id Id Id

Gets the unique ID of the session.

public : int Id { get; }public int Id { get; }Public ReadOnly Property Id As int// You can use this property in JavaScript.
Value
int int int int

The ID.

Status Status Status Status

Gets the current status of the session.

public : int Status { get; }public int Status { get; }Public ReadOnly Property Status As int// You can use this property in JavaScript.
Value
int int int int

Value representing the status of the session.

Methods

GetFromServiceInfoAsync(AllJoynServiceInfo) GetFromServiceInfoAsync(AllJoynServiceInfo) GetFromServiceInfoAsync(AllJoynServiceInfo) GetFromServiceInfoAsync(AllJoynServiceInfo)

Gets a session with the producer based on the specified service info.

public : static IAsyncOperation<AllJoynSession> GetFromServiceInfoAsync(AllJoynServiceInfo serviceInfo)public static IAsyncOperation<AllJoynSession> GetFromServiceInfoAsync(AllJoynServiceInfo serviceInfo)Public Static Function GetFromServiceInfoAsync(serviceInfo As AllJoynServiceInfo) As IAsyncOperation( Of AllJoynSession )// You can use this method in JavaScript.
Parameters
serviceInfo
AllJoynServiceInfo AllJoynServiceInfo AllJoynServiceInfo AllJoynServiceInfo

The service info to acquire the correct session.

Returns
See Also

GetFromServiceInfoAsync(AllJoynServiceInfo, AllJoynBusAttachment) GetFromServiceInfoAsync(AllJoynServiceInfo, AllJoynBusAttachment) GetFromServiceInfoAsync(AllJoynServiceInfo, AllJoynBusAttachment) GetFromServiceInfoAsync(AllJoynServiceInfo, AllJoynBusAttachment)

Gets a session with the producer based on the specified service info and bus attachment.

public : static IAsyncOperation<AllJoynSession> GetFromServiceInfoAsync(AllJoynServiceInfo serviceInfo, AllJoynBusAttachment busAttachment)public static IAsyncOperation<AllJoynSession> GetFromServiceInfoAsync(AllJoynServiceInfo serviceInfo, AllJoynBusAttachment busAttachment)Public Static Function GetFromServiceInfoAsync(serviceInfo As AllJoynServiceInfo, busAttachment As AllJoynBusAttachment) As IAsyncOperation( Of AllJoynSession )// You can use this method in JavaScript.
Parameters
serviceInfo
AllJoynServiceInfo AllJoynServiceInfo AllJoynServiceInfo AllJoynServiceInfo

The service info to acquire the correct session.

busAttachment
AllJoynBusAttachment AllJoynBusAttachment AllJoynBusAttachment AllJoynBusAttachment

The bus attachment to identify the AllJoyn session. If not specified, it is set to the result of AllJoynBusAttachment.GetDefault.

Returns
See Also

RemoveMemberAsync(String) RemoveMemberAsync(String) RemoveMemberAsync(String) RemoveMemberAsync(String)

Removes the member specified by the input String from the session.

public : IAsyncOperation<int> RemoveMemberAsync(PlatForm::String uniqueName)public IAsyncOperation<int> RemoveMemberAsync(String uniqueName)Public Function RemoveMemberAsync(uniqueName As String) As IAsyncOperation( Of int )// You can use this method in JavaScript.
Parameters
uniqueName
PlatForm::String String String String

Name of member to be removed from the session.

Returns

Events

Lost Lost Lost Lost

Event triggered when an AllJoynSession has been lost. More information about the event can be found in the associated AllJoynSessionLostEventArgs.

public : event TypedEventHandler Lost<AllJoynSession,  AllJoynSessionLostEventArgs>public event TypedEventHandler Lost<AllJoynSession,  AllJoynSessionLostEventArgs>Public Event Lost<AllJoynSession,  AllJoynSessionLostEventArgs>// You can use this event in JavaScript.

MemberAdded MemberAdded MemberAdded MemberAdded

Event triggered when a member has been added to an AllJoynSession.

public : event TypedEventHandler MemberAdded<AllJoynSession,  AllJoynSessionMemberAddedEventArgs>public event TypedEventHandler MemberAdded<AllJoynSession,  AllJoynSessionMemberAddedEventArgs>Public Event MemberAdded<AllJoynSession,  AllJoynSessionMemberAddedEventArgs>// You can use this event in JavaScript.

MemberRemoved MemberRemoved MemberRemoved MemberRemoved

Event triggered when a member has been removed from an AllJoynSession.

public : event TypedEventHandler MemberRemoved<AllJoynSession,  AllJoynSessionMemberRemovedEventArgs>public event TypedEventHandler MemberRemoved<AllJoynSession,  AllJoynSessionMemberRemovedEventArgs>Public Event MemberRemoved<AllJoynSession,  AllJoynSessionMemberRemovedEventArgs>// You can use this event in JavaScript.