MessageQueueCriteria.MachineName 属性
定义
获取或设置作为网络中队列的筛选依据的计算机名。Gets or sets the computer name by which to filter queues in the network.
public:
property System::String ^ MachineName { System::String ^ get(); void set(System::String ^ value); };
public string MachineName { get; set; }
member this.MachineName : string with get, set
Public Property MachineName As String
属性值
队列驻留的计算机的服务器名称。The server name of the computer on which the queues reside.
例外
应用程序在读取 MachineName 属性前未设置该属性。The application did not set the MachineName property before reading it.
- 或 --or- 计算机名语法无效。The computer name syntax is invalid.
注解
消息队列反映了 MachineName 队列所驻留的服务器的名称,但没有前面的反斜杠 (\ \) 。A message queue's MachineName reflects the name of the server on which the queue resides, without preceding backslashes (\\).
如果在网络上搜索队列时只按计算机名进行筛选,则可以使用 GetPublicQueuesByMachine 专门为此目的而设计的方法。If you are filtering only by computer name when searching the queues on the network, you can use the method GetPublicQueuesByMachine, which is specifically designed for this purpose. 如果要按包含计算机名称的多个条件进行搜索,请设置此 MachineName 属性,并将参数传递给 GetPublicQueues 。If you are searching by multiple criteria that include the computer name, set this MachineName property and pass the parameter into GetPublicQueues.
还可以通过在方法中指定计算机名称,在网络上搜索专用队列 GetPrivateQueuesByMachine 。You can also search for private queues on the network by specifying a computer name in the GetPrivateQueuesByMachine method.