Result object for asynchronous test service response.
        /// <summary>
        /// Read the run parameters.
        /// </summary>
        /// <param name="result">The service result.</param>
        private void ReadRunParameters(ServiceResult result)
        {
            SimpleXElement xe = result == null ? null : result.TryGetElement();
            if (xe != null)
            {
                Dictionary<string, string> settings = xe.Descendants("option").ToTransformedDictionary((option) => option.Attribute("name"), (option) => option.Attribute("value"));
                foreach (string key in settings.Keys)
                {
                    Settings[key] = settings[key];
                }
            }

            // Allow the other services to initialize
            base.Initialize();
        }
 /// <summary>
 /// Performs a callback.  Null action and/or result are permitted.
 /// </summary>
 /// <param name="action">The optional callback action.</param>
 /// <param name="result">The result to pass back.</param>
 protected static void Callback(Action<ServiceResult> action, ServiceResult result)
 {
     if (action != null)
     {
         action(result);
     }
 }