Table of Contents

Class AdapterBase

Namespace
MES.MQC.DataSourceLibrary.Adapters
Assembly
MES.MQC.DataSourceLibrary.dll

The AdapterBase class is the base for all MQC Adapters.

public abstract class AdapterBase
Inheritance
AdapterBase
Derived
Inherited Members

Properties

DataSource

The Data Source of the Adapter. If a report file contains data from multiple data sources, this property has to be to "Unknown" and the DataSource of each AdapterData object has to be defined.

public virtual string DataSource { get; }

Property Value

string

Description

Description of the Adapter that is visible in the Adapter Dialog as a popover. If the adapter is an API Connector, the description is also shown in the Add/Edit DataSource dialog, when the API Connector is selected. Absolute links get transformed into HTML Link Tags, line breaks (\n) get transformed into HTML line breaks (<br>), HTML tags are not allowed.

public virtual string Description { get; }

Property Value

string

Name

Unique Name of the Adapter. Defaults to the ClassName (without Adapter / FileReader / ApiConnector suffix), can be overridden with a user defined Name.

public virtual string Name { get; }

Property Value

string

Options

Adapter options for the specific adapter.

public AdapterOptions Options { get; set; }

Property Value

AdapterOptions

Methods

ReadFilePathsInZipFile(string)

protected List<string> ReadFilePathsInZipFile(string zipFilePath)

Parameters

zipFilePath string

Returns

List<string>

ThrowWarningForEmptyDataProperty(AdapterDataBase, AdapterContextBase, string, string)

protected void ThrowWarningForEmptyDataProperty(AdapterDataBase adapterDataBase, AdapterContextBase context, string propertyName, string value)

Parameters

adapterDataBase AdapterDataBase
context AdapterContextBase
propertyName string
value string

TransformStringToDateTime(AdapterContext, string)

This method is deprecated, use

TransformStringToDateTime(value)
instead
protected DateTime TransformStringToDateTime(AdapterContext context, string value)

Parameters

context AdapterContext

AdapterContext

value string

Date as string

Returns

DateTime

Datetime transformed from the string or the creation date, if string was not a valid datetime

TransformStringToDateTime(string)

TransformStringToValue is a Utility method. Parse a string value to a DateTime.

protected DateTime? TransformStringToDateTime(string value)

Parameters

value string

Date as string

Returns

DateTime?

Datetime transformed from the string or null, if string was not a valid datetime

TransformStringToValue(string)

TransformStringToValue is a Utility method. Parse a string value to a double value in a culture independent (invariant) way.

protected static double? TransformStringToValue(string value)

Parameters

value string

Returns

double?