Ejemplo n.º 1
0
        /// <summary> 运行Cmd命令 </summary>
        public string ExecuteCmdOutPut(string cmdString)
        {
            using (ChannelFactory <IExcuteService> channelFactory = new ChannelFactory <IExcuteService>(WSHttpBinding, ExcuteServiceAddress))
            {
                IExcuteService proxy = channelFactory.CreateChannel();

                return(proxy.ExecuteCmdOutPut(cmdString));
            }
        }
Ejemplo n.º 2
0
        /// <summary> 运行Cmd命令 </summary>
        public void ExecuteCmd(string cmdString)
        {
            using (ChannelFactory <IExcuteService> channelFactory = new ChannelFactory <IExcuteService>(WSHttpBinding, ExcuteServiceAddress))
            {
                IExcuteService proxy = channelFactory.CreateChannel();

                proxy.ExecuteCmd(cmdString);
            }
        }