示例#1
0
        /// <summary>
        /// Remove an existing project
        /// </summary>
        private static void RemoveProcess()
        {
            string processName = "My New Process";

            var processes = ProcessHttpClient.GetListOfProcessesAsync().Result;

            var processToRemoveId = (from p in processes where p.Name == processName select p.TypeId).FirstOrDefault();

            if (processToRemoveId != null)
            {
                ProcessHttpClient.DeleteProcessByIdAsync(processToRemoveId).Wait();

                Console.WriteLine("Done");
            }
            else
            {
                Console.WriteLine("Can not find project to remove");
            }
        }