RemoteSystemSessionJoinResult Класс

Определение

Представляет результат попытки этого устройства присоединиться к удаленному сеансу.

public ref class RemoteSystemSessionJoinResult sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RemoteSystemSessionJoinResult final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemSessionJoinResult final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RemoteSystemSessionJoinResult
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemSessionJoinResult
Public NotInheritable Class RemoteSystemSessionJoinResult
Наследование
Object Platform::Object IInspectable RemoteSystemSessionJoinResult
Атрибуты

Требования к Windows

Семейство устройств
Windows 10 Creators Update (появилось в 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (появилось в v4.0)
Возможности приложения
remoteSystem

Примеры

Процесс присоединения к удаленному сеансу см. в приведенном ниже примере кода.

public async void JoinExistingSession() {

    // request to join. sessionInfo has already been selected by user.
    RemoteSystemSessionJoinResult joinResult = await sessionInfo.JoinAsync();

    // process the result
    if (joinResult.Status == RemoteSystemSessionJoinStatus.Success) {

        // if the join was successful, acquire a reference to the session
        currentSession = joinResult.Session;

        // optionally handle the disconnected event
        currentSession.Disconnected += async (sender, args) => {
            // update the UI, using args.Reason
        };

        // update the UI with the session.DisplayName and 
        // session.ControllerDisplayName strings. Save a reference to 
        // this RemoteSystemSession, to use when the user selects
        // this session from the UI

    } else {
        // join request failed. optionally update UI
    }
}

Свойства

Session

Возвращает объект RemoteSystemSession , представляющий сеанс, который был присоединен (если попытка соединения была успешной).

Status

Представляет состояние успешности попытки этого устройства присоединиться к удаленному сеансу.

Применяется к