ConnectionProfile Class

Stellt eine Netzwerkverbindung dar, die entweder das aktuell verbundene Netzwerk oder frühere Netzwerkverbindungen umfasst. Stellt Informationen über den Verbindungsstatus und Konnektivitätsstatistiken bereit.

Syntax


public sealed class ConnectionProfile

Attribute

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Member

ConnectionProfileKlasse hat diese Membertypen:

Methoden

The ConnectionProfile Klasse hat diese Methoden. Mit C#, Visual Basic und C++ erbt es auch Methoden aus Object Klasse.

MethodeBeschreibung
GetConnectionCost Gets the cost information for the connection.
GetConnectivityIntervalsAsync Gets a list of ConnectivityInterval objects, which indicate the timestamp for when the network connection began, and a time-span for the duration of that connection.
GetDataPlanStatus Gets the current status of the data plan associated with the connection.
GetDomainConnectivityLevel Gets the current domain authentication status for a network connection. Possible values are defined by DomainConnectivityLevel.
GetLocalUsage(DateTime, DateTime) Gets the estimated data usage for a connection during over a specific period of time.
GetLocalUsage(DateTime, DateTime, RoamingStates) Gets the estimated data usage for a connection over a specific period of time and roaming state.
GetNetworkConnectivityLevel Gets the network connectivity level for this connection. This value indicates what network resources, if any, are currently available.
GetNetworkNames Retrieves names associated with the network with which the connection is currently established.
GetNetworkUsageAsync Gets a list of the estimated data traffic and connection duration over a specified period of time, for a specific network usage state.
GetSignalBars Gets a value that indicates the current number of signal bars displayed by the Windows UI for the connection.

 

Eigenschaften

Der ConnectionProfileKlasse hat diese Eigenschaften.

EigenschaftZugriffstypBeschreibung

IsWlanConnectionProfile

SchreibgeschütztGets a value that indicates if connection profile is a WLAN (WiFi) connection. This determines whether or not WlanConnectionProfileDetails is null.

IsWwanConnectionProfile

SchreibgeschütztGets a value that indicates if connection profile is a WWAN (mobile) connection. This determines whether or not WwanConnectionProfileDetails is null.

NetworkAdapter

SchreibgeschütztGets the object representing the network adapter providing connectivity for the connection.

NetworkSecuritySettings

SchreibgeschütztRetrieves the security settings for the network.

ProfileName

SchreibgeschütztGets the name of the connection profile.

ServiceProviderGuid

SchreibgeschütztGets the ID of the network operator who provisioned the connection profile.

WlanConnectionProfileDetails

SchreibgeschütztContains properties and methods defined by WlanConnectionProfile that are specific to WLAN (WiFi) connections.

WwanConnectionProfileDetails

SchreibgeschütztContains the properties and methods defined by WwanConnectionProfile that are specific to mobile broadband connections.

 

Hinweise

Mit der folgenden Beispielfunktion wird veranschaulicht, wie Daten aus einem ConnectionProfile-Objekt abgerufen werden.


function getConnectionProfileInfo(connectionProfile) {
			  
     returnString += "Connection Cost Information:\n\r";
     returnString += "===============\n\r";
     var connectionCost = connectionProfile.getConnectionCost();
     returnString += "Cost Type: " + getCostType(connectionCost.networkCostType) + "\n\r";
     returnString += "Roaming: " + connectionCost.roaming + "\n\r";
     returnString += "Over Datalimit: " + connectionCost.overDataLimit + "\n\r";
     returnString += "Approaching Datalimit: " + connectionCost.approachingDataLimit + "\n\r";
}


Weitere Beispiele zur Implementierung dieser Methoden, um auf Verbindungsinformationen zuzugreifen, finden Sie unter Schnellstart: Abrufen von Netzwerkverbindungsinformationen.

Anforderungen

Mindestens unterstützter Client

Windows 8 [Windows Store-Apps, Desktop-Apps]

Mindestens unterstützter Server

Keine unterstützt [Windows Store-Apps, Desktop-Apps]

Mindestens unterstütztes Telefon

Windows Phone 8

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadaten

Windows.winmd

 

 

Anzeigen:
© 2014 Microsoft