src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/DocumentExtensions.cs
/// <summary>
/// Debug only extension method to verify no errors were introduced by formatting, pretty listing and other related document altering service in error-free code.
/// </summary>
Debug only extension method to verify no errors were introduced by formatting, pretty listing and other related document altering service in error-free code.
Debug only extension method to verify no errors were introduced by formatting pretty listing and other related document altering service in error - free code .
public static async Task VerifyNoErrorsAsync(this Document newDocument, string message, CancellationToken cancellationToken, List<string>? ignoreErrorCodes = null)
        {
            var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false);
            if (errors.Length > 0)
            {
                var diagnostics = string.Join(", ", errors.Select(d => d.ToString()));
                Debug.Assert(false, message + ". " + diagnostics);
            }
        }
public static async Task VerifyNoErrorsAsync ( this Document newDocument , string message , CancellationToken cancellationToken , List < string > ? ignoreErrorCodes = null ) { var errors = await newDocument . GetErrorsAsync ( cancellationToken , ignoreErrorCodes ) . ConfigureAwait ( false ) ; if ( errors . Length > 0 ) { var diagnostics = string . Join ( " " , errors . Select ( d => d . ToString ( ) ) ) ; Debug . Assert ( false , message + " " + diagnostics ) ; } }
Debug only extension method to verify no errors were introduced by formatting, pretty listing and other related document altering service in error-free code.
Debug only extension method to verify no errors were introduced by formatting pretty listing and other related document altering service in error - free code .
Document
this
message
string
cancellationToken
CancellationToken
ignoreErrorCodes
List<string>?