Source

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

Full commit
Naethra D ba1cb57 











Naethra D db09f1b 

Naethra D ba1cb57 







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.EntityName = (metadata.EntityName == null)? metadata.EntityName : metadata.EntityName.Trim();
            thisObject.EntityDescription = metadata.EntityDescription;
            thisObject.Name = metadata.Name.Trim();
            thisObject.Description = metadata.Description;
            thisObject.Type = metadata.Type;
            thisObject.Units = metadata.Units;

            return thisObject;
        }
    }
}