/// <summary> /// Parses a data record into a <see cref="DatabaseIndexColumn" /> instance. /// </summary> private DomainTableIndexColumn ParseIndexColumn(DomainTableIndex index, IDataRecord record) { DomainTableIndexColumn indexColumn = index.CreateColumn(); indexColumn.ReferencedColumn = index.Table.TableColumns.FirstOrDefault(column => column.ColumnName == record["name"].ConvertTo <String>()); return(indexColumn); }
/// <summary> /// Creates a new indexed column within the index. /// </summary> public DomainTableIndexColumn CreateColumn() { DomainTableIndexColumn column = new DomainTableIndexColumn(this); _indexColumns.Add(column); return(column); }
/// <summary> /// Deserialises the version history from the specified xml element. /// </summary> internal static void Deserialise(DomainTableIndex index, XmlNode parentNode) { foreach (XmlNode xmlNode in parentNode.SelectNodes("column")) { DomainTableIndexColumn result = index.CreateColumn(); result.Deserialise(xmlNode); } }
/// <summary> /// Deserialises the version history from the specified xml element. /// </summary> internal static void Deserialise(DomainTable table, XmlNode parentNode) { foreach (XmlNode xmlNode in parentNode.SelectNodes("index")) { DomainTableIndex result = table.CreateIndex(); result.Deserialise(xmlNode); DomainTableIndexColumn.Deserialise(result, xmlNode); } }