// dnlib: See LICENSE.txt for more info
using System.Diagnostics;
namespace dnlib.DotNet.MD {
///
/// Info about one MD table
///
[DebuggerDisplay("{rowSize} {name}")]
public sealed class TableInfo {
readonly Table table;
int rowSize;
readonly ColumnInfo[] columns;
readonly string name;
///
/// Returns the table type
///
public Table Table => table;
///
/// Returns the total size of a row in bytes
///
public int RowSize {
get => rowSize;
internal set => rowSize = value;
}
///
/// Returns all the columns
///
public ColumnInfo[] Columns => columns;
///
/// Returns the name of the table
///
public string Name => name;
///
/// Constructor
///
/// Table type
/// Table name
/// All columns
public TableInfo(Table table, string name, ColumnInfo[] columns) {
this.table = table;
this.name = name;
this.columns = columns;
}
///
/// Constructor
///
/// Table type
/// Table name
/// All columns
/// Row size
public TableInfo(Table table, string name, ColumnInfo[] columns, int rowSize) {
this.table = table;
this.name = name;
this.columns = columns;
this.rowSize = rowSize;
}
}
}