C# 클래스 GSF.TimeSeries.Adapters.AdapterBase

Represents the base class for any adapter.
상속: IAdapter
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

Private Properties

프로퍼티 타입 설명
GenHashCode void
GetStatusWithMessageLevelPrefix string
IncrementProcessedMeasurements void
OnProcessException void
OnStatusMessage void
SetInitializedState void
SetTemporalConstraint void
Start void
Stop void

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all the resources used by the AdapterBase object.

GetHashCode ( ) : int

Serves as a hash function for the current AdapterBase.

GetShortStatus ( int maxLength ) : string

Gets a short one-line status of this AdapterBase.

Initialize ( ) : void

Initializes AdapterBase.

LoadInputSourceIDs ( IAdapter adapter, string measurementTable = "ActiveMeasurements" ) : void

Loads an IOutputAdapter or IActionAdapter instance's input measurement keys from a specific set of source ID's.

Any existing input measurement keys will be distinctly merged with those associated with specified source ID's.

LoadOutputSourceIDs ( IAdapter adapter, string measurementTable = "ActiveMeasurements" ) : void

Loads an IInputAdapter or IActionAdapter instance's output measurements from a specific set of source ID's.

Any existing output measurements will be distinctly merged with those associated with specified source ID's.

ParseFilterExpression ( string filterExpression, string &tableName, string &whereExpression, string &sortField, int &takeCount ) : bool

Parses a standard FILTER styles expression into its constituent parts.

This method can be safely called from multiple threads.

ParseInputMeasurementKeys ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : MeasurementKey[]

Parses input measurement keys from connection string setting.

Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).

ParseOutputMeasurementKeys ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : MeasurementKey[]

Parses output measurement keys from connection string setting.

Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).

ParseOutputMeasurements ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : IMeasurement[]

Parses output measurements from connection string setting.

Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).

ParseTimeTag ( string timetag ) : System.DateTime

Parses a string formatted as an absolute or relative time tag.

Relative times are parsed based on an offset to current time (UTC) specified by "*".

The timetag parameter can be specified in one of the following formats: Time Format Format Description 12-30-2000 23:59:59.033 Absolute date and time. * Evaluates to DateTime.UtcNow. *-20s Evaluates to 20 seconds before DateTime.UtcNow. *-10m Evaluates to 10 minutes before DateTime.UtcNow. *-1h Evaluates to 1 hour before DateTime.UtcNow. *-1d Evaluates to 1 day before DateTime.UtcNow. *+2d Evaluates to 2 days from DateTime.UtcNow.

보호된 메소드들

메소드 설명
AdapterBase ( ) : System

Constructs a new instance of the AdapterBase.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the AdapterBase object and optionally releases the managed resources.

OnConfigurationChanged ( ) : void

Raises ConfigurationChanged event.

OnInputMeasurementKeysUpdated ( ) : void

Raises InputMeasurementKeysUpdated event.

OnOutputMeasurementsUpdated ( ) : void

Raises OutputMeasurementsUpdated event.

OnProcessException ( MessageLevel level, Exception exception, string eventName = null, MessageFlags flags = MessageFlags.None ) : void

Raises the ProcessException event.

should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.

OnStatusMessage ( MessageLevel level, string status, string eventName = null, MessageFlags flags = MessageFlags.None ) : void

Raises the StatusMessage event and sends this data to the Logger.

should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.

비공개 메소드들

메소드 설명
GenHashCode ( ) : void
GetStatusWithMessageLevelPrefix ( string status, MessageLevel level ) : string
IncrementProcessedMeasurements ( long totalAdded ) : void
OnProcessException ( Exception ex ) : void
OnStatusMessage ( string status ) : void
SetInitializedState ( bool initialized ) : void
SetTemporalConstraint ( string startTime, string stopTime, string constraintParameters ) : void
Start ( ) : void
Stop ( ) : void

메소드 상세

AdapterBase() 보호된 메소드

Constructs a new instance of the AdapterBase.
protected AdapterBase ( ) : System
리턴 System

Dispose() 공개 메소드

Releases all the resources used by the AdapterBase object.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the unmanaged resources used by the AdapterBase object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

GetHashCode() 공개 메소드

Serves as a hash function for the current AdapterBase.
public GetHashCode ( ) : int
리턴 int

GetShortStatus() 공개 추상적인 메소드

Gets a short one-line status of this AdapterBase.
public abstract GetShortStatus ( int maxLength ) : string
maxLength int Maximum number of available characters for display.
리턴 string

Initialize() 공개 메소드

Initializes AdapterBase.
public Initialize ( ) : void
리턴 void

LoadInputSourceIDs() 공개 정적인 메소드

Loads an IOutputAdapter or IActionAdapter instance's input measurement keys from a specific set of source ID's.
Any existing input measurement keys will be distinctly merged with those associated with specified source ID's.
public static LoadInputSourceIDs ( IAdapter adapter, string measurementTable = "ActiveMeasurements" ) : void
adapter IAdapter to load input measurement keys for.
measurementTable string Measurement table name used to load input source ID's.
리턴 void

LoadOutputSourceIDs() 공개 정적인 메소드

Loads an IInputAdapter or IActionAdapter instance's output measurements from a specific set of source ID's.
Any existing output measurements will be distinctly merged with those associated with specified source ID's.
public static LoadOutputSourceIDs ( IAdapter adapter, string measurementTable = "ActiveMeasurements" ) : void
adapter IAdapter to load output measurements for.
measurementTable string Measurement table name used to load output source ID's.
리턴 void

OnConfigurationChanged() 보호된 메소드

Raises ConfigurationChanged event.
protected OnConfigurationChanged ( ) : void
리턴 void

OnInputMeasurementKeysUpdated() 보호된 메소드

Raises InputMeasurementKeysUpdated event.
protected OnInputMeasurementKeysUpdated ( ) : void
리턴 void

OnOutputMeasurementsUpdated() 보호된 메소드

Raises OutputMeasurementsUpdated event.
protected OnOutputMeasurementsUpdated ( ) : void
리턴 void

OnProcessException() 보호된 메소드

Raises the ProcessException event.
should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.
protected OnProcessException ( MessageLevel level, Exception exception, string eventName = null, MessageFlags flags = MessageFlags.None ) : void
level MessageLevel The to assign to this message
exception System.Exception Processing .
eventName string A fixed string to classify this event; defaults to null.
flags MessageFlags to use, if any; defaults to .
리턴 void

OnStatusMessage() 보호된 메소드

Raises the StatusMessage event and sends this data to the Logger.
should be a constant string value associated with what type of message is being generated. In general, there should only be a few dozen distinct event names per class. Exceeding this threshold will cause the EventName to be replaced with a general warning that a usage issue has occurred.
protected OnStatusMessage ( MessageLevel level, string status, string eventName = null, MessageFlags flags = MessageFlags.None ) : void
level MessageLevel The to assign to this message
status string New status message.
eventName string A fixed string to classify this event; defaults to null.
flags MessageFlags to use, if any; defaults to .
리턴 void

ParseFilterExpression() 공개 정적인 메소드

Parses a standard FILTER styles expression into its constituent parts.
This method can be safely called from multiple threads.
public static ParseFilterExpression ( string filterExpression, string &tableName, string &whereExpression, string &sortField, int &takeCount ) : bool
filterExpression string Filter expression to parse.
tableName string Name of table in filter expression.
whereExpression string Where expression in filter expression.
sortField string Sort field, if any, in filter expression.
takeCount int Total row restriction, if any, in filter expression.
리턴 bool

ParseInputMeasurementKeys() 공개 정적인 메소드

Parses input measurement keys from connection string setting.
Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).
public static ParseInputMeasurementKeys ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : MeasurementKey[]
dataSource System.Data.DataSet The used to define input measurement keys.
allowSelect bool Determines if database access via "SELECT" statement should be allowed for defining input measurement keys (see remarks about security).
value string Value of setting used to define input measurement keys, typically "inputMeasurementKeys".
measurementTable string Measurement table name used to load additional meta-data; this is not used when specifying a FILTER expression.
리턴 MeasurementKey[]

ParseOutputMeasurementKeys() 공개 정적인 메소드

Parses output measurement keys from connection string setting.
Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).
public static ParseOutputMeasurementKeys ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : MeasurementKey[]
dataSource System.Data.DataSet The used to define output measurements.
allowSelect bool Determines if database access via "SELECT" statement should be allowed for defining output measurement keys (see remarks about security).
value string Value of setting used to define output measurements, typically "outputMeasurements".
measurementTable string Measurement table name used to load additional meta-data; this is not used when specifying a FILTER expression.
리턴 MeasurementKey[]

ParseOutputMeasurements() 공개 정적인 메소드

Parses output measurements from connection string setting.
Security warning: allowing SELECT statements, i.e., setting allowSelect to true, should only be allowed in cases where SQL injection would not be an issue (e.g., in places where a user can already access the database and would have nothing to gain via an injection attack).
public static ParseOutputMeasurements ( DataSet dataSource, bool allowSelect, string value, string measurementTable = "ActiveMeasurements" ) : IMeasurement[]
dataSource System.Data.DataSet The used to define output measurements.
allowSelect bool Determines if database access via "SELECT" statement should be allowed for defining output measurements (see remarks about security).
value string Value of setting used to define output measurements, typically "outputMeasurements".
measurementTable string Measurement table name used to load additional meta-data; this is not used when specifying a FILTER expression.
리턴 IMeasurement[]

ParseTimeTag() 공개 정적인 메소드

Parses a string formatted as an absolute or relative time tag.

Relative times are parsed based on an offset to current time (UTC) specified by "*".

The timetag parameter can be specified in one of the following formats: Time Format Format Description 12-30-2000 23:59:59.033 Absolute date and time. * Evaluates to DateTime.UtcNow. *-20s Evaluates to 20 seconds before DateTime.UtcNow. *-10m Evaluates to 10 minutes before DateTime.UtcNow. *-1h Evaluates to 1 hour before DateTime.UtcNow. *-1d Evaluates to 1 day before DateTime.UtcNow. *+2d Evaluates to 2 days from DateTime.UtcNow.

parameter cannot be null or empty. does not contain a valid string representation of a date and time.
public static ParseTimeTag ( string timetag ) : System.DateTime
timetag string String formatted as an absolute or relative time tag.
리턴 System.DateTime