Message Klasa

Definicja

Zapewnia dostęp do właściwości wymaganych do zdefiniowania komunikatu kolejkowania komunikatów.

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

Przykłady

W poniższym przykładzie kodu pokazano formatowanie treści komunikatu przy użyciu polecenia 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

W poniższym przykładzie kodu pokazano formatowanie treści komunikatu przy użyciu polecenia 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

Uwagi

Message Użyj klasy, aby wyświetlić lub odbierać komunikaty z kolejki lub mieć precyzyjną kontrolę nad właściwościami komunikatów podczas wysyłania komunikatu do kolejki.

MessageQueueMessage używa klasy, gdy podgląda lub odbiera komunikaty z kolejek, ponieważ obie MessageQueue.Peek metody i MessageQueue.Receive tworzą nowe wystąpienie Message klasy i ustawiają właściwości wystąpienia. Message Właściwości tylko do odczytu klasy mają zastosowanie do pobierania komunikatów z kolejki, podczas gdy właściwości odczytu/zapisu mają zastosowanie do wysyłania i pobierania komunikatów. Gdy MessageQueue zobaczysz lub odbierze komunikat z kolejki, jego MessageReadPropertyFilter właściwość określa, które właściwości komunikatu są pobierane.

MessageQueue Metoda klasy Send umożliwia określenie dowolnego typu obiektu dla komunikatu wysyłanego do tej kolejki. Za pomocą MessageQueue właściwości wystąpienia DefaultPropertiesToSend można określić ustawienia komunikatów ogólnych wysyłanych do kolejki. Typy ustawień obejmują formatator, etykietę, szyfrowanie i uwierzytelnianie. Możesz również określić wartości odpowiednich DefaultPropertiesToSend członków podczas koordynowania aplikacji do obsługi komunikatów w celu reagowania na potwierdzenia i komunikaty raportów. Message Użycie wystąpienia do wysłania komunikatu do kolejki zapewnia elastyczność dostępu i modyfikowania wielu z tych właściwości — zarówno dla pojedynczego komunikatu, jak i komunikatu. Messagewłaściwości mają pierwszeństwo przed .DefaultPropertiesToSend

Dane komunikatów Body są przechowywane we właściwości i w mniejszym stopniu AppSpecific właściwości i Extension . Gdy dane wiadomości są szyfrowane, serializowane lub deserializowane, dotyczy to tylko zawartości Body właściwości.

Zawartość Body właściwości jest serializowana po wysłaniu komunikatu Formatter przy użyciu określonej właściwości. Zawartość serializowana znajduje się we BodyStream właściwości . Możesz również ustawić BodyStream właściwość bezpośrednio, na przykład, aby wysłać plik jako zawartość danych wiadomości. Właściwości lub Formatter można zmienić Body w dowolnym momencie przed wysłaniem wiadomości, a dane będą serializowane odpowiednio podczas wywoływania metody Send.

Właściwości zdefiniowane przez MessageQueue.DefaultPropertiesToSend właściwość mają zastosowanie tylko do komunikatów, które nie są typu Message. Jeśli określisz DefaultPropertiesToSend właściwość obiektu MessageQueue, identyczne nazwane właściwości w wystąpieniu wysłanym Message do tej kolejki powodują ignorowanie tych właściwości domyślnych.

Aby uzyskać listę początkowych wartości właściwości dla wystąpienia programu Message, zobacz Message konstruktor.

Konstruktory

Message()

Inicjuje Message nowe wystąpienie klasy z pustą treścią.

Message(Object)

Inicjuje nowe wystąpienie Message klasy, używając klasy XmlMessageFormatter , aby serializować określony obiekt w treści komunikatu.

Message(Object, IMessageFormatter)

Inicjuje Message nowe wystąpienie klasy przy użyciu określonego formatatora w celu serializacji określonego obiektu w treści komunikatu.

Pola

InfiniteTimeout

Określa, że nie ma limitu czasu.

Właściwości

AcknowledgeType

Pobiera lub ustawia typ komunikatu potwierdzenia, który ma zostać zwrócony do aplikacji wysyłającej.

Acknowledgment

Pobiera klasyfikację potwierdzenia, że ten komunikat reprezentuje.

AdministrationQueue

Pobiera lub ustawia kolejkę, która odbiera komunikaty potwierdzenia generowane przez kolejkę komunikatów.

AppSpecific

Pobiera lub ustawia dodatkowe informacje specyficzne dla aplikacji.

ArrivedTime

Pobiera czas przybycia komunikatu do kolejki docelowej.

AttachSenderId

Pobiera lub ustawia wartość wskazującą, czy identyfikator nadawcy powinien być dołączony do wiadomości.

Authenticated

Pobiera wartość wskazującą, czy wiadomość została uwierzytelniona.

AuthenticationProviderName

Pobiera lub ustawia nazwę dostawcy kryptograficznego używanego do generowania podpisu cyfrowego wiadomości.

AuthenticationProviderType

Pobiera lub ustawia typ dostawcy kryptograficznego używanego do generowania podpisu cyfrowego wiadomości.

Body

Pobiera lub ustawia zawartość wiadomości.

BodyStream

Pobiera lub ustawia informacje w treści wiadomości.

BodyType

Pobiera lub ustawia typ danych, które zawiera treść komunikatu.

CanRaiseEvents

Pobiera wartość wskazującą, czy składnik może zgłosić zdarzenie.

(Odziedziczone po Component)
ConnectorType

Pobiera lub ustawia wartość wskazującą, że niektóre właściwości komunikatu zazwyczaj ustawione przez kolejkowanie komunikatów zostały ustawione przez aplikację wysyłającą.

Container

Pobiera element IContainer zawierający element Component.

(Odziedziczone po Component)
CorrelationId

Pobiera lub ustawia identyfikator komunikatu używany przez komunikaty potwierdzenia, raportu i odpowiedzi, aby odwoływać się do oryginalnego komunikatu.

DesignMode

Pobiera wartość wskazującą, czy Component element jest obecnie w trybie projektowania.

(Odziedziczone po Component)
DestinationQueue

Pobiera docelową kolejkę komunikatu.

DestinationSymmetricKey

Pobiera lub ustawia klucz symetryczny używany do szyfrowania komunikatów lub komunikatów zaszyfrowanych przez aplikację wysyłanych do obcych kolejek.

DigitalSignature

Pobiera lub ustawia podpis cyfrowy używany przez kolejkowanie komunikatów do uwierzytelniania wiadomości.

EncryptionAlgorithm

Pobiera lub ustawia algorytm szyfrowania używany do szyfrowania treści wiadomości prywatnej.

Events

Pobiera listę programów obsługi zdarzeń dołączonych do tego Componentelementu .

(Odziedziczone po Component)
Extension

Pobiera lub ustawia dodatkowe informacje zdefiniowane przez aplikację skojarzone z komunikatem.

Formatter

Pobiera lub ustawia formater używany do serializacji obiektu do lub deserializacji obiektu z treści komunikatu.

HashAlgorithm

Pobiera lub ustawia algorytm wyznaczania wartości skrótu używany przez usługę Kolejkowanie komunikatów podczas uwierzytelniania komunikatu lub tworzenia podpisu cyfrowego dla komunikatu.

Id

Pobiera identyfikator komunikatu.

IsFirstInTransaction

Pobiera wartość wskazującą, czy komunikat był pierwszym komunikatem wysłanym w transakcji.

IsLastInTransaction

Pobiera wartość wskazującą, czy komunikat był ostatnią wiadomością wysłaną w transakcji.

Label

Pobiera lub ustawia zdefiniowany przez aplikację ciąg Unicode opisujący komunikat.

LookupId

Wprowadzono w programie MSMQ 3.0. Pobiera identyfikator odnośnika komunikatu.

MessageType

Pobiera typ komunikatu: Normal, Acknowledgmentlub Report.

Priority

Pobiera lub ustawia priorytet komunikatu, który określa, gdzie w kolejce znajduje się komunikat.

Recoverable

Pobiera lub ustawia wartość wskazującą, czy komunikat ma zostać dostarczony w przypadku awarii komputera, czy problemu z siecią.

ResponseQueue

Pobiera lub ustawia kolejkę, która odbiera komunikaty odpowiedzi generowane przez aplikację.

SecurityContext

Pobiera lub ustawia kontekst zabezpieczeń dla komunikatu.

SenderCertificate

Pobiera lub ustawia certyfikat zabezpieczeń używany do uwierzytelniania komunikatów.

SenderId

Pobiera identyfikator wysyłającego użytkownika.

SenderVersion

Pobiera wersję kolejkowania komunikatów używaną do wysyłania komunikatu.

SentTime

Pobiera datę i godzinę na komputerze wysyłającym, że wiadomość została wysłana przez menedżera kolejki źródłowej.

Site

Pobiera lub ustawia ISite element .Component

(Odziedziczone po Component)
SourceMachine

Pobiera komputer, z którego pochodzi komunikat.

TimeToBeReceived

Pobiera lub ustawia maksymalny czas odbierania komunikatu z kolejki docelowej.

TimeToReachQueue

Pobiera lub ustawia maksymalny czas dotarcia do kolejki przez komunikat.

TransactionId

Pobiera identyfikator transakcji, której część była komunikatem.

TransactionStatusQueue

Pobiera kolejkę stanu transakcji na komputerze źródłowym.

UseAuthentication

Pobiera lub ustawia wartość wskazującą, czy wiadomość została (lub musi) zostać uwierzytelniona przed wysłaniem.

UseDeadLetterQueue

Pobiera lub ustawia wartość wskazującą, czy kopia komunikatu, którego nie można dostarczyć, powinna zostać wysłana do kolejki utraconych wiadomości.

UseEncryption

Pobiera lub ustawia wartość wskazującą, czy wiadomość ma być prywatna.

UseJournalQueue

Pobiera lub ustawia wartość wskazującą, czy kopia komunikatu powinna być przechowywana w dzienniku maszynowym na komputerze źródłowym.

UseTracing

Pobiera lub ustawia wartość wskazującą, czy śledzić komunikat w miarę przemieszczania się do kolejki docelowej.

Metody

CreateObjRef(Type)

Tworzy obiekt zawierający wszystkie istotne informacje wymagane do wygenerowania serwera proxy używanego do komunikowania się z obiektem zdalnym.

(Odziedziczone po MarshalByRefObject)
Dispose()

Zwalnia wszelkie zasoby używane przez element Component.

(Odziedziczone po Component)
Dispose(Boolean)

Zwalnia zasoby niezarządzane używane przez element Component i opcjonalnie zwalnia zasoby zarządzane.

(Odziedziczone po Component)
Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetLifetimeService()
Nieaktualne.

Pobiera bieżący obiekt usługi okresu istnienia, który kontroluje zasady okresu istnienia dla tego wystąpienia.

(Odziedziczone po MarshalByRefObject)
GetService(Type)

Zwraca obiekt reprezentujący usługę dostarczaną przez Component obiekt lub przez obiekt Container.

(Odziedziczone po Component)
GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
InitializeLifetimeService()
Nieaktualne.

Uzyskuje obiekt usługi okresu istnienia w celu kontrolowania zasad okresu istnienia dla tego wystąpienia.

(Odziedziczone po MarshalByRefObject)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
MemberwiseClone(Boolean)

Tworzy płytkią kopię bieżącego MarshalByRefObject obiektu.

(Odziedziczone po MarshalByRefObject)
ToString()

Zwraca wartość String zawierającą nazwę Componentobiektu , jeśli istnieje. Ta metoda nie powinna być zastępowana.

(Odziedziczone po Component)

Zdarzenia

Disposed

Występuje, gdy składnik jest usuwany przez wywołanie Dispose() metody .

(Odziedziczone po Component)

Dotyczy

Zobacz też