Source

main / Source / Excel / Excel.AddIn / Excel.AddIn / Extensions / MetadataListViewModelExtensions.cs

using System.Collections.Generic;
using DataUp.Excel.BizLogic;

namespace DataUp.Excel.Addin
{
    public static class MetadataListViewModelExtensions
    {
        public static List<MetadataDetail> GetMetadataList(this MetadataListViewModel metadataListViewModel)
        {
            List<MetadataDetail> updatedMetadata = new List<MetadataDetail>();
            foreach (var item in metadataListViewModel.MetadataList)
            {
                MetadataDetail model = new MetadataDetail();
                model.SetValuesFrom(item);
                updatedMetadata.Add(model);
            }

            return updatedMetadata;
        }
    }
}