public EnumerableDisplayActual(IEnumerable enumerableValue, int depth) { foreach (object valueObject in enumerableValue) { _values.Add(DisplayActual.Create(valueObject, depth)); } _type = enumerableValue.GetType(); }
public DefaultDisplayActual(object value, int depth, ObjectIDGenerator graph) { _schema = DisplayActualSchema.Create(value.GetType()); depth += 1; foreach (var accessor in _schema.Accessors) { IDisplayActual pv; try { pv = DisplayActual.Create(DisplayActual.Create(accessor.GetValue(value), depth, graph)); } catch (Exception ex) { ex = Record.UnwindTargetException(ex); pv = DisplayActual.Create($"<{ex.GetType().Name}>"); } _entries.Add( (accessor.Name, pv) ); } }
internal static string ConvertToString(object value) { return(DisplayActual.Create(value).Format(DisplayActualOptions.None)); }