Classe PacketFactory
Usado na obtenção de objetos que implementam IPacket.
Namespace: Microsoft.SmartDevice.DeviceAgentTransport
Assembly: Microsoft.SmartDevice.DeviceAgentTransport (em Microsoft.SmartDevice.DeviceAgentTransport.dll)
Sintaxe
Public NotInheritable Class PacketFactory
Você não precisa declarar uma instância de uma classe estática para acessar seus membros.
public static class PacketFactory
public ref class PacketFactory abstract sealed
public final class PacketFactory
Comentários
Não crie objetos desse tipo.O objetivo dessa classe é obter objetos que implementam IPacket.
Exemplos
packet = PacketFactory.GetNewPacket()
' Write the version of .NET Compact Framework into the packet.
packet.WriteString("Hello Desktop Computer")
packet.WriteInt32(Environment.Version.Major)
packet.WriteInt32(Environment.Version.Minor)
packet.WriteInt32(Environment.Version.Build)
packet.WriteInt32(Environment.Version.Revision)
' Pass the packet to desktop application.
packetStream.Write(packet)
End Sub 'Main
packet = PacketFactory.GetNewPacket();
// Write the version of .NET Compact Framework into the packet.
packet.WriteString("Hello Desktop Computer");
packet.WriteInt32(Environment.Version.Major);
packet.WriteInt32(Environment.Version.Minor);
packet.WriteInt32(Environment.Version.Build);
packet.WriteInt32(Environment.Version.Revision);
// Pass the packet to desktop application.
packetStream.Write(packet);
Hierarquia de herança
System.Object
Microsoft.SmartDevice.DeviceAgentTransport.PacketFactory
Acesso thread-safe
Quaisquer membros static (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.