Método DatastoreManager.GetPlatforms
Obtém uma coleção de todas as plataformas registradas com o armazenamento de dados.
Namespace: Microsoft.SmartDevice.Connectivity
Assembly: Microsoft.SmartDevice.Connectivity (em Microsoft.SmartDevice.Connectivity.dll)
Sintaxe
Public Function GetPlatforms As Collection(Of Platform)
Dim instance As DatastoreManager
Dim returnValue As Collection(Of Platform)
returnValue = instance.GetPlatforms()
public Collection<Platform> GetPlatforms()
public:
Collection<Platform^>^ GetPlatforms()
public function GetPlatforms() : Collection<Platform>
Valor de retorno
Tipo: System.Collections.ObjectModel.Collection<Platform>
A Collection<T> de todas as plataformas.
Exemplos
' Get the platforms in the Datastore
Dim platforms As Collection(Of Platform) = dsmgr.GetPlatforms()
' For each platform, output name and ID
Console.WriteLine("Get all platforms with the GetPlatforms method: " + vbCr + vbLf)
Dim platform As Platform
For Each platform In platforms
Console.WriteLine("Platform Name: " + platform.Name + " ID: " + _
platform.Id.ToString())
Next platform
// Get the platforms in the Datastore
Collection<Platform> platforms = dsmgr.GetPlatforms();
// For each platform, output name and ID
Console.WriteLine("Get all platforms with the GetPlatforms method: \r\n");
foreach (Platform platform in platforms)
{
Console.WriteLine("Platform Name: " + platform.Name + " ID: " + platform.Id);
}
Permissões
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de códigos parcialmente Confiável.