码迷,mamicode.com
首页 > 其他好文 > 详细

WCF 删除队列

时间:2014-10-29 12:51:08      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   for   sp   div   on   

Configuration config = ConfigurationManager.OpenExeConfiguration
                (ConfigurationUserLevel.None);
            ServiceModelSectionGroup  group=ServiceModelSectionGroup.GetSectionGroup(config);
            foreach(ChannelEndpointElement endPoint in group.Client.Endpoints )
            {
                if (endPoint.Binding == "netMsmqBinding")
                {
                    string queuename = GetQueueFromUri(endPoint.Address);
                    if (MessageQueue.Exists(queuename) == false)
                    {
                        MessageQueue queue = new MessageQueue(queuename);
                        queue.Purge();
                    }
                }
            }

bubuko.com,布布扣

WCF 删除队列

标签:style   blog   http   io   color   for   sp   div   on   

原文地址:http://www.cnblogs.com/running-mydream/p/4059072.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!