EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

Retrieve ConnectionProfile objects for a MobileBroadbandAccount

Updated: August 27, 2013

A ConnectionProfile object contains a set of properties and methods that you can use to obtain connectivity, usage, and data plan information for established network connections. The connection profiles associated with a mobile account can be retrieved by using the MobileBroadbandAccount object. The following code example illustrates shows how to do this:

noteNote
A list of allConnectionProfile objects can be retrieved from Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles.


var myConnectionProfileList = myNetworkAccountObject.getConnectionProfiles();

if (myConnectionProfileList.length !== 0)
{
  for (var i = 0; i < myConnectionProfileList.length; i++)
  {
    //Display connection profile properties
    var connectivityLevel = myConnectionProfileList[i].getNetworkConnectivityLevel();
    }
  }
else 
{
  // No connection profiles are associated with this mobile broadband account.
}

See Also

Показ:
© 2014 Microsoft