Message Message Message Message Class

Definición

Proporciona acceso a las propiedades necesarias para definir un mensaje de Message Queuing.Provides access to the properties needed to define a Message Queuing message.

public ref class Message : System::ComponentModel::Component
public class Message : System.ComponentModel.Component
type Message = class
    inherit Component
Public Class Message
Inherits Component
Herencia

Ejemplos

En el ejemplo de código siguiente se muestra el formato de un cuerpo de mensaje utilizando BinaryMessageFormatter.The following code example demonstrates formatting a message body using BinaryMessageFormatter.

#using <system.dll>
#using <system.messaging.dll>
#using <system.drawing.dll>

using namespace System;
using namespace System::Messaging;
using namespace System::Drawing;
using namespace System::IO;

/// <summary>
/// Provides a container class for the example.
/// </summary>
ref class MyNewQueue
{
public:

   //*************************************************
   // Creates a new queue.
   //*************************************************
   static void CreateQueue( String^ queuePath )
   {
      try
      {
         if (  !MessageQueue::Exists( queuePath ) )
         {
            MessageQueue::Create( queuePath );
         }
         else
         {
            Console::WriteLine(  "{0} already exists.", queuePath );
         }
      }
      catch ( MessageQueueException^ e ) 
      {
         Console::WriteLine( e->Message );
      }

   }


   //*************************************************
   // Sends an image to a queue, using the BinaryMessageFormatter.
   //*************************************************
   void SendMessage()
   {
      try
      {
         
         // Create a new bitmap.
         // The file must be in the \bin\debug or \bin\retail folder, or
         // you must give a full path to its location.
         Image^ myImage = Bitmap::FromFile( "SentImage::bmp" );
         
         // Connect to a queue on the local computer.
         MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" );
         Message^ myMessage = gcnew Message( myImage,gcnew BinaryMessageFormatter );
         
         // Send the image to the queue.
         myQueue->Send( myMessage );
      }
      catch ( ArgumentException^ e ) 
      {
         Console::WriteLine( e->Message );
      }

      return;
   }


   //*************************************************
   // Receives a message containing an image.
   //*************************************************
   void ReceiveMessage()
   {
      try
      {
         
         // Connect to the a queue on the local computer.
         MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" );
         
         // Set the formatter to indicate body contains an Order.
         myQueue->Formatter = gcnew BinaryMessageFormatter;
         
         // Receive and format the message. 
         Message^ myMessage = myQueue->Receive();
         Bitmap^ myImage = static_cast<Bitmap^>(myMessage->Body);
         
         // This will be saved in the \bin\debug or \bin\retail folder.
         myImage->Save( "ReceivedImage::bmp", System::Drawing::Imaging::ImageFormat::Bmp );
      }
      catch ( MessageQueueException^ ) 
      {
         
         // Handle Message Queuing exceptions.
      }
      // Handle invalid serialization format.
      catch ( InvalidOperationException^ e ) 
      {
         Console::WriteLine( e->Message );
      }
      catch ( IOException^ e ) 
      {
         
         // Handle file access exceptions.
      }

      
      // Catch other exceptions as necessary.
      return;
   }

};


//*************************************************
// Provides an entry point into the application.
//         
// This example sends and receives a message from
// a queue.
//*************************************************
int main()
{
   
   // Create a new instance of the class.
   MyNewQueue^ myNewQueue = gcnew MyNewQueue;
   
   // Create a queue on the local computer.
   MyNewQueue::CreateQueue( ".\\myQueue" );
   
   // Send a message to a queue.
   myNewQueue->SendMessage();
   
   // Receive a message from a queue.
   myNewQueue->ReceiveMessage();
   return 0;
}

using System;
using System.Messaging;
using System.Drawing;
using System.IO;

namespace MyProject
{
	

	/// <summary>
	/// Provides a container class for the example.
	/// </summary>
	public class MyNewQueue
	{

		//**************************************************
		// Provides an entry point into the application.
		//		 
		// This example sends and receives a message from
		// a queue.
		//**************************************************

		public static void Main()
		{
			// Create a new instance of the class.
			MyNewQueue myNewQueue = new MyNewQueue();

			// Create a queue on the local computer.
			CreateQueue(".\\myQueue");
			
			// Send a message to a queue.
			myNewQueue.SendMessage();

			// Receive a message from a queue.
			myNewQueue.ReceiveMessage();

			return;
		}

		//**************************************************
		// Creates a new queue.
		//**************************************************

		public static void CreateQueue(string queuePath)
		{
			try	
			{
				if(!MessageQueue.Exists(queuePath))
				{
					MessageQueue.Create(queuePath);
				}
				else
				{
					Console.WriteLine(queuePath + " already exists.");
				}
			}
			catch (MessageQueueException e)
			{
				Console.WriteLine(e.Message);
			}
			
		}

		//**************************************************
		// Sends an image to a queue, using the BinaryMessageFormatter.
		//**************************************************
		
		public void SendMessage()
		{
			try{

				// Create a new bitmap.
				// The file must be in the \bin\debug or \bin\retail folder, or
				// you must give a full path to its location.
				Image myImage = Bitmap.FromFile("SentImage.bmp");

				// Connect to a queue on the local computer.
				MessageQueue myQueue = new MessageQueue(".\\myQueue");
				
				Message myMessage = new Message(myImage, new BinaryMessageFormatter());

				// Send the image to the queue.
				myQueue.Send(myMessage);
			}
			catch(ArgumentException e)
			{
				Console.WriteLine(e.Message);
			
			}

			return;
		}


		//**************************************************
		// Receives a message containing an image.
		//**************************************************
		
		public  void ReceiveMessage()
		{
						
			try
			{

				// Connect to the a queue on the local computer.
				MessageQueue myQueue = new MessageQueue(".\\myQueue");

				// Set the formatter to indicate body contains an Order.
				myQueue.Formatter = new BinaryMessageFormatter();

				// Receive and format the message. 
				System.Messaging.Message myMessage = myQueue.Receive(); 
				Bitmap myImage = (Bitmap)myMessage.Body;
				
				// This will be saved in the \bin\debug or \bin\retail folder.
				myImage.Save("ReceivedImage.bmp",System.Drawing.Imaging.ImageFormat.Bmp);
				
				
			}
			
			catch (MessageQueueException)
			{
				// Handle Message Queuing exceptions.
			}

			// Handle invalid serialization format.
			catch (InvalidOperationException e)
			{
				Console.WriteLine(e.Message);
			}

			catch (IOException e)
			{
				// Handle file access exceptions.
			}
			
			// Catch other exceptions as necessary.

			return;
		}
	}
}
Imports System
Imports System.Messaging
Imports System.Drawing
Imports System.IO


Namespace MyProj
    _
   
   
   Public Class MyNewQueue
      
      
      '**************************************************
      ' Provides an entry point into the application.
      '		 
      ' This example sends and receives a message from
      ' a queue.
      '**************************************************
      Public Shared Sub Main()
         ' Create a new instance of the class.
         Dim myNewQueue As New MyNewQueue()
         
         ' Create a queue on the local computer.
         CreateQueue(".\myQueue")
         
         ' Send a message to a queue.
         myNewQueue.SendMessage()
         
         ' Receive a message from a queue.
         myNewQueue.ReceiveMessage()
         
         Return
      End Sub 'Main
      
      
      '**************************************************
      ' Creates a new queue.
      '**************************************************
      Public Shared Sub CreateQueue(queuePath As String)
         Try
            If Not MessageQueue.Exists(queuePath) Then
               MessageQueue.Create(queuePath)
            Else
               Console.WriteLine((queuePath + " already exists."))
            End If
         Catch e As MessageQueueException
            Console.WriteLine(e.Message)
         End Try
      End Sub 'CreateQueue
       
      
      '**************************************************
      ' Sends an image to a queue, using the BinaryMessageFormatter.
      '**************************************************
      Public Sub SendMessage()
         Try
            
            ' Create a new bitmap.
            ' The file must be in the \bin\debug or \bin\retail folder, or
            ' you must give a full path to its location.
            Dim myImage As Image = Bitmap.FromFile("SentImage.bmp")
            
            ' Connect to a queue on the local computer.
            Dim myQueue As New MessageQueue(".\myQueue")
            
            Dim myMessage As New Message(myImage, New BinaryMessageFormatter())
            
            ' Send the image to the queue.
            myQueue.Send(myMessage)
         Catch e As ArgumentException
            Console.WriteLine(e.Message)
         End Try 
         
         Return
      End Sub 'SendMessage
      
      
      
      '**************************************************
      ' Receives a message containing an image.
      '**************************************************
      Public Sub ReceiveMessage()
         
         Try
            
            ' Connect to the a queue on the local computer.
            Dim myQueue As New MessageQueue(".\myQueue")
            
            ' Set the formatter to indicate body contains an Order.
            myQueue.Formatter = New BinaryMessageFormatter()
            
            ' Receive and format the message. 
            Dim myMessage As System.Messaging.Message = myQueue.Receive()
            Dim myImage As Bitmap = CType(myMessage.Body, Bitmap)
            
            ' This will be saved in the \bin\debug or \bin\retail folder.
            myImage.Save("ReceivedImage.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
         
         
         
         'Catch
         ' Handle Message Queuing exceptions.
         
         ' Handle invalid serialization format.
         Catch e As InvalidOperationException
            Console.WriteLine(e.Message)
         
         Catch e As IOException
         End Try
         ' Handle file access exceptions.
         
         ' Catch other exceptions as necessary.
         Return
      End Sub 'ReceiveMessage
   End Class 'MyNewQueue
End Namespace 'MyProj

En el ejemplo de código siguiente se muestra el formato de un cuerpo de mensaje utilizando XmlMessageFormatter.The following code example demonstrates formatting a message body using XmlMessageFormatter.

#using <system.dll>
#using <system.messaging.dll>
#using <system.drawing.dll>

using namespace System;
using namespace System::Messaging;
using namespace System::Drawing;
using namespace System::IO;
ref class Order
{
public:
   int orderId;
   DateTime orderTime;
};

ref class MyNewQueue
{
public:
   static void CreateQueue( String^ queuePath )
   {
      try
      {
         if (  !MessageQueue::Exists( queuePath ) )
         {
            MessageQueue::Create( queuePath );
         }
         else
         {
            Console::WriteLine(  "{0} already exists.", queuePath );
         }
      }
      catch ( MessageQueueException^ e ) 
      {
         Console::WriteLine( e->Message );
      }

   }

   void SendMessage()
   {
      try
      {
         // Create a new order and set values.
         Order^ sentOrder = gcnew Order;
         sentOrder->orderId = 3;
         sentOrder->orderTime = DateTime::Now;

         // Connect to a queue on the local computer.
         MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" );

         // Create the new order.
         Message^ myMessage = gcnew Message( sentOrder );

         // Send the order to the queue.
         myQueue->Send( myMessage );
      }
      catch ( ArgumentException^ e ) 
      {
         Console::WriteLine( e->Message );
      }

      return;
   }

   void ReceiveMessage()
   {
      // Connect to the a queue on the local computer.
      MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" );

      // Set the formatter to indicate body contains an Order.
      array<Type^>^p = gcnew array<Type^>(1);
      p[ 0 ] = Order::typeid;
      myQueue->Formatter = gcnew XmlMessageFormatter( p );
      try
      {
         // Receive and format the message. 
         Message^ myMessage = myQueue->Receive();
         Order^ myOrder = dynamic_cast<Order^>(myMessage->Body);

         // Display message information.
         Console::WriteLine( "Order ID: {0}", myOrder->orderId );
         Console::WriteLine( "Sent: {0}", myOrder->orderTime );
      }
      catch ( MessageQueueException^ ) 
      {
         // Handle Message Queuing exceptions.
      }
      // Handle invalid serialization format.
      catch ( InvalidOperationException^ e ) 
      {
         Console::WriteLine( e->Message );
      }

      // Catch other exceptions as necessary.
      return;
   }
};

int main()
{
   // Create a new instance of the class.
   MyNewQueue^ myNewQueue = gcnew MyNewQueue;

   // Create a queue on the local computer.
   MyNewQueue::CreateQueue( ".\\myQueue" );

   // Send a message to a queue.
   myNewQueue->SendMessage();

   // Receive a message from a queue.
   myNewQueue->ReceiveMessage();
   return 0;
}
using System;
using System.Messaging;
using System.Drawing;
using System.IO;

namespace MyProject
{

	// The following example 
	// sends to a queue and receives from a queue.
	public class Order
	{
		public int orderId;
		public DateTime orderTime;
	};	

	/// <summary>
	/// Provides a container class for the example.
	/// </summary>
	public class MyNewQueue
	{

		//**************************************************
		// Provides an entry point into the application.
		//		 
		// This example sends and receives a message from
		// a queue.
		//**************************************************

		public static void Main()
		{
			// Create a new instance of the class.
			MyNewQueue myNewQueue = new MyNewQueue();

			// Create a queue on the local computer.
			CreateQueue(".\\myQueue");
			
			// Send a message to a queue.
			myNewQueue.SendMessage();

			// Receive a message from a queue.
			myNewQueue.ReceiveMessage();

			return;
		}

		//**************************************************
		// Creates a new queue.
		//**************************************************

		public static void CreateQueue(string queuePath)
		{
			try	
			{
				if(!MessageQueue.Exists(queuePath))
				{
					MessageQueue.Create(queuePath);
				}
				else
				{
					Console.WriteLine(queuePath + " already exists.");
				}
			}
			catch (MessageQueueException e)
			{
				Console.WriteLine(e.Message);
			}
			
		}

		//**************************************************
		// Sends an Order to a queue.
		//**************************************************
		
		public void SendMessage()
		{
			try
			{

				// Create a new order and set values.
				Order sentOrder = new Order();
				sentOrder.orderId = 3;
				sentOrder.orderTime = DateTime.Now;

				// Connect to a queue on the local computer.
				MessageQueue myQueue = new MessageQueue(".\\myQueue");


				
				// Create the new order.
				Message myMessage = new Message(sentOrder);

				// Send the order to the queue.
				myQueue.Send(myMessage);
			}
			catch(ArgumentException e)
			{
				Console.WriteLine(e.Message);
			
			}

			return;
		}


		//**************************************************
		// Receives a message containing an order.
		//**************************************************
		
		public  void ReceiveMessage()
		{
			// Connect to the a queue on the local computer.
			MessageQueue myQueue = new MessageQueue(".\\myQueue");

			// Set the formatter to indicate body contains an Order.
			myQueue.Formatter = new XmlMessageFormatter(new Type[]
				{typeof(MyProject.Order)});
			
			try
			{
				// Receive and format the message. 
				Message myMessage =	myQueue.Receive(); 
				Order myOrder = (Order)myMessage.Body;

				// Display message information.
				Console.WriteLine("Order ID: " + 
					myOrder.orderId.ToString());
				Console.WriteLine("Sent: " + 
					myOrder.orderTime.ToString());
			}
			
			catch (MessageQueueException)
			{
				// Handle Message Queuing exceptions.
			}

				// Handle invalid serialization format.
			catch (InvalidOperationException e)
			{
				Console.WriteLine(e.Message);
			}
			
			// Catch other exceptions as necessary.

			return;
		}
	}
}
Imports System
Imports System.Messaging
Imports System.Drawing
Imports System.IO



   
' The following example 
' sends to a queue and receives from a queue.
Public Class Order
      Public orderId As Integer
      Public orderTime As DateTime
End Class 'Order

   
  
' Provides a container class for the example.

Public Class MyNewQueue
      
      

   ' Provides an entry point into the application.
   '		 
   ' This example sends and receives a message from
   ' a queue.

   Public Shared Sub Main()
      ' Create a new instance of the class.
      Dim myNewQueue As New MyNewQueue()
        
      ' Create a queue on the local computer.
      CreateQueue(".\myQueue")
         
      ' Send a message to a queue.
      myNewQueue.SendMessage()
       
      ' Receive a message from a queue.
      myNewQueue.ReceiveMessage()
         
      Return
   End Sub 'Main
      
      

      ' Creates a new queue.
   Public Shared Sub CreateQueue(queuePath As String)
      Try
         If Not MessageQueue.Exists(queuePath) Then
            MessageQueue.Create(queuePath)
         Else
            Console.WriteLine((queuePath + " already exists."))
         End If
      Catch e As MessageQueueException
         Console.WriteLine(e.Message)
      End Try
   End Sub 'CreateQueue
       
      

      ' Sends an Order to a queue.

   Public Sub SendMessage()
      Try
            
            ' Create a new order and set values.
            Dim sentOrder As New Order()
            sentOrder.orderId = 3
            sentOrder.orderTime = DateTime.Now
            
            ' Connect to a queue on the local computer.
            Dim myQueue As New MessageQueue(".\myQueue")
            
            
            
            ' Create the new order.
            Dim myMessage As New Message(sentOrder)
            
            ' Send the order to the queue.
            myQueue.Send(myMessage)
      Catch e As ArgumentException
            Console.WriteLine(e.Message)
      End Try 
         
      Return
   End Sub 'SendMessage
      
      
      
 
      ' Receives a message containing an order.
 
   Public Sub ReceiveMessage()
         ' Connect to the a queue on the local computer.
         Dim myQueue As New MessageQueue(".\myQueue")
         
         ' Set the formatter to indicate body contains an Order.
         myQueue.Formatter = New XmlMessageFormatter(New Type() {GetType(Order)})
         
         Try
            ' Receive and format the message. 
            Dim myMessage As Message = myQueue.Receive()
            Dim myOrder As Order = CType(myMessage.Body, Order)
            
            ' Display message information.
            Console.WriteLine(("Order ID: " + myOrder.orderId.ToString()))
            Console.WriteLine(("Sent: " + myOrder.orderTime.ToString()))
         
  
         ' Handle invalid serialization format.
         Catch e As InvalidOperationException
            Console.WriteLine(e.Message)
         End Try
         
         ' Catch other exceptions as necessary.
         Return
   End Sub 'ReceiveMessage
End Class 'MyNewQueue

Comentarios

Use la Message clase busquen o reciban mensajes desde una cola, o tener un control exhaustivo sobre las propiedades de mensaje al enviar un mensaje a una cola.Use the Message class to peek or receive messages from a queue, or to have fine control over message properties when sending a message to a queue.

MessageQueue usa el Message clase cuando se ejecuta el método Peek o recibe mensajes desde las colas, porque tanto el MessageQueue.Peek y MessageQueue.Receive métodos crean una nueva instancia de la Message clase y establecer las propiedades de la instancia.MessageQueue uses the Message class when it peeks or receives messages from queues, because both the MessageQueue.Peek and MessageQueue.Receive methods create a new instance of the Message class and set the instance's properties. El Message aplican propiedades de solo lectura de la clase para recuperar mensajes de una cola, mientras que se aplican las propiedades de lectura/escritura para enviar y recuperar mensajes.The Message class's read-only properties apply to retrieving messages from a queue, while the read/write properties apply to sending and retrieving messages. Cuando MessageQueue inspecciona o recibe un mensaje de una cola, su MessageReadPropertyFilter propiedad determina cuál de las propiedades del mensaje se recuperan.When MessageQueue peeks or receives a message from a queue, its MessageReadPropertyFilter property determines which of the message's properties are retrieved.

El MessageQueue la clase Send método le permite especificar cualquier tipo de objeto para un mensaje que se envía a dicha cola.The MessageQueue class's Send method allows you to specify any object type for a message being sent to that queue. Puede usar el MessageQueue la instancia DefaultPropertiesToSend propiedad para especificar la configuración para los mensajes genéricos enviados a la cola.You can use the MessageQueue instance's DefaultPropertiesToSend property to specify settings for generic messages sent to the queue. Los tipos de configuración incluyen el formateador, etiqueta, cifrado y autenticación.The types of settings include formatter, label, encryption, and authentication. También puede especificar valores para adecuado DefaultPropertiesToSend miembros al coordinar su aplicación de mensajería para responder a mensajes de confirmación e informe.You can also specify values for the appropriate DefaultPropertiesToSend members when you coordinate your messaging application to respond to acknowledgment and report messages. Mediante un Message instancia para enviar un mensaje a la cola le ofrece la flexibilidad necesaria para tener acceso y modificar muchas de estas propiedades - para un solo mensaje o en forma de mensaje-mensaje.Using a Message instance to send a message to the queue gives you the flexibility to access and modify many of these properties - either for a single message or on a message-by-message basis. Message las propiedades tienen prioridad sobre DefaultPropertiesToSend.Message properties take precedence over DefaultPropertiesToSend.

Datos del mensaje se almacenan en el Body propiedad y en menor medida, la AppSpecific y Extension propiedades.Message data is stored in the Body property and to a lesser extent, the AppSpecific and Extension properties. Cuando se cifra, se serializa o se deserializa, solo el contenido de los datos del mensaje del Body propiedad se ven afectados.When message data is encrypted, serialized, or deserialized, only the contents of the Body property are affected.

El contenido de la Body se serializan propiedad cuando se envía el mensaje, mediante la Formatter propiedad especificado.The contents of the Body property are serialized when the message is sent, using the Formatter property you specify. El contenido serializado se encuentra en el BodyStream propiedad.The serialized contents are found in the BodyStream property. También puede establecer el BodyStream propiedad directamente, por ejemplo, para enviar un archivo como el contenido de datos de un mensaje.You can also set the BodyStream property directly, for example, to send a file as the data content of a message. Puede cambiar el Body o Formatter propiedades en cualquier momento antes de enviar el mensaje y los datos se serializarán correctamente al llamar a Send.You can change the Body or Formatter properties at any time before sending the message, and the data will be serialized appropriately when you call Send.

Las propiedades definidas por el MessageQueue.DefaultPropertiesToSend propiedad se aplica únicamente a mensajes que no son de tipo Message.The properties defined by the MessageQueue.DefaultPropertiesToSend property apply only to messages that are not of type Message. Si especifica la DefaultPropertiesToSend propiedad para un MessageQueue, el con el mismo nombre en las propiedades de un Message instancia enviados a dicha cola hacen que se omiten estas propiedades predeterminadas.If you specify the DefaultPropertiesToSend property for a MessageQueue, the identically named properties in a Message instance sent to that queue cause these default properties to be ignored.

Para obtener una lista de valores de propiedad iniciales de una instancia de Message, consulte el Message constructor.For a list of initial property values for an instance of Message, see the Message constructor.

Constructores

Message() Message() Message() Message()

Inicializa una nueva instancia de la clase Message con un cuerpo de mensaje vacío.Initializes a new instance of the Message class with an empty body.

Message(Object) Message(Object) Message(Object) Message(Object)

Inicializa una nueva instancia de la clase Message, utilizando XmlMessageFormatter para serializar el objeto especificado en el cuerpo del mensaje.Initializes a new instance of the Message class, using the XmlMessageFormatter to serialize the specified object into the body of the message.

Message(Object, IMessageFormatter) Message(Object, IMessageFormatter) Message(Object, IMessageFormatter) Message(Object, IMessageFormatter)

Inicializa una instancia nueva de la clase Message, utilizando el formateador especificado para serializar el objeto especificado en el cuerpo del mensaje.Initializes a new instance of the Message class using the specified formatter to serialize the specified object into the body of the message.

Campos

InfiniteTimeout InfiniteTimeout InfiniteTimeout InfiniteTimeout

Especifica que no existe un tiempo de espera.Specifies that no time-out exists.

Propiedades

AcknowledgeType AcknowledgeType AcknowledgeType AcknowledgeType

Obtiene o establece el tipo de mensaje de confirmación que debe devolverse a la aplicación que hace el envío.Gets or sets the type of acknowledgment message to be returned to the sending application.

Acknowledgment Acknowledgment Acknowledgment Acknowledgment

Obtiene la clasificación de confirmación que representa este mensaje.Gets the classification of acknowledgment that this message represents.

AdministrationQueue AdministrationQueue AdministrationQueue AdministrationQueue

Obtiene o establece la cola utilizada para los mensajes de confirmación generados por Message Queuing.Gets or sets the queue that receives the acknowledgement messages that Message Queuing generates.

AppSpecific AppSpecific AppSpecific AppSpecific

Obtiene o establece información adicional específica de la aplicación.Gets or sets additional, application-specific information.

ArrivedTime ArrivedTime ArrivedTime ArrivedTime

Obtiene la hora en que llegó el mensaje a la cola de destino.Gets the time that the message arrived in the destination queue.

AttachSenderId AttachSenderId AttachSenderId AttachSenderId

Obtiene o establece un valor que indica si el identificador del remitente se adjuntará al mensaje.Gets or sets a value that indicates whether the sender ID should be attached to the message.

Authenticated Authenticated Authenticated Authenticated

Obtiene un valor que indica si se autenticó el mensaje.Gets a value that indicates whether the message was authenticated.

AuthenticationProviderName AuthenticationProviderName AuthenticationProviderName AuthenticationProviderName

Obtiene o establece el nombre del proveedor criptográfico que se utiliza para generar la firma digital del mensaje.Gets or sets the name of the cryptographic provider used to generate the digital signature of the message.

AuthenticationProviderType AuthenticationProviderType AuthenticationProviderType AuthenticationProviderType

Obtiene o establece el tipo del proveedor criptográfico que se utiliza para generar la firma digital del mensaje.Gets or sets the type of cryptographic provider used to generate the digital signature of the message.

Body Body Body Body

Obtiene o establece el contenido del mensaje.Gets or sets the content of the message.

BodyStream BodyStream BodyStream BodyStream

Obtiene o establece la información del cuerpo del mensaje.Gets or sets the information in the body of the message.

BodyType BodyType BodyType BodyType

Obtiene o establece el tipo de datos que contiene el cuerpo del mensaje.Gets or sets the type of data that the message body contains.

CanRaiseEvents CanRaiseEvents CanRaiseEvents CanRaiseEvents

Obtiene un valor que indica si el componente puede generar un evento.Gets a value indicating whether the component can raise an event.

(Inherited from Component)
ConnectorType ConnectorType ConnectorType ConnectorType

Obtiene y establece un valor que indica que la aplicación de envío estableció algunas propiedades de mensajes, normalmente establecidas por Message Queuing.Gets or sets a value that indicates that some message properties typically set by Message Queuing were set by the sending application.

Container Container Container Container

Obtiene IContainer que contiene Component.Gets the IContainer that contains the Component.

(Inherited from Component)
CorrelationId CorrelationId CorrelationId CorrelationId

Obtiene o establece el identificador de mensaje que utilizan los mensajes de confirmación, informe y respuesta para hacer referencia al mensaje original.Gets or sets the message identifier used by acknowledgment, report, and response messages to reference the original message.

DesignMode DesignMode DesignMode DesignMode

Obtiene un valor que indica si Component está actualmente en modo de diseño.Gets a value that indicates whether the Component is currently in design mode.

(Inherited from Component)
DestinationQueue DestinationQueue DestinationQueue DestinationQueue

Obtiene la cola de destino deseada para un mensaje.Gets the intended destination queue for a message.

DestinationSymmetricKey DestinationSymmetricKey DestinationSymmetricKey DestinationSymmetricKey

Obtiene o establece la clave simétrica utilizada para cifrar los mensajes cifrados por la aplicación o los enviados a colas externas.Gets or sets the symmetric key used to encrypt application-encrypted messages or messages sent to foreign queues.

DigitalSignature DigitalSignature DigitalSignature DigitalSignature

Obtiene o establece la firma digital que Message Queuing utiliza para autenticar el mensaje.Gets or sets the digital signature that Message Queuing uses to authenticate the message.

EncryptionAlgorithm EncryptionAlgorithm EncryptionAlgorithm EncryptionAlgorithm

Obtiene o establece el algoritmo de cifrado que se utiliza para cifrar el cuerpo de un mensaje privado.Gets or sets the encryption algorithm used to encrypt the body of a private message.

Events Events Events Events

Obtiene la lista de controladores de eventos asociados a Component.Gets the list of event handlers that are attached to this Component.

(Inherited from Component)
Extension Extension Extension Extension

Obtiene o establece información adicional, definida por la aplicación y asociada al mensaje.Gets or sets additional, application-defined information associated with the message.

Formatter Formatter Formatter Formatter

Obtiene o establece el formateador empleado para serializar o deserializar un objeto en el cuerpo de un mensaje.Gets or sets the formatter used to serialize an object into or deserialize an object from the message body.

HashAlgorithm HashAlgorithm HashAlgorithm HashAlgorithm

Obtiene o establece el algoritmo de hash que Message Queuing utiliza al autenticar mensajes o al crear una firma digital para un mensaje.Gets or sets the hashing algorithm that Message Queuing uses when authenticating a message or creating a digital signature for a message.

Id Id Id Id

Obtiene el identificador del mensaje.Gets the message's identifier.

IsFirstInTransaction IsFirstInTransaction IsFirstInTransaction IsFirstInTransaction

Obtiene un valor que indica si el mensaje era el primer mensaje enviado en una transacción.Gets a value that indicates whether the message was the first message sent in a transaction.

IsLastInTransaction IsLastInTransaction IsLastInTransaction IsLastInTransaction

Obtiene un valor que indica si el mensaje era el último mensaje enviado en una transacción.Gets a value that indicates whether the message was the last message sent in a transaction.

Label Label Label Label

Obtiene o establece una cadena Unicode definida por la aplicación que describe el mensaje.Gets or sets an application-defined Unicode string that describes the message.

LookupId LookupId LookupId LookupId

Introducido en MSMQ 3.0.Introduced in MSMQ 3.0. Obtiene el identificador de búsqueda del mensaje.Gets the message's lookup identifier.

MessageType MessageType MessageType MessageType

Obtiene el tipo de mensaje: Normal, Acknowledgment o Report.Gets the message type: Normal, Acknowledgment, or Report.

Priority Priority Priority Priority

Obtiene o establece la prioridad del mensaje, que determina en qué punto de la cola se ubica el mensaje.Gets or sets the message priority, which determines where in the queue the message is placed.

Recoverable Recoverable Recoverable Recoverable

Obtiene o establece un valor que indica si se garantiza la entrega del mensaje en caso de haber errores en el equipo o problemas en la red.Gets or sets a value that indicates whether the message is guaranteed to be delivered in the event of a computer failure or network problem.

ResponseQueue ResponseQueue ResponseQueue ResponseQueue

Obtiene o establece la cola que recibe los mensajes de respuesta generados por la aplicación.Gets or sets the queue that receives application-generated response messages.

SecurityContext SecurityContext SecurityContext SecurityContext

Obtiene o establece el contexto de seguridad para un mensaje.Gets or sets the security context for a message.

SenderCertificate SenderCertificate SenderCertificate SenderCertificate

Obtiene o establece el certificado de seguridad que se utilizará para autenticar mensajes.Gets or sets the security certificate used to authenticate messages.

SenderId SenderId SenderId SenderId

Obtiene el identificador del usuario remitente.Gets the identifier of the sending user.

SenderVersion SenderVersion SenderVersion SenderVersion

Obtiene la versión de Message Queuing que se utilizó para enviar el mensaje.Gets the version of Message Queuing used to send the message.

SentTime SentTime SentTime SentTime

Obtiene la fecha y hora del equipo de envío en las que el administrador de colas de origen envió el mensaje.Gets the date and time on the sending computer that the message was sent by the source queue manager.

Site Site Site Site

Obtiene o establece el ISite de Component.Gets or sets the ISite of the Component.

(Inherited from Component)
SourceMachine SourceMachine SourceMachine SourceMachine

Obtiene el equipo donde se originó el mensaje.Gets the computer from which the message originated.

TimeToBeReceived TimeToBeReceived TimeToBeReceived TimeToBeReceived

Obtiene o establece el límite máximo de tiempo para recibir el mensaje de la cola de destino.Gets or sets the maximum amount of time for the message to be received from the destination queue.

TimeToReachQueue TimeToReachQueue TimeToReachQueue TimeToReachQueue

Obtiene o establece el límite máximo de tiempo para que el mensaje alcance la cola.Gets or sets the maximum amount of time for the message to reach the queue.

TransactionId TransactionId TransactionId TransactionId

Obtiene el identificador de la transacción a la que pertenecía el mensaje.Gets the identifier for the transaction of which the message was a part.

TransactionStatusQueue TransactionStatusQueue TransactionStatusQueue TransactionStatusQueue

Obtiene la cola de estado de transacción del equipo de origen.Gets the transaction status queue on the source computer.

UseAuthentication UseAuthentication UseAuthentication UseAuthentication

Obtiene o establece un valor que indica si se autenticó (o debe autenticarse) el mensaje antes de enviarse.Gets or sets a value that indicates whether the message was (or must be) authenticated before being sent.

UseDeadLetterQueue UseDeadLetterQueue UseDeadLetterQueue UseDeadLetterQueue

Obtiene o establece un valor que indica si debe enviarse una copia del mensaje que no pudo entregarse a la cola de mensajes no enviados.Gets or sets a value that indicates whether a copy of the message that could not be delivered should be sent to a dead-letter queue.

UseEncryption UseEncryption UseEncryption UseEncryption

Obtiene o establece un valor que indica si el mensaje debe ser privado.Gets or sets a value that indicates whether to make the message private.

UseJournalQueue UseJournalQueue UseJournalQueue UseJournalQueue

Obtiene o establece un valor que indica si debe conservarse una copia del mensaje en un diario del equipo de origen.Gets or sets a value that indicates whether a copy of the message should be kept in a machine journal on the originating computer.

UseTracing UseTracing UseTracing UseTracing

Obtiene o establece un valor que indica si se debe seguir la traza de un mensaje mientras se traslada a su cola de destino.Gets or sets a value that indicates whether to trace a message as it moves toward its destination queue.

Métodos

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Crea un objeto que contiene toda la información relevante necesaria para generar un proxy utilizado para comunicarse con un objeto remoto.Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose() Dispose() Dispose() Dispose()

Libera todos los recursos que usa Component.Releases all resources used by the Component.

(Inherited from Component)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Libera los recursos no administrados que usa Component y, de forma opcional, libera los recursos administrados.Releases the unmanaged resources used by the Component and optionally releases the managed resources.

(Inherited from Component)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Recupera el objeto de servicio de duración actual que controla la directiva de duración de esta instancia.Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Devuelve un objeto que representa el servicio suministrado por Component o por Container.Returns an object that represents a service provided by the Component or by its Container.

(Inherited from Component)
GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtiene un objeto de servicio de duración para controlar la directiva de duración de esta instancia.Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Crea una copia superficial del objeto MarshalByRefObject actual.Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString() ToString() ToString() ToString()

Devuelve una String que contiene el nombre del Component, si existe.Returns a String containing the name of the Component, if any. Este método no se debe invalidar.This method should not be overridden.

(Inherited from Component)

Eventos

Disposed Disposed Disposed Disposed

Se produce cuando el componente se elimina mediante una llamada al método Dispose().Occurs when the component is disposed by a call to the Dispose() method.

(Inherited from Component)

Se aplica a

Consulte también: