Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSHARP-5474: Move newOutputSerializer parameter to AddStages to the end of the parameter list. #1600

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rstam
Copy link
Contributor

@rstam rstam commented Jan 25, 2025

No description provided.

@rstam rstam requested a review from sanych-sun January 25, 2025 18:17
@rstam rstam requested a review from a team as a code owner January 25, 2025 18:17
@@ -43,7 +43,7 @@ public static TranslatedPipeline Translate(TranslationContext context, MethodCal
var resultType = method.GetGenericArguments()[1];
var outputSerializer = resultSerializer ?? BsonSerializer.LookupSerializer(resultType);

pipeline = pipeline.AddStages(outputSerializer, newStages: Array.Empty<AstStage>());
pipeline = pipeline.WithNewOutputSerializer(outputSerializer);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding zero stages was a stricky way to replace the output serializer. Better to have a method for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant