Message Classe

Definizione

Fornisce accesso alle proprietà necessarie per definire un messaggio di Accodamento messaggi.

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

Esempio

Nell'esempio di codice seguente viene illustrata la formattazione di un corpo del messaggio usando 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.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
      
      
      '**************************************************
      ' 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
       
      
      '**************************************************
      ' 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
      
      
      
      '**************************************************
      ' 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
   End Class
End Namespace 'MyProj

Nell'esempio di codice seguente viene illustrata la formattazione di un corpo del messaggio usando 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.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

   
  
' 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
      
      

      ' 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
       
      

      ' 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
      
      
      
 
      ' 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
End Class

Commenti

Usare la classe per visualizzare o ricevere messaggi da una coda o per avere un controllo corretto sulle proprietà del messaggio durante l'invio Message di un messaggio a una coda.

MessageQueue usa la Message classe quando visualizza o riceve messaggi dalle code, perché entrambi i MessageQueue.Peek metodi e MessageQueue.Receive creano una nuova istanza della classe e impostano le proprietà dell'istanza Message . Le Message proprietà di sola lettura della classe si applicano al recupero di messaggi da una coda, mentre le proprietà di lettura/scrittura si applicano all'invio e al recupero dei messaggi. Quando MessageQueue viene visualizzato o ricevuto un messaggio da una coda, la relativa MessageReadPropertyFilter proprietà determina quale delle proprietà del messaggio vengono recuperate.

Il MessageQueue metodo della classe consente di specificare qualsiasi tipo di Send oggetto per un messaggio inviato a tale coda. È possibile usare la MessageQueue proprietà dell'istanza DefaultPropertiesToSend per specificare le impostazioni per i messaggi generici inviati alla coda. I tipi di impostazioni includono formattatore, etichetta, crittografia e autenticazione. È anche possibile specificare i valori per i membri appropriati DefaultPropertiesToSend quando si coordina l'applicazione di messaggistica per rispondere al riconoscimento e ai messaggi di report. L'uso di un'istanza Message per inviare un messaggio alla coda offre la flessibilità di accesso e modifica di molte di queste proprietà, sia per un singolo messaggio che per messaggio. Message le proprietà hanno la precedenza su DefaultPropertiesToSend.

I dati dei Body messaggi vengono archiviati nella proprietà e in misura minore, le AppSpecific proprietà e Extension . Quando i dati dei messaggi vengono crittografati, serializzati o deserializzati, vengono interessati solo il contenuto della Body proprietà.

Il contenuto della Body proprietà viene serializzato quando viene inviato il messaggio usando la Formatter proprietà specificata. Il contenuto serializzato viene trovato nella BodyStream proprietà . È anche possibile impostare la BodyStream proprietà direttamente, ad esempio, per inviare un file come contenuto dati di un messaggio. È possibile modificare le Body proprietà o Formatter in qualsiasi momento prima di inviare il messaggio e i dati verranno serializzati in modo appropriato quando si chiama Send.

Le proprietà definite dalla MessageQueue.DefaultPropertiesToSend proprietà si applicano solo ai messaggi che non sono di tipo Message. Se si specifica la proprietà per un , le proprietà denominate in modo identico in un'istanza MessageQueueMessage inviata a tale coda causano l'ignorare DefaultPropertiesToSend queste proprietà predefinite.

Per un elenco di valori di proprietà iniziali per un'istanza di Message, vedere il Message costruttore.

Costruttori

Message()

Inizializza una nuova istanza della classe Message con un corpo vuoto.

Message(Object)

Inizializza una nuova istanza della classe Message utilizzando XmlMessageFormatter per serializzare l'oggetto specificato nel corpo del messaggio.

Message(Object, IMessageFormatter)

Inizializza una nuova istanza della classe Message utilizzando il formattatore specificato per serializzare l'oggetto specificato nel corpo del messaggio.

Campi

InfiniteTimeout

Specifica che non è previsto un timeout.

Proprietà

AcknowledgeType

Ottiene o imposta il tipo di messaggio di acknowledgment da restituire all'applicazione che esegue l'invio.

Acknowledgment

Ottiene la classificazione dei messaggi di riconoscimento rappresentati da questo messaggio.

AdministrationQueue

Ottiene o imposta la coda che riceve i messaggi di riconoscimento generati da Accodamento messaggi.

AppSpecific

Ottiene o imposta informazioni aggiuntive specifiche di un'applicazione.

ArrivedTime

Ottiene l'ora in cui il messaggio ha raggiunto la coda di destinazione.

AttachSenderId

Ottiene o imposta un valore che indica se l'ID del mittente deve essere allegato al messaggio.

Authenticated

Ottiene un valore che indica se il messaggio è stato autenticato.

AuthenticationProviderName

Ottiene o imposta il nome del provider di crittografia utilizzato per generare la firma digitale del messaggio.

AuthenticationProviderType

Ottiene o imposta il tipo di provider di crittografia utilizzato per generare la firma digitale del messaggio.

Body

Ottiene o imposta il contenuto del messaggio.

BodyStream

Ottiene o imposta le informazioni presenti nel corpo del messaggio.

BodyType

Ottiene o imposta il tipo di dati contenuti nel corpo del messaggio.

CanRaiseEvents

Ottiene un valore che indica se il componente può generare un evento.

(Ereditato da Component)
ConnectorType

Ottiene o imposta un valore che indica che alcune proprietà del messaggio normalmente impostate da Accodamento messaggi sono state impostate dall'applicazione mittente.

Container

Ottiene l'oggetto IContainer che contiene Component.

(Ereditato da Component)
CorrelationId

Ottiene o imposta l'identificatore del messaggio utilizzato dai messaggi di riconoscimento, di rapporto e di risposta per fare riferimento al messaggio originale.

DesignMode

Ottiene un valore che indica se il Component si trova in modalità progettazione.

(Ereditato da Component)
DestinationQueue

Ottiene la coda di destinazione desiderata per un messaggio.

DestinationSymmetricKey

Ottiene o imposta la chiave simmetrica utilizzata per crittografare i messaggi crittografati dall'applicazione o i messaggi inviati alle code esterne.

DigitalSignature

Ottiene o imposta la firma digitale utilizzata da Accodamento messaggi per autenticare il messaggio.

EncryptionAlgorithm

Ottiene o imposta l'algoritmo di crittografia utilizzato per crittografare il corpo di un messaggio privato.

Events

Ottiene l'elenco dei gestori eventi allegati a questo Component.

(Ereditato da Component)
Extension

Ottiene o imposta informazioni aggiuntive definite dall'applicazione, associate al messaggio.

Formatter

Ottiene o imposta il formattatore utilizzato per serializzare o deserializzare un oggetto da e nel corpo del messaggio.

HashAlgorithm

Ottiene o imposta l'algoritmo hash utilizzato da Accodamento messaggi per autenticare un messaggio o creare una firma digitale per un messaggio.

Id

Ottiene l'identificatore del messaggio.

IsFirstInTransaction

Ottiene un valore che indica se il messaggio è stato il primo messaggio inviato in una transazione.

IsLastInTransaction

Ottiene un valore che indica se il messaggio è stato l'ultimo messaggio inviato in una transazione.

Label

Ottiene o imposta una stringa Unicode definita dall'applicazione che descrive il messaggio.

LookupId

Introdotto in MSMQ 3.0. Ottiene l'identificatore di ricerca del messaggio.

MessageType

Ottiene il tipo di messaggio: Normal, Acknowledgment o Report.

Priority

Ottiene o imposta la priorità del messaggio, che determina la posizione del messaggio nella coda.

Recoverable

Ottiene o imposta un valore che indica che il recapito del messaggio è garantito anche nel caso di un malfunzionamento del computer o di un problema di rete.

ResponseQueue

Ottiene o imposta la coda che riceve i messaggi di risposta generati dall'applicazione.

SecurityContext

Ottiene o imposta il contesto per la sicurezza di un messaggio.

SenderCertificate

Ottiene o imposta il certificato di sicurezza usato per autenticare i messaggi.

SenderId

Ottiene l'identificatore del mittente.

SenderVersion

Ottiene la versione di Accodamento messaggi utilizzata per inviare il messaggio.

SentTime

Ottiene la data e l'ora sul computer mittente dell'invio del messaggio dal Gestore code di origine.

Site

Ottiene o imposta l'oggetto ISite di Component.

(Ereditato da Component)
SourceMachine

Ottiene informazioni sul computer in cui il messaggio ha avuto origine.

TimeToBeReceived

Ottiene o imposta il limite di tempo massimo per la ricezione del messaggio dalla coda di destinazione.

TimeToReachQueue

Ottiene o imposta il limite di tempo massimo impiegato dal messaggio per raggiungere la coda.

TransactionId

Ottiene l'identificatore per la transazione di cui fa parte il messaggio.

TransactionStatusQueue

Ottiene la coda di stato della transazione sul computer di origine.

UseAuthentication

Ottiene o imposta un valore che indica se il messaggio è stato autenticato o deve esserlo prima del suo invio.

UseDeadLetterQueue

Ottiene o imposta un valore che indica se una copia del messaggio non recapitato deve essere inviata a una coda dei messaggi non recapitabili.

UseEncryption

Ottiene o imposta un valore che indica se rendere privato il messaggio.

UseJournalQueue

Ottiene o imposta un valore che indica se è necessario inserire una copia del messaggio nel journal del computer di origine.

UseTracing

Ottiene o imposta un valore che indica se tenere traccia di un messaggio mentre procede verso la coda di destinazione.

Metodi

CreateObjRef(Type)

Consente di creare un oggetto che contiene tutte le informazioni rilevanti necessarie per la generazione del proxy utilizzato per effettuare la comunicazione con un oggetto remoto.

(Ereditato da MarshalByRefObject)
Dispose()

Rilascia tutte le risorse usate da Component.

(Ereditato da Component)
Dispose(Boolean)

Rilascia le risorse non gestite usate da Component e, facoltativamente, le risorse gestite.

(Ereditato da Component)
Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetLifetimeService()
Obsoleta.

Consente di recuperare l'oggetto servizio di durata corrente per controllare i criteri di durata per l'istanza.

(Ereditato da MarshalByRefObject)
GetService(Type)

Consente di restituire un oggetto che rappresenta un servizio fornito da Component o dal relativo Container.

(Ereditato da Component)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
InitializeLifetimeService()
Obsoleta.

Ottiene un oggetto servizio di durata per controllare i criteri di durata per questa istanza.

(Ereditato da MarshalByRefObject)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
MemberwiseClone(Boolean)

Crea una copia dei riferimenti dell'oggetto MarshalByRefObject corrente.

(Ereditato da MarshalByRefObject)
ToString()

Restituisce un oggetto String che contiene il nome dell'eventuale oggetto Component. Questo metodo non deve essere sottoposto a override.

(Ereditato da Component)

Eventi

Disposed

Si verifica quando il componente viene eliminato da una chiamata al metodo Dispose().

(Ereditato da Component)

Si applica a

Vedi anche