Exemple #1
0
        private static void ProcessFieldOrProperty(object sourceValue, int maxDepth, int currentDepth, FieldInfo field, PropertyInfo property, DumpValue complexValue, int maxEnumerableItemCount)
        {
            object fieldValue;
            try
            {
                fieldValue = property == null ? field.GetValue(sourceValue) : property.GetValue(sourceValue, null);
            }
            catch
            {
                return;
            }
            var fieldName = property == null ? field.Name : property.Name;
            if (fieldValue == null) return;

            var isNsObjectDescendant = sourceValue is NSObject;
            if ((fieldName == "Description" || fieldName == "DebugDescription" || fieldName == "RetainCount") && isNsObjectDescendant) return;

            var value = DumpObjectRecursive(fieldValue, maxDepth, currentDepth + 1, maxEnumerableItemCount);
            if (value != null) complexValue.AddComplexFieldValue(fieldName, value);
        }
Exemple #2
0
 public void AddComplexFieldValue(string fieldName, DumpValue fieldValue)
 {
     ComplexValue.Add(fieldName, fieldValue);
 }