protected virtual TResult Transform(Expression expression)
 {
     return(expression switch
     {
         CallExpression call => Transform(call),
         ConstantExpression constant => Transform(constant),
         AccessorExpression accessor => Transform(accessor),
         AmbientPropertyExpression property => Transform(property),
         LambdaExpression lambda => Transform(lambda),
         ParameterExpression parameter => Transform(parameter),
         IndexerWildcardExpression wildcard => Transform(wildcard),
         ArrayExpression array => Transform(array),
         ObjectExpression obj => Transform(obj),
         IndexerExpression indexer => Transform(indexer),
         IndexOfMatchExpression match => Transform(match),
         null => throw new ArgumentNullException(nameof(expression)),
         // Non-exhaustive because `InternalsVisibleTo` is applied to the assembly.
         _ => throw new NotSupportedException($"{expression} is not supported.")
     });
 protected override Expression Transform(IndexerWildcardExpression wx)
 {
     return(wx);
 }
 protected override ExpressionBody Transform(IndexerWildcardExpression wx)
 {
     return(LX.Constant(null, typeof(LogEventPropertyValue)));
 }
 protected override IndexerExpression?Transform(IndexerWildcardExpression wx)
 {
     // Must be within an indexer
     return(null);
 }