Here are the examples of the csharp api class Orchard.DesignerTools.Services.ObjectDumper.Dump(object, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
0
1. Example
Project: Orchard
Source File: ObjectDumper.cs
Source File: ObjectDumper.cs
private void DumpDictionary(IDictionary dictionary) { if (dictionary.Keys.Count == 0) { return; } foreach (var key in dictionary.Keys) { Dump(dictionary[key], string.Format("[\"{0}\"]", key)); } }
0
2. Example
Project: Orchard
Source File: ObjectDumper.cs
Source File: ObjectDumper.cs
private void DumpShape(IShape shape) { var value = shape as Shape; if (value == null) { return; } foreach (DictionaryEntry entry in value.Properties) { // ignore private members (added dynamically by the shape wrapper) if (entry.Key.ToString().StartsWith("_")) { continue; } Dump(entry.Value, entry.Key.ToString()); } }
0
3. Example
Project: Orchard
Source File: ObjectDumper.cs
Source File: ObjectDumper.cs
private void DumpEnumerable(IEnumerable enumerable) { if (!enumerable.GetEnumerator().MoveNext()) { return; } int i = 0; foreach (var child in enumerable) { Dump(child, string.Format("[{0}]", i++)); } }
0
4. Example
Project: Orchard
Source File: ObjectDumper.cs
Source File: ObjectDumper.cs
private void DumpMember(object o, MemberInfo member) { if (member is MethodBase || member is EventInfo) return; if (member is FieldInfo) { var field = (FieldInfo)member; Dump(field.GetValue(o), member.Name); } else if (member is PropertyInfo) { var prop = (PropertyInfo)member; if (prop.GetIndexParameters().Length == 0 && prop.CanRead) { Dump(prop.GetValue(o, null), member.Name); } } }
0
5. Example
Project: Orchard
Source File: ObjectDumper.cs
Source File: ObjectDumper.cs
private void DumpMembers(object o) { var members = o.GetType() .GetField/n ..... /n //View Source file for more details /n }