protected void ReportMissingCodeTargetExtension <TDependency>(CodeRenderingContext context)
    {
        if (context == null)
        {
            throw new ArgumentNullException(nameof(context));
        }

        var documentKind = context.DocumentKind ?? string.Empty;

        context.Diagnostics.Add(
            RazorDiagnosticFactory.CreateCodeTarget_UnsupportedExtension(
                documentKind,
                typeof(TDependency)));
    }