Condividi tramite


DevicePortalConnection Classe

Definizione

Gestisce una connessione al portale di dispositivi Windows.

public ref class DevicePortalConnection 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 DevicePortalConnection 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 DevicePortalConnection
Public NotInheritable Class DevicePortalConnection
Ereditarietà
Object Platform::Object IInspectable DevicePortalConnection
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 Creators Update (è stato introdotto in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v4.0)

Commenti

Cronologia delle versioni

Versione di Windows Versione dell'SDK Valore aggiunto
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage)
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage,SocketMessageType,String)
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage,SocketMessageType,String,UInt32,UInt32,MessageWebSocketReceiveMode)
1803 17134 GetServerStreamWebSocketForRequest(HttpRequestMessage)
1803 17134 GetServerStreamWebSocketForRequest(HttpRequestMessage,String,UInt32,Boolean)

Metodi

GetForAppServiceConnection(AppServiceConnection)

Inizializza un'istanza di DevicePortalConnection usando la connessione al servizio app passata.

GetServerMessageWebSocketForRequest(HttpRequestMessage)

Restituisce un messaggio sul lato server WebSocket da usare con Device Portal.

GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String)

Restituisce un messaggio sul lato server WebSocket da usare con Device Portal.

GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String, UInt32, UInt32, MessageWebSocketReceiveMode)

Restituisce un messaggio sul lato server WebSocket da usare con Device Portal.

GetServerStreamWebSocketForRequest(HttpRequestMessage)

Restituisce un flusso sul lato server WebSocket da usare con Device Portal.

GetServerStreamWebSocketForRequest(HttpRequestMessage, String, UInt32, Boolean)

Restituisce un flusso sul lato server WebSocket da usare con Device Portal.

Eventi

Closed

Generato quando la connessione al portale del dispositivo Windows viene chiusa. Un'app plug-in del portale di dispositivi deve implementare un gestore per questo evento.

RequestReceived

Generato quando una richiesta è stata ricevuta tramite il server Portale dispositivi Windows. Un'app plug-in del portale di dispositivi deve implementare un gestore per questo evento.

Si applica a