Class Datum
Base class for single measurement events (datums) reported to instrumentation
Inheritance
System.Object
Datum
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: NFX.dll
Syntax
[Serializable]
public abstract class Datum : IArchiveLoggable, IBSONSerializable, IBSONDeserializable, IJSONWritable
Constructors
Datum()
Declaration
Datum(String)
Declaration
protected Datum(string source)
Parameters
| Type |
Name |
Description |
| System.String |
source |
|
Datum(String, DateTime)
Declaration
protected Datum(string source, DateTime utcDateTime)
Parameters
| Type |
Name |
Description |
| System.String |
source |
|
| System.DateTime |
utcDateTime |
|
Fields
BSON_FLD_COUNT
Declaration
public const string BSON_FLD_COUNT = "cnt"
Field Value
| Type |
Description |
| System.String |
|
BSON_FLD_END_TIME
Declaration
public const string BSON_FLD_END_TIME = "et"
Field Value
| Type |
Description |
| System.String |
|
BSON_FLD_SOURCE
Declaration
public const string BSON_FLD_SOURCE = "src"
Field Value
| Type |
Description |
| System.String |
|
BSON_FLD_TIME
Declaration
public const string BSON_FLD_TIME = "t"
Field Value
| Type |
Description |
| System.String |
|
BSON_FLD_UNIT
Declaration
public const string BSON_FLD_UNIT = "un"
Field Value
| Type |
Description |
| System.String |
|
BSON_FLD_VALUE
Declaration
public const string BSON_FLD_VALUE = "val"
Field Value
| Type |
Description |
| System.String |
|
BUSINESS_SOURCE
Declaration
public const string BUSINESS_SOURCE = "BsnsLgc"
Field Value
| Type |
Description |
| System.String |
|
FRAMEWORK_SOURCE
Declaration
public const string FRAMEWORK_SOURCE = "Frmwrk"
Field Value
| Type |
Description |
| System.String |
|
m_Count
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
m_UTCEndTime
Declaration
protected DateTime m_UTCEndTime
Field Value
| Type |
Description |
| System.DateTime |
|
m_UTCTime
Declaration
protected DateTime m_UTCTime
Field Value
| Type |
Description |
| System.DateTime |
|
UNSPECIFIED_SOURCE
Declaration
public const string UNSPECIFIED_SOURCE = "*"
Field Value
| Type |
Description |
| System.String |
|
Properties
Count
Returns count of measurements. This property may be gotten only if IsAggregated==true, otherwise zero is returned
Declaration
public int Count { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Description
Returns description for data that this datum represents. Base implementation returns full type name of this instance
Declaration
public virtual string Description { get; }
Property Value
| Type |
Description |
| System.String |
|
IsAggregated
Indicates whether this instance represents a rollup/aggregation of multiple events
Declaration
public bool IsAggregated { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
PlotValue
Provides numeric value used for charts
Declaration
public virtual object PlotValue { get; }
Property Value
| Type |
Description |
| System.Object |
|
Rate
Returns rate of occurrence string
Declaration
public string Rate { get; }
Property Value
| Type |
Description |
| System.String |
|
Source
Returns datum source. Data are rolled-up by type of recorded datum instances and source
Declaration
public virtual string Source { get; }
Property Value
| Type |
Description |
| System.String |
|
UTCEndTime
Returns UTC time stamp when event happened. This property may be gotten only if IsAggregated==true, otherwise UTCTime value is returned
Declaration
public DateTime UTCEndTime { get; }
Property Value
| Type |
Description |
| System.DateTime |
|
UTCTime
Returns UTC time stamp when event happened
Declaration
public DateTime UTCTime { get; }
Property Value
| Type |
Description |
| System.DateTime |
|
ValueAsObject
Provides access to value polymorphically
Declaration
public abstract object ValueAsObject { get; }
Property Value
| Type |
Description |
| System.Object |
|
ValueUnitName
Provides name for units that value is measured in
Declaration
public abstract string ValueUnitName { get; }
Property Value
| Type |
Description |
| System.String |
|
ViewGroupInterfaces
Returns Datum classification interfaces marked with InstrumentViewGroup attribute. The implementation is cached fr efficiency
Declaration
public IEnumerable<Type> ViewGroupInterfaces { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Type> |
|
Methods
Aggregate(IEnumerable<Datum>)
Aggregates events, for example from multiple threads into one
Declaration
public Datum Aggregate(IEnumerable<Datum> many)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<Datum> |
many |
|
Returns
AggregateEvent(Datum)
Declaration
protected virtual void AggregateEvent(Datum dat)
Parameters
| Type |
Name |
Description |
| Datum |
dat |
|
DeserializeFromBSON(BSONSerializer, BSONDocument, ref Object)
Declaration
public virtual void DeserializeFromBSON(BSONSerializer serializer, BSONDocument doc, ref object context)
Parameters
GetViewGroupInterfaces(Type)
Returns Datum classification interfaces marked with InstrumentViewGroup attribute. The implementation is cached fr efficiency
Declaration
public static IEnumerable<Type> GetViewGroupInterfaces(Type tDatum)
Parameters
| Type |
Name |
Description |
| System.Type |
tDatum |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Type> |
|
IsKnownTypeForBSONDeserialization(Type)
Declaration
public virtual bool IsKnownTypeForBSONDeserialization(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
| Type |
Description |
| System.Boolean |
|
MakeAggregateInstance()
Declaration
protected abstract Datum MakeAggregateInstance()
Returns
ReduceSourceDetail(Int32)
Override to set a new source value which is less-specific than existing source.
ReductionLevel specifies how much detail should be lost. The function is idempotent, that is - calling more than once with the same arg does not
change the state of the object.
The default implementation removes all source details (unspecified source) when reductionLevel less than zero.
Example:
TotalBytesSent("mpx://45.12.123.19:7823 -> MySystem.Contracts.IDoSomething.SomeMethod1()")
ReduceSourceDetail(0) -> yields original string
ReduceSourceDetail(1) - > "MySystem.Contracts.IDoSomething.SomeMethod1()"
ReduceSourceDetail(2) - > "MySystem.Contracts.IDoSomething"
ReduceSourceDetail(3) - > ""
Declaration
public virtual void ReduceSourceDetail(int reductionLevel)
Parameters
| Type |
Name |
Description |
| System.Int32 |
reductionLevel |
|
SerializeToBSON(BSONSerializer, BSONDocument, IBSONSerializable, ref Object)
Declaration
public virtual void SerializeToBSON(BSONSerializer serializer, BSONDocument doc, IBSONSerializable parent, ref object context)
Parameters
SummarizeAggregation()
Declaration
protected virtual void SummarizeAggregation()
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.Object.ToString()
WriteAsJSON(TextWriter, Int32, JSONWritingOptions)
Declaration
public void WriteAsJSON(TextWriter wri, int nestingLevel, JSONWritingOptions options = null)
Parameters
| Type |
Name |
Description |
| System.IO.TextWriter |
wri |
|
| System.Int32 |
nestingLevel |
|
| JSONWritingOptions |
options |
|
WriteJSONFields(IDictionary<String, Object>, JSONWritingOptions)
Declaration
protected virtual void WriteJSONFields(IDictionary<string, object> data, JSONWritingOptions options)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IDictionary<System.String, System.Object> |
data |
|
| JSONWritingOptions |
options |
|
Implements
Extension Methods