Skip to content

Commit

Permalink
Change the default of label colors
Browse files Browse the repository at this point in the history
  • Loading branch information
MoaidHathot committed Jul 17, 2023
1 parent ca55d27 commit a7d6250
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
26 changes: 25 additions & 1 deletion src/Dumpify.Playground/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void TestSpecific()
// Ctor2 = typeof(Person2).GetConstructors().First(),
//}.Dump("This is a test");

typeof(Person).Dump();
typeof(Person).Dump("this is a type");
new
{
Properties = typeof(Person).GetProperties(),
Expand Down Expand Up @@ -353,6 +353,30 @@ void ShowEverything()
//var result = DumpConfig.Default.Generator.Generate(family.GetType(), null);

//JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
//


typeof(Person).Dump();
new
{
Properties = typeof(Person).GetProperties(),
Methods = typeof(Person).GetMethods(),
Fields = typeof(Person).GetFields(),
Ctors = typeof(Person).GetConstructors(),
//Members = typeof(Person).GetMembers(),
FooGuid = Guid.NewGuid(),
Enum = Profession.Health,
TimeSpan = TimeSpan.MinValue,
DateTime = DateTime.Now,
DateTimeOffset = DateTimeOffset.Now,
DateOnly = DateOnly.FromDateTime(DateTime.Now),
TimeOnly = TimeOnly.FromDateTime(DateTime.Now),

}.Dump("Person");

DateTime.Now.Dump("DT");
Guid.NewGuid().Dump("Guid");
Guid.NewGuid().Dump();
}
#pragma warning restore CS8321

Expand Down
20 changes: 10 additions & 10 deletions src/Dumpify/Config/ColorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ namespace Dumpify;

public class ColorConfig : IColorConfig<DumpColor>
{
public static DumpColor? DefaultTypeNameColor { get; } = new (Color.White);
public static DumpColor? DefaultColumnNameColor { get; } = new ("#87D7D7");
public static DumpColor? DefaultTypeNameColor { get; } = new(Color.White);
public static DumpColor? DefaultColumnNameColor { get; } = new("#87D7D7");
public static DumpColor? DefaultPropertyNameColor { get; } = null;
public static DumpColor? DefaultPropertyValueColor { get; } = new ("#D7D787");
public static DumpColor? DefaultNullValueColor { get; } = new ("#87D7D7");
public static DumpColor? DefaultPropertyValueColor { get; } = new("#D7D787");
public static DumpColor? DefaultNullValueColor { get; } = new("#87D7D7");
public static DumpColor? DefaultIgnoredValueColor { get; } = null;
public static DumpColor? DefaultMetadataInfoColor { get; } = new ("#87D7D7");
public static DumpColor? DefaultMetadataErrorColor { get; } = new ("#D78700");
public static DumpColor? DefaultLabelValueColor { get; } = new ("#87D7D7");
public static DumpColor? DefaultMetadataInfoColor { get; } = new("#87D7D7");
public static DumpColor? DefaultMetadataErrorColor { get; } = new("#D78700");
public static DumpColor? DefaultLabelValueColor { get; } = new("#d7afd7");

public DumpColor? TypeNameColor { get; set; } = DefaultTypeNameColor;
public DumpColor? ColumnNameColor { get; set; } = DefaultColumnNameColor;
Expand All @@ -24,8 +24,8 @@ public class ColorConfig : IColorConfig<DumpColor>
public DumpColor? MetadataErrorColor { get; set; } = DefaultMetadataErrorColor;
public DumpColor? LabelValueColor { get; set; } = DefaultLabelValueColor;

public static ColorConfig DefaultColors => new ();
public static ColorConfig NoColors => new (null);
public static ColorConfig DefaultColors => new();
public static ColorConfig NoColors => new(null);

public ColorConfig(DumpColor? value)
{
Expand All @@ -44,4 +44,4 @@ public ColorConfig()
{

}
}
}

0 comments on commit a7d6250

Please sign in to comment.