示例#1
0
        private static void Main(string[] args)
        {
            var client = new SystemServiceClient();

            try
            {
                var response = new GetAllTaskControllersResponse();

                client.GetAllTaskControllers(new MetaRequest(), new GetAllTaskControllersRequest(), out response);

                foreach (var muleTask in response.TaskControllers)
                {
                    if (!muleTask.IsOnlinek__BackingField || muleTask.IsSuspendedk__BackingField)
                    {
                        SendEmailToUsers(muleTask);
                        break;
                    }
                }
            }
            catch (Exception)
            {
                SendNotificationEmail(
                    string.Format(
                        "Unable to reach Turniverse mule server: {0}, please check and restart all three mule services.",
                        client.Endpoint.ListenUri));
            }
        }