dotnet plugin: Export "dispatch_values" to the .Net code.
[collectd.git] / bindings / csharp / test.cs
1 using CollectdAPI;
2
3 public class EmbedTest: IRead
4 {
5         public EmbedTest ()
6         {
7                 System.Console.WriteLine ("EmbedTest ();");
8                 Collectd.registerRead ("EmbedTest::read", this);
9         }
10
11         public int read ()
12         {
13                 ValueList vl = new ValueList ("host", "plugin", "pinst", "type", "tinst");
14
15                 vl.setInterval (10.0);
16                 vl.addValue (new gaugeValue (3.1337));
17
18                 System.Console.WriteLine ("vl.getHost () = "
19                                 + vl.getHost ());
20
21                 Collectd.dispatchValues (vl);
22                 return (0);
23         }
24
25         public static void Main()
26         {
27                 System.Console.WriteLine("Hello, World!");
28         }
29 }
30