Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Convert record to class
  • Loading branch information
bitbonk committed Nov 18, 2023
commit 051b116e2ca841d147606f490ed98fcbdeab5190
16 changes: 15 additions & 1 deletion LogRedactionDemo.SimpleWorker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,21 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
}
}

public record User(string Id, [PersonalData] string Name, [PersonalData] string Email);
public class User
{
public User(string Id, string Name, string Email)
{
this.Id = Id;
this.Name = Name;
this.Email = Email;
}

public string Id { get; }

[PersonalData] public string Name { get; }

[PersonalData] public string Email { get; }
}

// logging code that logs the user
public static partial class Log
Expand Down