MessageQueuePermissionEntry.MachineName プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
メッセージ キューのアクセス許可エントリの MachineName プロパティの値を表示するコード例を次に示します。
// Connect to a queue on the local computer. MessageQueue queue = new MessageQueue(".\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry. MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry( MessageQueuePermissionAccess.Receive, queue.MachineName, queue.Label, queue.Category.ToString());
// Display the value of the entry's MachineName property. Console.WriteLine("MachineName: {0}", entry.MachineName);
// Connect to a queue on the local computer. MessageQueue^ queue = gcnew MessageQueue(".\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry. MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry( MessageQueuePermissionAccess::Receive, queue->MachineName, queue->Label, queue->Category.ToString());
// Display the value of the entry's MachineName property. Console::WriteLine("MachineName: {0}", entry->MachineName);
// Connect to a queue on the local computer. MessageQueue queue = new MessageQueue(".\exampleQueue"); // Create a new instance of MessageQueuePermissionEntry. MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(MessageQueuePermissionAccess.Receive , queue.get_MachineName(), queue.get_Label(), queue.get_Category().ToString()); // Display the value of the entry's MachineName property. Console.WriteLine("MachineName: {0}", entry.get_MachineName());