Message 類別

定義

提供定義訊息佇列訊息所需屬性的存取。

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

範例

下列程式碼範例示範如何使用 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

下列程式碼範例示範如何使用 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

備註

使用 類別 Message 來查看或接收來自佇列的訊息,或在將訊息傳送至佇列時,對訊息屬性有細微的控制。

MessageQueueMessage在查看或接收來自佇列的訊息時,會使用 類別,因為 MessageQueue.PeekMessageQueue.Receive 方法都會建立 類別的新實例 Message ,並設定實例的屬性。 類別 Message 的唯讀屬性會套用至從佇列擷取訊息,而讀取/寫入屬性則套用至傳送和擷取訊息。 從佇列查看或接收訊息時 MessageQueue ,其 MessageReadPropertyFilter 屬性會決定擷取訊息的屬性。

類別 MessageQueueSend 方法可讓您為傳送至該佇列的訊息指定任何物件類型。 您可以使用 MessageQueue 實例的 屬性來指定傳送至佇列的 DefaultPropertiesToSend 一般訊息設定。 設定的類型包括格式器、標籤、加密和驗證。 當您協調傳訊應用程式以回應通知和報告訊息時,您也可以指定適當 DefaultPropertiesToSend 成員的值。 Message使用 實例將訊息傳送至佇列,可讓您彈性地存取和修改其中許多屬性,無論是針對單一訊息或逐一訊息。 Message 屬性的優先順序高於 DefaultPropertiesToSend

訊息資料會儲存在 Body 屬性中,且範圍較小, AppSpecific 以及 和 Extension 屬性。 當訊息資料經過加密、序列化或還原序列化時,只會影響屬性的內容 Body

傳送訊息時,會使用 Formatter 您指定的 屬性來序列化屬性的內容 Body 。 在 屬性中找到 BodyStream 序列化的內容。 例如,您也可以直接設定 BodyStream 屬性,將檔案傳送為訊息的資料內容。 您可以在傳送訊息之前隨時變更 BodyFormatter 屬性,而且當您呼叫 Send 時,資料會適當地序列化。

屬性所 MessageQueue.DefaultPropertiesToSend 定義的屬性只適用于不是 類型的 Message 訊息。 如果您為 指定 DefaultPropertiesToSend 屬性 MessageQueue ,則傳送至該佇列之 實例中的 Message 相同具名屬性會導致忽略這些預設屬性。

如需 實例 Message 的初始屬性值清單,請參閱 建 Message 構函式。

建構函式

Message()

初始化包含空主體之 Message 類別的新執行個體。

Message(Object)

使用 Message 將指定物件序列化到訊息主體中,以初始化 XmlMessageFormatter 類別的新執行個體。

Message(Object, IMessageFormatter)

使用指定的格式子將指定物件序列化至訊息主體,初始化 Message 類別的新執行個體。

欄位

InfiniteTimeout

指定沒有逾時。

屬性

AcknowledgeType

取得或設定要傳回至負責傳送之應用程式的認可訊息類型。

Acknowledgment

取得這個訊息所表示的認可分類。

AdministrationQueue

取得或設定接收訊息佇列產生之認可訊息的佇列。

AppSpecific

取得或設定額外的應用程式特定資訊。

ArrivedTime

取得訊息到達目的端佇列的時間。

AttachSenderId

取得或設定值,指出是否應該將傳送者識別碼附加至訊息。

Authenticated

取得指出訊息是否已驗證的值。

AuthenticationProviderName

取得或設定用來產生訊息之數位簽章的密碼編譯提供者名稱。

AuthenticationProviderType

取得或設定用來產生訊息之數位簽章的密碼編譯提供者類型。

Body

取得或設定訊息的內容。

BodyStream

取得或設定訊息主體中的資訊。

BodyType

取得或設定訊息本文包含的資料類型。

CanRaiseEvents

取得值,指出元件是否能引發事件。

(繼承來源 Component)
ConnectorType

取得或設定值,指出通常由訊息佇列設定的一些訊息屬性已由負責傳送的應用程式設定。

Container

取得包含 IContainerComponent

(繼承來源 Component)
CorrelationId

取得或設定認可、報告和回應訊息用來參考原始訊息的訊息識別項。

DesignMode

取得值,指出 Component 目前是否處於設計模式。

(繼承來源 Component)
DestinationQueue

取得訊息要使用的目的端佇列。

DestinationSymmetricKey

取得或設定用來為應用程式加密訊息或傳送至外部佇列的訊息加密的對稱金鑰。

DigitalSignature

取得或設定訊息佇列用來驗證訊息的數位簽章。

EncryptionAlgorithm

取得或設定用來加密私用訊息主體的加密演算法。

Events

取得附加在這個 Component 上的事件處理常式清單。

(繼承來源 Component)
Extension

取得或設定與訊息關聯的其他應用程式定義資訊。

Formatter

取得或設定用來將物件序列化成訊息主體,或者從訊息主體將物件還原序列化的格式子。

HashAlgorithm

取得或設定訊息佇列驗證訊息或為訊息建立數位簽章時使用的雜湊演算法。

Id

取得訊息的識別項。

IsFirstInTransaction

取得值,指出訊息是否為交易中最先傳送的訊息。

IsLastInTransaction

取得值,指出訊息是否為交易中最後傳送的訊息。

Label

取得或設定應用程式定義的 Unicode 字串,這個字串會描述訊息。

LookupId

在 MSMQ 3.0 中介紹。 取得訊息的查詢識別項。

MessageType

取得訊息類型:NormalAcknowledgmentReport

Priority

取得或設定訊息的優先權,用來決定訊息放置在佇列中的位置。

Recoverable

取得或設定值,指出當發生電腦故障或網路問題時是否保證傳遞訊息。

ResponseQueue

取得或設定接收應用程式產生的回應訊息的佇列。

SecurityContext

取得或設定訊息的安全性內容。

SenderCertificate

取得或設定用來驗證訊息的安全憑證。

SenderId

取得傳送使用者的識別項。

SenderVersion

取得用來傳送訊息的訊息佇列版本。

SentTime

取得來源佇列管理員傳送訊息時傳送電腦上的日期和時間。

Site

取得或設定 ComponentISite

(繼承來源 Component)
SourceMachine

取得發出訊息的電腦。

TimeToBeReceived

取得或設定要從目的端佇列擷取訊息的最長時間。

TimeToReachQueue

取得或設定訊息抵達佇列的最大時間量。

TransactionId

取得訊息所屬交易的識別項。

TransactionStatusQueue

取得來源電腦上的異動狀態佇列。

UseAuthentication

取得或設定值,指出訊息在傳送之前是否已經 (或必須) 驗證。

UseDeadLetterQueue

取得或設定值,指出是否應該將無法傳遞的訊息複本傳送至無法投遞的信件佇列。

UseEncryption

取得或設定值,指出是否將訊息設成私用。

UseJournalQueue

取得或設定值,指出訊息複本是否應保留在原始電腦上的電腦日誌中。

UseTracing

取得或設定值,指出當訊息向其目的佇列移動時是否要追蹤訊息。

方法

CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。

(繼承來源 MarshalByRefObject)
Dispose()

釋放 Component 所使用的所有資源。

(繼承來源 Component)
Dispose(Boolean)

釋放 Component 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

(繼承來源 Component)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetLifetimeService()
已過時。

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。

(繼承來源 MarshalByRefObject)
GetService(Type)

傳回表示 Component 或其 Container 所提供之服務的物件。

(繼承來源 Component)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
InitializeLifetimeService()
已過時。

取得存留期服務物件,以控制這個執行個體的存留期原則。

(繼承來源 MarshalByRefObject)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。

(繼承來源 MarshalByRefObject)
ToString()

傳回任何包含 Component 名稱的 String。 不應覆寫此方法。

(繼承來源 Component)

事件

Disposed

Dispose() 方法的呼叫處置元件時,就會發生。

(繼承來源 Component)

適用於

另請參閱