Skip to content

Commit

Permalink
Convert record to class
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbonk committed Nov 18, 2023
1 parent 0686959 commit 051b116
Showing 1 changed file with 15 additions and 1 deletion.
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

0 comments on commit 051b116

Please sign in to comment.