Exemplo n.º 1
0
 /// <summary>
 /// Imports a table with header line into the entity.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="table">The text.</param>
 public static void ImportTable(this ResourceEntity entity, IList <IList <string> > table)
 {
     entity.ImportTable(_fixedColumnHeaders, table).Apply();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the text tables data lines.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="languages">The resource languages.</param>
        /// <param name="scope">The scope.</param>
        /// <returns>
        /// The data lines.
        /// </returns>
        private static IEnumerable <IEnumerable <string> > GetDataRows(this ResourceEntity entity, IEnumerable <CultureKey> languages, IResourceScope?scope)
        {
            var entries = scope?.Entries.Where(entry => entry.Container == entity) ?? entity.Entries;

            return(entries.Select(entry => entry.GetDataRow(languages, scope)));
        }