using System; using System.Collections.Generic; namespace umbraco.DataLayer.Utility.Table { /// /// Interface for classes that represent a data source table. /// public interface ITable : IEnumerable { /// /// Gets the name of the table. /// /// The name of the table. string Name { get; } /// /// Adds the field to the table. /// /// The field. void AddField(IField field); /// /// Creates a new field. /// /// The name. /// The field data type. /// A new field. IField CreateField(string name, Type dataType); /// /// Creates a new field. /// /// The name. /// The field data type. /// The properties. /// A new field. IField CreateField(string name, Type dataType, FieldProperties properties); /// /// Creates a new field. /// /// The name. /// The field data type. /// The size. /// A new field. IField CreateField(string name, Type dataType, int size); /// /// Creates a new field. /// /// The name. /// The field data type. /// The size. /// The properties. /// A new field. IField CreateField(string name, Type dataType, int size, FieldProperties properties); /// /// Finds the field with the specified name. /// /// The name. /// The field, or null if a field with the specified name doesn't exist. IField FindField(string name); /// /// Finds the first field satisfiying the matcher. /// /// The matcher. /// The first field found, or null if no field matches. IField FindField(Predicate matcher); /// /// Finds all fields satisfiying the matcher. /// /// The matcher. /// A list of all matching fields. IList FindFields(Predicate matcher); } }