Table of Contents

Class DataSchema

Namespace
Datafication.Core.Data
Assembly
Datafication.Core.dll

Represents the schema of a data block, which includes the column information.

[Serializable]
[DataContract]
public class DataSchema
Inheritance
object
DataSchema

Constructors

DataSchema(DataColumnCollection)

Initializes a new instance of the DataSchema class with a reference to the column collection.

public DataSchema(DataColumnCollection columns)

Parameters

columns DataColumnCollection

The collection of columns that define the schema.

Properties

Count

Gets the number of columns in the schema.

public int Count { get; }

Property Value

int

this[int]

Gets the column at the specified index.

public IDataColumn this[int index] { get; }

Parameters

index int

The zero-based index of the column.

Property Value

IDataColumn

The column at the specified index.

this[string]

Gets the column with the specified name.

public IDataColumn this[string name] { get; }

Parameters

name string

The name of the column.

Property Value

IDataColumn

The column with the specified name.

Methods

ColumnExists(string)

Determines if a column with the specified name exists in the schema.

public bool ColumnExists(string columnName)

Parameters

columnName string

The name of the column to check.

Returns

bool

True if the column exists; otherwise, false.

GetColumnLabels()

Gets the labels of the columns in the schema.

public List<string> GetColumnLabels()

Returns

List<string>

A list of column labels.

GetColumnNames()

Gets the names of the columns in the schema.

public List<string> GetColumnNames()

Returns

List<string>

A list of column names.