@@ -276,40 +276,39 @@ public class NativeSentryReplayOptions
276
276
internal HashSet < Type > MaskedControls { get ; } = [ ] ;
277
277
internal HashSet < Type > UnmaskedControls { get ; } = [ ] ;
278
278
279
- internal bool IsCustomMaskingEnabled { get ; private set ; }
280
-
281
279
internal bool IsSessionReplayEnabled => OnErrorSampleRate > 0.0 || SessionSampleRate > 0.0 ;
282
280
281
+ /// <summary>
282
+ /// Allows you to mask all controls of a particular type for session replay recordings.
283
+ /// </summary>
284
+ /// <typeparam name="T">The Type of control that should be masked</typeparam>
285
+ /// <remarks>
286
+ /// WARNING: In apps with complex user interfaces, consisting of hundreds of visual controls on a single
287
+ /// page, this option may cause performance issues. In such cases, consider applying SessionReplay.Mask
288
+ /// attributes to individual controls instead:
289
+ /// <code>sentry:SessionReplay.Mask="Mask"</code>
290
+ /// </remarks>
283
291
public void MaskControlsOfType < T > ( )
284
292
{
285
293
MaskedControls . Add ( typeof ( T ) ) ;
286
294
}
287
295
288
- public void UnmaskControlsOfType < T > ( )
289
- {
290
- UnmaskedControls . Add ( typeof ( T ) ) ;
291
- }
292
-
293
296
/// <summary>
294
- /// <para>
295
- /// The <see cref="MaskAllImages"/> and <see cref="MaskAllText"/> and <see cref="MaskControlsOfType"/>
296
- /// options allow you to set the default masking behaviour for all visual elements of certain types.
297
- /// </para>
298
- /// <para>
299
- /// This option enables the use of `sentry:SessionReplay.Mask` attributes to override the masking behaviour
300
- /// of specific visual elemennts (for example masking a specific image even though images more generally are
301
- /// not masked).
302
- /// </para>
297
+ /// Allows you to unmask all controls of a particular type for session replay recordings.
298
+ /// </summary>
299
+ /// <typeparam name="T">The Type of control that should be unmasked</typeparam>
303
300
/// <remarks>
304
301
/// WARNING: In apps with complex user interfaces, consisting of hundreds of visual controls on a single
305
- /// page, enabling this option may cause performance issues.
302
+ /// page, this option may cause performance issues. In such cases, consider applying SessionReplay.Mask
303
+ /// attributes to individual controls instead:
304
+ /// <code>sentry:SessionReplay.Mask="Unmask"</code>
306
305
/// </remarks>
307
- /// </summary>
308
- public NativeSentryReplayOptions EnableCustomSessionReplayMasks ( )
306
+ public void UnmaskControlsOfType < T > ( )
309
307
{
310
- IsCustomMaskingEnabled = true ;
311
- return this ;
308
+ UnmaskedControls . Add ( typeof ( T ) ) ;
312
309
}
310
+
311
+ internal bool IsTypeMaskingUsed => MaskedControls . Count > 0 || UnmaskedControls . Count > 0 ;
313
312
}
314
313
315
314
/// <summary>
0 commit comments