Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NewSample.cs
1using System.Globalization;
2using System.Xml;
3
5{
9 public class NewSample : ProfilerEvent
10 {
11 private readonly double sample;
12
20 : base(Ticks, Thread)
21 {
22 this.sample = Sample;
23 }
24
28 public double Sample => this.sample;
29
31 public override string EventType => "NewSample";
32
34 public override void ExportXmlAttributes(XmlWriter Output, ProfilerEvent Previous, TimeUnit TimeUnit)
35 {
36 Output.WriteAttributeString("sample", this.PlantUmlState);
37
38 base.ExportXmlAttributes(Output, Previous, TimeUnit);
39 }
40
42 public override string PlantUmlState
43 {
44 get
45 {
46 return this.sample.ToString().Replace(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, ".");
47 }
48 }
49 }
50}
Contains a new sample value.
Definition: NewSample.cs:10
override void ExportXmlAttributes(XmlWriter Output, ProfilerEvent Previous, TimeUnit TimeUnit)
Exports event attributes to XML.
Definition: NewSample.cs:34
NewSample(long Ticks, double Sample, ProfilerThread Thread)
Contains a new sample value.
Definition: NewSample.cs:19
Abstract base class for profiler events.
ProfilerThread Thread
Profiler thread generating the event.
Class that keeps track of events and timing for one thread.
TimeUnit
Options for presenting time in reports.
Definition: Profiler.cs:16