Platform (Clase)
Actualización: noviembre 2007
Representa una plataforma basada en Windows CE, por ejemplo Windows Mobile 5.0 Pocket PC, que se registra en el almacén de datos.
Espacio de nombres: Microsoft.SmartDevice.Connectivity
Ensamblado: Microsoft.SmartDevice.Connectivity (en Microsoft.SmartDevice.Connectivity.dll)
Sintaxis
Public Class Platform
Dim instance As Platform
public class Platform
public ref class Platform
public class Platform
Comentarios
Esta clase no posee ningún constructor. Para obtener una instancia, use DatastoreManager.GetPlatform o DatastoreManager.GetPlatforms.
Ejemplos
Imports System
Imports System.Collections.ObjectModel
Imports Microsoft.SmartDevice.Connectivity
Class Example
Shared Sub Main(ByVal args() As String)
' Get datastore object
Dim dsmgr As New DatastoreManager(1033)
' Get the platforms in the Datastore
Dim platforms As Collection(Of Platform) = dsmgr.GetPlatforms()
' For each platform, output name and ID
Dim platform As Platform
For Each platform In platforms
Console.WriteLine("Platform Name: " & _
platform.Name & " ID: " & platform.Id.ToString())
Console.WriteLine(" OSVersion: " & platform.GetProperty("OSVersion"))
Console.WriteLine(" DefaultPlatform: " & _
platform.GetProperty("DefaultPlatform"))
Console.WriteLine(" DefaultDevice: " & platform.GetProperty("DefaultDevice"))
Console.WriteLine(" ShortName: " & platform.GetProperty("ShortName"))
Console.WriteLine(" DefaultFormFactor: " & _
platform.GetProperty("DefaultFormFactor"))
Next platform
Console.ReadLine()
End Sub 'Main
End Class 'Example
using System;
using System.Collections.ObjectModel;
using Microsoft.SmartDevice.Connectivity;
class Example
{
static void Main(string[] args)
{
// Get datastore object
DatastoreManager dsmgr = new DatastoreManager(1033);
// Get the platforms in the Datastore
Collection<Platform> platforms = dsmgr.GetPlatforms();
// For each platform, output name, ID, and platform properties.
foreach (Platform platform in platforms)
{
Console.WriteLine("Platform Name: " + platform.Name + " ID: " + platform.Id);
Console.WriteLine(" OSVersion: " + platform.GetProperty("OSVersion"));
Console.WriteLine(" DefaultPlatform: " +
platform.GetProperty("DefaultPlatform"));
Console.WriteLine(" DefaultDevice: " + platform.GetProperty("DefaultDevice"));
Console.WriteLine(" ShortName: " + platform.GetProperty("ShortName"));
Console.WriteLine(" DefaultFormFactor: " +
platform.GetProperty("DefaultFormFactor"));
}
Console.ReadLine();
}
}
Jerarquía de herencia
System.Object
Microsoft.SmartDevice.Connectivity.Platform
Seguridad para subprocesos
Todos los miembros static (Shared en Visual Basic) públicos de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.