Exemplo n.º 1
0
        /// <summary>
        /// Deletes a single imposter from mountebank. Will also remove the imposter from the collection
        /// of imposters that the client maintains.
        /// </summary>
        /// <param name="port">The port number of the imposter to be removed</param>
        public void DeleteImposter(int port)
        {
            var imposter = Imposters.FirstOrDefault(imp => imp.Port == port);

            if (imposter != null)
            {
                _requestProxy.DeleteImposter(port);
                Imposters.Remove(imposter);
            }
        }