Neutronium.Core.Binding.CSharpToJavascriptConverter.MappNested C# (CSharp) Method

MappNested() private method

private MappNested ( object from, Neutronium.Core.Binding.GlueObject.JsGenericObject gres ) : void
from object
gres Neutronium.Core.Binding.GlueObject.JsGenericObject
return void
        private void MappNested(object from, JsGenericObject gres)
        {
            if (from == null)
                return;

           var propertyInfos = from.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => p.CanRead);

            foreach (var propertyInfo in propertyInfos)
            {
                var propertyName = propertyInfo.Name;
                object childvalue;
                try
                {
                    childvalue = propertyInfo.GetValue(from, null); 
                }
                catch(Exception e)
                {
                    _Logger.Info(()=> $"Unable to convert property {propertyName} from {@from} exception {e}");
                    continue;
                }

                var childres = InternalMap(childvalue);          
                gres.UpdateCSharpProperty(propertyName, childres);
            }
        }