// -------------------------------------------------------------------------------------------------------------------- /// <summary> Configure a table component with a data table instance. </summary> /// <typeparam name="TEntity"> Type of the entity. </typeparam> /// <param name="id"> The identifier. </param> /// <param name="table"> The data table to use. </param> /// <returns> A Table. </returns> public Table Configure <TEntity>(string id, IVariantTable <TEntity> table) where TEntity : class, new() { EnableAutomaticID = true; ID = id; DataTable = table; return(this); }
/// <summary> Configure a table component with a data table instance. </summary> /// <typeparam name="TEntity"> Type of the entity. </typeparam> /// <param name="id"> The data table to use. </param> /// <param name="entities"> The entities. </param> /// <returns> A Table. </returns> public Table Configure <TEntity>(string id, IEnumerable <TEntity> entities) where TEntity : class, new() { EnableAutomaticID = true; ID = id; var table = new Table <TEntity>(ServiceProvider); table.Entities = entities; DataTable = table; return(this); }
/// <summary> /// Overwrites another table with this table's values. /// </summary> public void CopyTo(IVariantTable inTarget) { VariantTable validTarget = inTarget as VariantTable; if (validTarget == null) { throw new ArgumentException("Invalid copy target", "inTarget"); } m_Values.CopyTo(validTarget.m_Values); validTarget.m_Optimized = m_Optimized; }
public VariantTable(StringHash32 inName, VariantTable inBase) : this(inName) { m_Base = inBase; }
/// <summary> /// Clears values and base. /// </summary> public void Reset() { Clear(); m_Base = null; }