ShaderTools.Hlsl.Diagnostics.Diagnostic.Format C# (CSharp) Method

Format() public static method

public static Format ( TextSpan textSpan, DiagnosticId diagnosticId ) : Diagnostic
textSpan TextSpan
diagnosticId DiagnosticId
return Diagnostic
        public static Diagnostic Format(TextSpan textSpan, DiagnosticId diagnosticId, params object[] args)
        {
            var message = diagnosticId.GetMessage();
            var formattedMessage = (message != null)
                ? string.Format(CultureInfo.CurrentCulture, message, args)
                : $"Missing diagnostic message for {diagnosticId}";
            return new Diagnostic(textSpan, diagnosticId, formattedMessage);
        }
    }