Redactor.TryRedact<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to redact potentially sensitive data.
public bool TryRedact<T> (T value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider = default);
member this.TryRedact : 'T * Span<char> * int * ReadOnlySpan<char> * IFormatProvider -> bool
Public Function TryRedact(Of T) (value As T, destination As Span(Of Char), ByRef charsWritten As Integer, format As ReadOnlySpan(Of Char), Optional provider As IFormatProvider = Nothing) As Boolean
Type Parameters
- T
The type of value to redact.
Parameters
- value
- T
The value to redact.
- charsWritten
- Int32
When this method returns, contains the number of redacted characters that were written to the destination buffer.
- format
- ReadOnlySpan<Char>
The format string that selects the specific formatting operation performed. Refer to the documentation of the type being formatted to understand the values you can supply here.
- provider
- IFormatProvider
The format provider used to produce a string representing the value.
Returns
true
if the destination buffer was large enough, otherwise false
.