private bool TryGetAsCustomType(Type destinitionType, string propertyName, out object propValue) { propValue = null; bool isCustomNonEnumerableType = destinitionType.IsCustomNonEnumerableType(); if (isCustomNonEnumerableType) { if (String.IsNullOrWhiteSpace(propertyName) || SourceData.AllKeys().Any(m => m.StartsWith(propertyName + ".", StringComparison.CurrentCultureIgnoreCase))) { var obj = Activator.CreateInstance(destinitionType); bool isFilled = false; foreach (PropertyInfo propertyInfo in destinitionType.GetPublicAccessibleProperties()) { var propName = (!String.IsNullOrEmpty(propertyName) ? propertyName + "." : "") + propertyInfo.Name; var objValue = CreateObject(propertyInfo.PropertyType, propName); if (objValue != null) { propertyInfo.SetValue(obj, objValue); isFilled = true; } } if (isFilled) { propValue = obj; } } } return(isCustomNonEnumerableType); }