Esempio n. 1
0
 /// <summary>
 /// Handles the VarzRequested event of the httpMonitoringServer control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Uhuru.Utilities.VarzRequestEventArgs"/> instance containing the event data.</param>
 private void HttpMonitoringServer_VarzRequested(object sender, VarzRequestEventArgs e)
 {
     this.UpdateVarz();
     e.VarzMessage = JsonConvertibleObject.SerializeToJson(this.Varz);
 }
        /// <summary>
        /// Triggers the VarzRequested event.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="CloudFoundry.Utilities.VarzRequestEventArgs"/> instance containing the event data.</param>
        /// <returns>A string containing the requested message.</returns>
        private string TriggerVarz(object sender, VarzRequestEventArgs e)
        {
            if (this.VarzRequested != null)
            {
                this.VarzRequested(sender, e);
            }

            if (e != null)
            {
                return e.VarzMessage;
            }
            else
            {
                return string.Empty;
            }
        }