Table of Contents

Class MtestHtmlFileReader

Namespace
MES.MQC.DataSourceLibrary.Adapters.Files
Assembly
MES.MQC.DataSourceLibrary.dll
public class MtestHtmlFileReader : FileReader
Inheritance
MtestHtmlFileReader
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 override 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 override string Description { get; }

Property Value

string

FileExtensions

File Extensions of the Adapter. This property has to be defined and must have at least one file extension. The Adapter is only used for FilePaths with the defined file extensions. The IsValid method is not called unless the file extension matches.

public override List<string> FileExtensions { get; }

Property Value

List<string>

HumanReadableFileExtensions

Human Readable File Extensions of the Adapter.

protected override List<string> HumanReadableFileExtensions { get; }

Property Value

List<string>

HumanReadableRegexFileNames

Start of Human Readable File Names of the Adapter.

protected override List<string> HumanReadableRegexFileNames { get; }

Property Value

List<string>

Name

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

public override string Name { get; }

Property Value

string

Version

public override Version Version { get; }

Property Value

Version

Methods

GetRelatedContentRequests(FileReaderContext)

Get the requirement and assesment html files in the same or sub directories of the main file (or if there is zip file) that the name starts with 'RequirementCatalog_' or 'AssessmentCatalog_'

public override List<RelatedContentRequest> GetRelatedContentRequests(FileReaderContext context)

Parameters

context FileReaderContext

Context of file

Returns

List<RelatedContentRequest>

List of RelatedContentRequest needs for reading the file

IsValid(FileReaderContext)

IsValid has to be implemented by the Adapter class. The method is called when the file extensions match. If the file extension is unique, this method can just return true, otherwise it should check if the file should be imported by the adapter. If true is returned, the current adapter is executed and the Read method is called. No other adapter is checked afterward.

protected override bool IsValid(FileReaderContext context)

Parameters

context FileReaderContext

FileReaderContext

Returns

bool

boolean (is this the correct adapter to read the file?)

Read(FileReaderContext)

Read has to be implemented by the Adapter class. This method is called when the file extensions match and isValid returns true, no other adapter is called. The data of the file should be read and returned as a AdapterReadResult.

protected override AdapterReadResult Read(FileReaderContext context)

Parameters

context FileReaderContext

FileReaderContext

Returns

AdapterReadResult

AdapterReadResult