Show / Hide Table of Contents

Class CheckList

Represents a list of health checks to be performed. Health checks are classes derived from BaseCheck class and must implement DoRun() method that performs application-specific checking. CheckList obtains a list of Check instances from assemblies supplied to its constructor. Health checks are executed in no predictable order. If particular execution order is necessary then a check has to be written to explicitly coordinate sub-checks. The class is thread safe for all operations.

Inheritance
System.Object
CheckList
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)
System.Object.ToString()
Namespace: NFX.Health
Assembly: NFX.dll
Syntax
public sealed class CheckList

Constructors

CheckList(IEnumerable<Assembly>, ConfigSectionNode)

Initializaes check list from assemblies

Declaration
public CheckList(IEnumerable<Assembly> checkAssemblies, ConfigSectionNode config)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Reflection.Assembly> checkAssemblies
ConfigSectionNode config

CheckList(String, String, ConfigSectionNode)

Initializaes check list from assembly names separated by semicolons. Optional path will be prepended to every assembly name

Declaration
public CheckList(string path, string checkAssemblies, ConfigSectionNode config)
Parameters
Type Name Description
System.String path
System.String checkAssemblies
ConfigSectionNode config

Properties

AllSuccessful

Returns true when all checks have successfuly run

Declaration
public bool AllSuccessful { get; }
Property Value
Type Description
System.Boolean

Checks

Returns health checks

Declaration
public IEnumerable<BaseCheck> Checks { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<BaseCheck>

RunFinish

Returns when run finished

Declaration
public DateTime? RunFinish { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

RunStart

Returns when run started

Declaration
public DateTime? RunStart { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

Status

Returns current status - whether checks are running or have already been run

Declaration
public CheckListStatus Status { get; }
Property Value
Type Description
CheckListStatus

Successful

Returns true when all checks that could be run have successfuly run

Declaration
public bool Successful { get; }
Property Value
Type Description
System.Boolean

Methods

Report(TextWriter, String)

Dumps check results into writer in on of the supported formats

Declaration
public string Report(TextWriter writer, string format)
Parameters
Type Name Description
System.IO.TextWriter writer
System.String format
Returns
Type Description
System.String

Run(NameValueCollection)

Runs health checks. Checks are ran in NO PARTICULAR order. This method can not be called twice

Declaration
public void Run(NameValueCollection parameters)
Parameters
Type Name Description
System.Collections.Specialized.NameValueCollection parameters

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX