Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #35 from getsentry/ref/user-other-mut
Browse files Browse the repository at this point in the history
ref: make user.other mutable
  • Loading branch information
bruno-garcia authored May 1, 2019
2 parents d61e2ee + fe2f333 commit 1e6346e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Sentry.Protocol/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,15 @@ public class User
public string Username { get; set; }

[DataMember(Name = "other", EmitDefaultValue = false)]
internal Dictionary<string, string> InternalOther;
internal IDictionary<string, string> InternalOther;

/// <summary>
/// Additional informations about the user
/// Additional information about the user
/// </summary>
/// <value>
/// Additional informations about the user
/// </value>
public IReadOnlyDictionary<string, string> Other
public IDictionary<string, string> Other
{
get => InternalOther ?? (InternalOther = new Dictionary<string, string>());
set => InternalOther = value.ToDictionary(entry => entry.Key,
entry => entry.Value);
set => InternalOther = value;
}

public User Clone()
Expand Down

0 comments on commit 1e6346e

Please sign in to comment.