Beispiel #1
0
        public void Dispose()
        {
            if (slaveClientLazy != null)
            {
                slaveClientLazy.InputProtocol.Transport.Close();
                slaveClientLazy = null;
            }

            if (masterClientLazy != null)
            {
                masterClientLazy.InputProtocol.Transport.Close();
                masterClientLazy = null;
            }
        }
Beispiel #2
0
        public void Dispose()
        {
            if (slaveClientLazy != null)
            {
                slaveClientLazy.InputProtocol.Transport.Close();
                slaveClientLazy = null;
            }

            if (masterClientLazy != null)
            {
                masterClientLazy.InputProtocol.Transport.Close();
                masterClientLazy = null;
            }
        }
Beispiel #3
0
        public VMToolMaster.Client GetMasterClient()
        {
            CheckProfileHasMaster();
            CheckProfileHasVM();

            if (masterClientLazy == null)
            {
                if (profile.Master == null)
                {
                    throw new InvalidOperationException("Missing master hostname in profile.");
                }

                Log(string.Format("Connecting to master server '{0}:{1}'.", profile.Master, profile.MasterPort));

                TTransport transport = OpenTransport(profile.Master, profile.MasterPort);
                TProtocol  protocol  = new TBinaryProtocol(transport);
                masterClientLazy = new VMToolMaster.Client(protocol);
            }

            return(masterClientLazy);
        }
Beispiel #4
0
        public VMToolMaster.Client GetMasterClient()
        {
            CheckProfileHasMaster();
            CheckProfileHasVM();

            if (masterClientLazy == null)
            {
                if (profile.Master == null)
                    throw new InvalidOperationException("Missing master hostname in profile.");

                Log(string.Format("Connecting to master server '{0}:{1}'.", profile.Master, profile.MasterPort));

                TTransport transport = OpenTransport(profile.Master, profile.MasterPort);
                TProtocol protocol = new TBinaryProtocol(transport);
                masterClientLazy = new VMToolMaster.Client(protocol);
            }

            return masterClientLazy;
        }