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

List initializer inside object initializer breaks poorly #802

Closed
shocklateboy92 opened this issue Jan 23, 2023 · 0 comments · Fixed by #822
Closed

List initializer inside object initializer breaks poorly #802

shocklateboy92 opened this issue Jan 23, 2023 · 0 comments · Fixed by #822
Milestone

Comments

@shocklateboy92
Copy link
Collaborator

shocklateboy92 commented Jan 23, 2023

Here's a repro case:

var payload = new InlinePayloadConfiguration { Resources = new IBaseDocument[]
    {
        ProductDocumentMapper.MapProductDocument(pcd),
        ProductCoreDisplayMapper.MapProductCoreDisplaySubDocument(pcd),
        ResourceSetIds.MapResourceSetIdsSubDocument(pcd),
        ProductMetadataMapper.MapProductMetadataSubDocument(pcd),
        ProductSearch.MapProductSearchSubDocument(pcd),
        new LocalizationSubDocument
        {
            Schema = Schema.GetUriForModel(nameof(LocalizationSubDocument)),
            DocumentId = Guid.NewGuid(),
            ProductDocumentId = pcd.ProductId,
            // There is supposed to be one of these per market, with all the languages for that market
            Cultures = pcd.Core.Product.LocalizedProperties.Select(loc => loc.Language).ToArray()
        },
        TaxTypeMapper.MapTaxTypeSubDocument(pcd)
    }.Concat(ClientDisplaySkuLocalizedProperties.MapClientDisplaySkuLocalizedProperties(pcd)).Concat(AvailabilityMapper.MapAvailabilities(pcd)).Concat(TaxCode.MapTaxCodeSubDocuments(pcd)).Concat(SkuDeliveryDataOverlayMapper.MapSkuDeliveryDataOverlaySubDocument(pcd)).Concat(PaymentInstrumentMapper.MapPaymentInstrumentSubDocuments(pcd)).ToArray() };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants