[source,csharp]
----
class EnclosingType
{
    private readonly ILogger logger;

    EnclosingType(ILoggerFactory loggerFactory)
    {
        logger = loggerFactory.CreateLogger("My cross-type logging category");   // Compliant
        logger = loggerFactory.CreateLogger(AComplexLogicToFindTheRightType());  // Compliant
    }
}
----
