Redactor.Redact 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.
Overloads
Redact(ReadOnlySpan<Char>) |
Redacts potentially sensitive data. |
Redact(String) |
Redacts potentially sensitive data. |
Redact(ReadOnlySpan<Char>, Span<Char>) |
Redacts potentially sensitive data. |
Redact(String, Span<Char>) |
Redacts potentially sensitive data. |
Redact<T>(T, String, IFormatProvider) |
Redacts potentially sensitive data. |
Redact<T>(T, Span<Char>, String, IFormatProvider) |
Redacts potentially sensitive data. |
Redact(ReadOnlySpan<Char>)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public:
System::String ^ Redact(ReadOnlySpan<char> source);
public string Redact (ReadOnlySpan<char> source);
member this.Redact : ReadOnlySpan<char> -> string
Public Function Redact (source As ReadOnlySpan(Of Char)) As String
Parameters
- source
- ReadOnlySpan<Char>
Value to redact.
Returns
Redacted value.
Applies to
Redact(String)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public:
virtual System::String ^ Redact(System::String ^ source);
public virtual string Redact (string? source);
abstract member Redact : string -> string
override this.Redact : string -> string
Public Overridable Function Redact (source As String) As String
Parameters
- source
- String
Value to redact.
Returns
Redacted value.
Exceptions
source
is null
.
Remarks
Returns an empty string when source
is null
.
Applies to
Redact(ReadOnlySpan<Char>, Span<Char>)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public:
abstract int Redact(ReadOnlySpan<char> source, Span<char> destination);
public abstract int Redact (ReadOnlySpan<char> source, Span<char> destination);
abstract member Redact : ReadOnlySpan<char> * Span<char> -> int
Public MustOverride Function Redact (source As ReadOnlySpan(Of Char), destination As Span(Of Char)) As Integer
Parameters
- source
- ReadOnlySpan<Char>
Value to redact.
Returns
Number of characters produced when redacting the given source input.
Exceptions
destination
is too small.
Applies to
Redact(String, Span<Char>)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public:
int Redact(System::String ^ source, Span<char> destination);
public int Redact (string? source, Span<char> destination);
member this.Redact : string * Span<char> -> int
Public Function Redact (source As String, destination As Span(Of Char)) As Integer
Parameters
- source
- String
Value to redact.
Returns
Number of characters written to the buffer.
Exceptions
destination
is too small.
Remarks
Returns 0 when source
is null
.
Applies to
Redact<T>(T, String, IFormatProvider)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public string Redact<T> (T value, string? format = default, IFormatProvider? provider = default);
member this.Redact : 'T * string * IFormatProvider -> string
Public Function Redact(Of T) (value As T, Optional format As String = Nothing, Optional provider As IFormatProvider = Nothing) As String
Type Parameters
- T
Type of value to redact.
Parameters
- value
- T
Value to redact.
- format
- String
The optional format 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
Format provider used to produce a string representing the value.
Returns
Redacted value.
Exceptions
value
is null
.
Applies to
Redact<T>(T, Span<Char>, String, IFormatProvider)
- Source:
- Redactor.cs
Redacts potentially sensitive data.
public int Redact<T> (T value, Span<char> destination, string? format = default, IFormatProvider? provider = default);
member this.Redact : 'T * Span<char> * string * IFormatProvider -> int
Public Function Redact(Of T) (value As T, destination As Span(Of Char), Optional format As String = Nothing, Optional provider As IFormatProvider = Nothing) As Integer
Type Parameters
- T
Type of value to redact.
Parameters
- value
- T
Value to redact.
- format
- String
The optional 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
Format provider used to produce a string representing the value.
Returns
Number of characters written to the buffer.
Exceptions
value
is null
.
destination
is too small.