File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class Hint
88{
99 private readonly SentryOptions ? _options ;
1010 private readonly List < Attachment > _attachments = new ( ) ;
11- private readonly Dictionary < string , object ? > _items = new ( ) ;
11+ private Dictionary < string , object ? > ? _items ;
1212
1313 /// <summary>
1414 /// Creates a new instance of <see cref="Hint"/>.
@@ -30,7 +30,7 @@ internal Hint(SentryOptions? options)
3030 public Hint ( string key , object ? value )
3131 : this ( )
3232 {
33- _items [ key ] = value ;
33+ Items [ key ] = value ;
3434 }
3535
3636 /// <summary>
@@ -49,7 +49,7 @@ public Hint(string key, object? value)
4949 /// These are not sent to Sentry, but rather they are available during processing, such as when using
5050 /// BeforeSend and others.
5151 /// </remarks>
52- public IDictionary < string , object ? > Items => _items ;
52+ public IDictionary < string , object ? > Items => _items ??= new Dictionary < string , object ? > ( ) ;
5353
5454 /// <summary>
5555 /// The Java SDK has some logic so that certain Hint types do not copy attachments from the Scope.
You can’t perform that action at this time.
0 commit comments