Source

main-vinayFork / Source / Excel / Excel.AddIn / Excel.AddIn / Extensions / ParameterMetadataViewModelExtensions.cs

Full commit
using DataUp.Excel.BizLogic;

namespace DataUp.Excel.Addin
{
    public static class ParameterMetadataViewModelExtensions
    {
        public static ParameterMetadataViewModel SetValuesFrom(this ParameterMetadataViewModel thisObject, ParameterDetail metadata)
        {
            if (thisObject == null)
            {
                thisObject = new ParameterMetadataViewModel();
            }

            thisObject.Name = metadata.Name.Trim();
            thisObject.Description = metadata.Description;
            thisObject.Type = metadata.Type;
            thisObject.Units = metadata.Units;

            return thisObject;
        }
    }
}