MessageQueue.DefaultPropertiesToSend プロパティ
アセンブリ: System.Messaging (system.messaging.dll 内)

Dim instance As MessageQueue Dim value As DefaultPropertiesToSend value = instance.DefaultPropertiesToSend instance.DefaultPropertiesToSend = value
public: property DefaultPropertiesToSend^ DefaultPropertiesToSend { DefaultPropertiesToSend^ get (); void set (DefaultPropertiesToSend^ value); }
/** @property */ public DefaultPropertiesToSend get_DefaultPropertiesToSend () /** @property */ public void set_DefaultPropertiesToSend (DefaultPropertiesToSend value)
public function get DefaultPropertiesToSend () : DefaultPropertiesToSend public function set DefaultPropertiesToSend (value : DefaultPropertiesToSend)
アプリケーションが Message インスタンス以外のオブジェクトをキューに送信するときに使用する既定のメッセージ キューのメッセージ プロパティ値を含む DefaultPropertiesToSend。


型が Message ではないオブジェクトをキューに送信する場合、MessageQueue はそのオブジェクトをメッセージ キューのメッセージに挿入します。そのときに、DefaultPropertiesToSend プロパティで指定したプロパティ値が MessageQueue によってメッセージに適用されます。これに対して、Message をキューに送信する場合、これらのプロパティは既にインスタンスそのものに指定されているため、Message では DefaultPropertiesToSend は無視されます。
プロパティは MessageQueue オブジェクトで設定しますが、DefaultPropertiesToSend はキューそのものではなく、キューに送信されるメッセージのプロパティを参照します。
AcknowledgeType | AcknowledgeType.None |
AdministrationQueue | null 参照 (Visual Basic では Nothing) |
AppSpecific | 0 |
AttachSenderId | |
EncryptionAlgorithm | EncryptionAlgorithm.RC2 |
HashAlgorithm | HashAlgorithm.MD5 |
空の文字列 ("") | |
MessagePriority.Normal | |
Recoverable | |
ResponseQueue | null 参照 (Visual Basic では Nothing) |
TimeToBeReceived | Message.InfiniteTimeout |
TimeToReachQueue | Message.InfiniteTimeout |
TransactionStatusQueue | null 参照 (Visual Basic では Nothing) |
UseAuthentication | |
UseDeadLetterQueue | |
UseEncryption | |
UseJournalQueue | |
UseTracing |
このプロパティが各種のワークグループ モードで使用できるかどうかを次の表に示します。

メッセージの優先順位を使用して、メッセージを送信するときの既定のプロパティを決定するコード例を次に示します。
Imports System Imports System.Messaging Public Class MyNewQueue ' Provides an entry point into the application. ' ' This example specifies different types of default ' properties for messages. Public Shared Sub Main() ' Create a new instance of the class. Dim myNewQueue As New MyNewQueue() ' Send normal and high priority messages. myNewQueue.SendNormalPriorityMessages() myNewQueue.SendHighPriorityMessages() Return End Sub 'Main ' Associates selected message property values ' with high priority messages. Public Sub SendHighPriorityMessages() ' Connect to a message queue. Dim myQueue As New MessageQueue(".\myQueue") ' Associate selected default property values with high ' priority messages. myQueue.DefaultPropertiesToSend.Priority = _ MessagePriority.High myQueue.DefaultPropertiesToSend.Label = _ "High Priority Message" myQueue.DefaultPropertiesToSend.Recoverable = True myQueue.DefaultPropertiesToSend.TimeToReachQueue = _ New TimeSpan(0, 0, 30) ' Send messages using these defaults. myQueue.Send("High priority message data 1.") myQueue.Send("High priority message data 2.") myQueue.Send("High priority message data 3.") Return End Sub 'SendHighPriorityMessages ' Associates selected message property values ' with normal priority messages. Public Sub SendNormalPriorityMessages() ' Connect to a message queue. Dim myQueue As New MessageQueue(".\myQueue") ' Associate selected default property values with normal ' priority messages. myQueue.DefaultPropertiesToSend.Priority = _ MessagePriority.Normal myQueue.DefaultPropertiesToSend.Label = _ "Normal Priority Message" myQueue.DefaultPropertiesToSend.Recoverable = False myQueue.DefaultPropertiesToSend.TimeToReachQueue = _ New TimeSpan(0, 2, 0) ' Send messages using these defaults. myQueue.Send("Normal priority message data 1.") myQueue.Send("Normal priority message data 2.") myQueue.Send("Normal priority message data 3.") Return End Sub 'SendNormalPriorityMessages End Class 'MyNewQueue
using System; using System.Messaging; namespace MyProject { /// <summary> /// Provides a container class for the example. /// </summary> public class MyNewQueue { //************************************************** // Provides an entry point into the application. // // This example specifies different types of default // properties for messages. //************************************************** public static void Main() { // Create a new instance of the class. MyNewQueue myNewQueue = new MyNewQueue(); // Send normal and high priority messages. myNewQueue.SendNormalPriorityMessages(); myNewQueue.SendHighPriorityMessages(); return; } //************************************************** // Associates selected message property values // with high priority messages. //************************************************** public void SendHighPriorityMessages() { // Connect to a message queue. MessageQueue myQueue = new MessageQueue(".\\myQueue"); // Associate selected default property values with high // priority messages. myQueue.DefaultPropertiesToSend.Priority = MessagePriority.High; myQueue.DefaultPropertiesToSend.Label = "High Priority Message"; myQueue.DefaultPropertiesToSend.Recoverable = true; myQueue.DefaultPropertiesToSend.TimeToReachQueue = new TimeSpan(0,0,30); // Send messages using these defaults. myQueue.Send("High priority message data 1."); myQueue.Send("High priority message data 2."); myQueue.Send("High priority message data 3."); return; } //************************************************** // Associates selected message property values // with normal priority messages. //************************************************** public void SendNormalPriorityMessages() { // Connect to a message queue. MessageQueue myQueue = new MessageQueue(".\\myQueue"); // Associate selected default property values with normal // priority messages. myQueue.DefaultPropertiesToSend.Priority = MessagePriority.Normal; myQueue.DefaultPropertiesToSend.Label = "Normal Priority Message"; myQueue.DefaultPropertiesToSend.Recoverable = false; myQueue.DefaultPropertiesToSend.TimeToReachQueue = new TimeSpan(0,2,0); // Send messages using these defaults. myQueue.Send("Normal priority message data 1."); myQueue.Send("Normal priority message data 2."); myQueue.Send("Normal priority message data 3."); return; } } }
#using <system.dll> #using <system.messaging.dll> using namespace System; using namespace System::Messaging; ref class MyNewQueue { public: // Associates selected message property values // with high priority messages. void SendHighPriorityMessages() { // Connect to a message queue. MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" ); // Associate selected default property values with high // priority messages. myQueue->DefaultPropertiesToSend->Priority = MessagePriority::High; myQueue->DefaultPropertiesToSend->Label = "High Priority Message"; myQueue->DefaultPropertiesToSend->Recoverable = true; myQueue->DefaultPropertiesToSend->TimeToReachQueue = TimeSpan(0,0,30); // Send messages using these defaults. myQueue->Send( "High priority message data 1." ); myQueue->Send( "High priority message data 2." ); myQueue->Send( "High priority message data 3." ); return; } // Associates selected message property values // with normal priority messages. void SendNormalPriorityMessages() { // Connect to a message queue. MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" ); // Associate selected default property values with normal // priority messages. myQueue->DefaultPropertiesToSend->Priority = MessagePriority::Normal; myQueue->DefaultPropertiesToSend->Label = "Normal Priority Message"; myQueue->DefaultPropertiesToSend->Recoverable = false; myQueue->DefaultPropertiesToSend->TimeToReachQueue = TimeSpan(0,2,0); // Send messages using these defaults. myQueue->Send( "Normal priority message data 1." ); myQueue->Send( "Normal priority message data 2." ); myQueue->Send( "Normal priority message data 3." ); return; } }; // Provides an entry point into the application. // This example specifies different types of default // properties for messages. int main() { // Create a new instance of the class. MyNewQueue^ myNewQueue = gcnew MyNewQueue; // Send normal and high priority messages. myNewQueue->SendNormalPriorityMessages(); myNewQueue->SendHighPriorityMessages(); return 0; }
package MyProject; import System.*; import System.Messaging.*; /// <summary> /// Provides a container class for the example. /// </summary> public class MyNewQueue { //************************************************** // Provides an entry point into the application. // // This example specifies different types of default // properties for messages. //************************************************** public static void main(String[] args) { // Create a new instance of the class. MyNewQueue myNewQueue = new MyNewQueue(); // Send normal and high priority messages. myNewQueue.SendNormalPriorityMessages(); myNewQueue.SendHighPriorityMessages(); return; } //main //************************************************** // Associates selected message property values // with high priority messages. //************************************************** public void SendHighPriorityMessages() { // Connect to a message queue. MessageQueue myQueue = new MessageQueue(".\\myQueue"); // Associate selected default property values with high // priority messages. myQueue.get_DefaultPropertiesToSend(). set_Priority(MessagePriority.High); myQueue.get_DefaultPropertiesToSend(). set_Label("High Priority Message"); myQueue.get_DefaultPropertiesToSend(). set_Recoverable(true); myQueue.get_DefaultPropertiesToSend(). set_TimeToReachQueue(new TimeSpan(0, 0, 30)); // Send messages using these defaults. myQueue.Send("High priority message data 1."); myQueue.Send("High priority message data 2."); myQueue.Send("High priority message data 3."); return; } //SendHighPriorityMessages //************************************************** // Associates selected message property values // with normal priority messages. //************************************************** public void SendNormalPriorityMessages() { // Connect to a message queue. MessageQueue myQueue = new MessageQueue(".\\myQueue"); // Associate selected default property values with normal // priority messages. myQueue.get_DefaultPropertiesToSend(). set_Priority(MessagePriority.Normal); myQueue.get_DefaultPropertiesToSend(). set_Label("Normal Priority Message"); myQueue.get_DefaultPropertiesToSend(). set_Recoverable(false); myQueue.get_DefaultPropertiesToSend(). set_TimeToReachQueue(new TimeSpan(0, 2, 0)); // Send messages using these defaults. myQueue.Send("Normal priority message data 1."); myQueue.Send("Normal priority message data 2."); myQueue.Send("Normal priority message data 3."); return; } //SendNormalPriorityMessages } //MyNewQueue


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


MessageQueue クラス
MessageQueue メンバ
System.Messaging 名前空間
Message クラス
AcknowledgeTypes 列挙体
EncryptionAlgorithm 列挙体
HashAlgorithm 列挙体
InfiniteTimeout
Weblioに収録されているすべての辞書からMessageQueue.DefaultPropertiesToSend プロパティを検索する場合は、下記のリンクをクリックしてください。

- MessageQueue.DefaultPropertiesToSend プロパティのページへのリンク