public bool Process(object?instance, Type instanceType, IObjectDumperResultBuilder builder, int indent, int currentDepth) { if (instance is DateTime dt) { builder.AddSingleValue(dt.ToString("yyyy-MM-dd HH:mm:ss"), instance.GetType()); return(true); } return(false); }
public bool Process(object?instance, Type instanceType, IObjectDumperResultBuilder builder, int indent, int currentDepth) { if (instance is string) { builder.AddSingleValue(instance.ToString(), instance.GetType()); return(true); } return(false); }
public bool Process(object?instance, Type instanceType, IObjectDumperResultBuilder builder, int indent, int currentDepth) { if (instance == null) { builder.AddSingleValue(instance, instanceType); return(true); } return(false); }
public bool Process(object?instance, Type instanceType, IObjectDumperResultBuilder builder, int indent, int currentDepth) { if (instance == null) { return(false); } var type = instance.GetType(); if (type.IsPrimitive || type.IsEnum) { builder.AddSingleValue(instance, instance.GetType()); return(true); } return(false); }