@@ -276,40 +276,39 @@ public class NativeSentryReplayOptions
276276 internal HashSet < Type > MaskedControls { get ; } = [ ] ;
277277 internal HashSet < Type > UnmaskedControls { get ; } = [ ] ;
278278
279- internal bool IsCustomMaskingEnabled { get ; private set ; }
280-
281279 internal bool IsSessionReplayEnabled => OnErrorSampleRate > 0.0 || SessionSampleRate > 0.0 ;
282280
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>
283291 public void MaskControlsOfType < T > ( )
284292 {
285293 MaskedControls . Add ( typeof ( T ) ) ;
286294 }
287295
288- public void UnmaskControlsOfType < T > ( )
289- {
290- UnmaskedControls . Add ( typeof ( T ) ) ;
291- }
292-
293296 /// <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>
303300 /// <remarks>
304301 /// 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>
306305 /// </remarks>
307- /// </summary>
308- public NativeSentryReplayOptions EnableCustomSessionReplayMasks ( )
306+ public void UnmaskControlsOfType < T > ( )
309307 {
310- IsCustomMaskingEnabled = true ;
311- return this ;
308+ UnmaskedControls . Add ( typeof ( T ) ) ;
312309 }
310+
311+ internal bool IsTypeMaskingUsed => MaskedControls . Count > 0 || UnmaskedControls . Count > 0 ;
313312 }
314313
315314 /// <summary>
0 commit comments