Example #1
0
        internal static bool GetExists(this PipeName pipeName)
        {
            if (pipeName.IsLocal())
            {
                string msmqPath = pipeName.GetMSMQPath();
                return(MessageQueue.Exists(msmqPath));
            }

            string myMSMQFormatName = pipeName.GetMSMQDirectName();

            MessageQueue[] queueList = MessageQueue.GetPrivateQueuesByMachine(pipeName.MachineName);
            return(queueList.Select(messageQueue => messageQueue.FormatName).Any(curMSMQFormatName => String.Compare(myMSMQFormatName, curMSMQFormatName, true) == 0));
        }
Example #2
0
 internal static string GetMSMQDirectName(this PipeName pipeName)
 {
     return(DirectNamePrefix + pipeName.GetMSMQPath());
 }