internal WsQueueManager(MQQueueManager ibmQm, WsConnectionProperties properties)
 {
     Debug.Assert(ibmQm != null);
     IbmQueueManager      = ibmQm;
     ConnectionProperties = properties;
     _messageAgent        = new WsMessageAgent(ibmQm);
     GC.SuppressFinalize(this);
 }
        private IQueueManager ConnectCore(string name = null, WsConnectionProperties properties = null)
        {
            if (name == null)
            {
                var ibmLocalQM = new MQQueueManager();
                return(new WsQueueManager(ibmLocalQM, WsConnectionProperties.Default));
            }

            if (properties == null || properties.IsLocal)
            {
                var ibmLocalQM = new MQQueueManager(name);
                return(new WsQueueManager(ibmLocalQM, WsConnectionProperties.Default));
            }

            var coreProperties  = properties.CoreData;
            var ibmQueueManager = new MQQueueManager(name, coreProperties);

            return(new WsQueueManager(ibmQueueManager, properties));
        }