Table of Contents

Class FileDataConnector

Namespace
Ranorex.Core.Data
Assembly
Ranorex.Core.dll

A base class for file based data connectors.

public abstract class FileDataConnector : DataConnector, IDisposable
Inheritance
FileDataConnector
Implements
Derived
Inherited Members

Constructors

FileDataConnector(XmlNode)

Initializes a new instance of the FileDataConnector class.

public FileDataConnector(XmlNode xmlNode)

Parameters

xmlNode XmlNode

An XML node containing the definition of the source.

FileDataConnector(string, bool)

Initializes a new instance of the FileDataConnector class.

public FileDataConnector(string name, bool readOnly)

Parameters

name string

The name of the source.

readOnly bool

Sets the value of the IsReadOnly property.

Properties

FileName

Gets or sets the name of the file.

public string FileName { get; set; }

Property Value

string

The name of the file.

Remarks

The file name may be relative.

IncludeFile

Gets or sets a value specifying whether the file should be included into the associated project.

public abstract CheckState IncludeFile { get; set; }

Property Value

CheckState

A value specifying whether to include the file into the associated project.

ResolvedFileName

Gets the name of the resolved file that takes relative paths into account.

public string ResolvedFileName { get; }

Property Value

string

The name of the resolved file.

Methods

LoadDataImpl(out ColumnCollection, out RowCollection)

Sets up a file watcher on the data file and creates instances for the columns and rows arguments.

protected override void LoadDataImpl(out ColumnCollection columns, out RowCollection rows)

Parameters

columns ColumnCollection

When this method returns, contains a new ColumnCollection instance.

rows RowCollection

When this method returns, contains a new RowCollection instance that is bound to columns.

OnFileNameChanged(string)

Called when the filename changes

protected virtual void OnFileNameChanged(string oldFileName)

Parameters

oldFileName string

The filename before the filename was changed.

ResolveFilename(string)

Resolves the specified file name taking relative paths into account.

public static string ResolveFilename(string fileName)

Parameters

fileName string

The (relative) name of a file.

Returns

string

The resolved file name.

ResolveFilename(string, bool)

Resolves the specified file name taking relative paths into account.

public static string ResolveFilename(string fileName, bool useNameFallback)

Parameters

fileName string

The (relative) name of a file.

useNameFallback bool

if set to true [use name fallback].

Returns

string

The resolved file name.