Show / Hide Table of Contents

    Class TableSchemaCollection

    List of tables for DatabaseSchema.

    Inheritance
    System.Object
    System.Collections.ObjectModel.Collection<TableSchema>
    System.Collections.ObjectModel.KeyedCollection<System.String, TableSchema>
    TableSchemaCollection
    Namespace: Kros.Data.Schema
    Assembly: Kros.Utils.dll
    Syntax
    public class TableSchemaCollection : KeyedCollection<string, TableSchema>, IList<TableSchema>, ICollection<TableSchema>, IList, ICollection, IReadOnlyList<TableSchema>, IReadOnlyCollection<TableSchema>, IEnumerable<TableSchema>, IEnumerable
    Remarks

    To the tables added to this list is automatically set their Database. The table can belong only to one database.

    Constructors

    TableSchemaCollection(DatabaseSchema)

    Creates a new table list for database.

    Declaration
    public TableSchemaCollection(DatabaseSchema database)
    Parameters
    Type Name Description
    DatabaseSchema database

    Database to which table belongs.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Value of database is null.

    Properties

    Database

    Database to which table list belongs.

    Declaration
    public DatabaseSchema Database { get; }
    Property Value
    Type Description
    DatabaseSchema

    Methods

    Add(String)

    Creates a new TableSchema with name and adds it to the list.

    Declaration
    public TableSchema Add(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the created table.

    Returns
    Type Description
    TableSchema

    Created table schema.

    GetKeyForItem(TableSchema)

    Declaration
    protected override string GetKeyForItem(TableSchema item)
    Parameters
    Type Name Description
    TableSchema item
    Returns
    Type Description
    System.String
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.TableSchema>.GetKeyForItem(Kros.Data.Schema.TableSchema)

    InsertItem(Int32, TableSchema)

    Declaration
    protected override void InsertItem(int index, TableSchema item)
    Parameters
    Type Name Description
    System.Int32 index
    TableSchema item
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.TableSchema>.InsertItem(System.Int32, Kros.Data.Schema.TableSchema)

    RemoveItem(Int32)

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.TableSchema>.RemoveItem(System.Int32)
    Back to top KROS a.s.