getJSON() public abstract method

public abstract getJSON ( ) : string
return string
        public void Write(CollectableValue value)
        {
            // This Write Plugin only knows about metrics
            if (!(value is MetricValue))
                return;

            string payload = "[" + value.getJSON() + "]";
            Logger.Debug("WriteHTTPPlugin: {0}", payload);

            string result = "";
            using (var client = new WebClient())
            {
                client.Headers[HttpRequestHeader.ContentType] = "application/json";
                result = client.UploadString(_url, "POST", payload);
            }
            Logger.Debug("response: {0}", result);
        }
Beispiel #2
0
        public void Write(CollectableValue value)
        {
            // This Write Plugin only knows about metrics
            if (!(value is MetricValue))
            {
                return;
            }

            string payload = "[" + value.getJSON() + "]";

            Logger.Debug("WriteHTTPPlugin: {0}", payload);

            string result = "";

            using (var client = new WebClient())
            {
                client.Headers[HttpRequestHeader.ContentType] = "application/json";
                result = client.UploadString(_url, "POST", payload);
            }
            Logger.Debug("response: {0}", result);
        }
 public void Write(CollectableValue value)
 {
     Console.WriteLine("ConsolePlugin: {0}", value.getJSON());
 }
 public void Write(CollectableValue value)
 {
     Console.WriteLine("ConsolePlugin: {0}", value.getJSON());
 }