RemoteSystemSessionDisconnectedEventArgs Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Berisi informasi tentang kejadian RemoteSystemSession.Terputus , yaitu alasan perangkat ini terputus dari sesi.
public ref class RemoteSystemSessionDisconnectedEventArgs 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 RemoteSystemSessionDisconnectedEventArgs final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemSessionDisconnectedEventArgs 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 RemoteSystemSessionDisconnectedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemSessionDisconnectedEventArgs
Public NotInheritable Class RemoteSystemSessionDisconnectedEventArgs
- Warisan
- Atribut
Persyaratan Windows
Rangkaian perangkat |
Windows 10 Creators Update (diperkenalkan dalam 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v4.0)
|
Kemampuan aplikasi |
remoteSystem
|
Contoh
Lihat contoh kode di bawah ini untuk proses bergabung dengan sesi jarak jauh (termasuk menggunakan instans RemoteSystemSessionDisconnectedEventArgs ).
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
}
}
Keterangan
Kelas ini dibuat setiap kali peristiwa RemoteSystemSession.Disconnected dinaikkan , dan harus ditangani oleh metode yang terdaftar untuk kejadian ini.
Properti
Reason |
Mendapatkan alasan perangkat ini terputus dari sesi. |
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk