Skip to content

ODL9: Cherry-pick - Add ShouldReadPropertyAsStream API to allow access to property annotations#3488

Open
WanjohiSammy wants to merge 2 commits intodev-9.xfrom
cherrypick/2f80bcedc36e05b2d68f9dfa484643ec62a6d89b
Open

ODL9: Cherry-pick - Add ShouldReadPropertyAsStream API to allow access to property annotations#3488
WanjohiSammy wants to merge 2 commits intodev-9.xfrom
cherrypick/2f80bcedc36e05b2d68f9dfa484643ec62a6d89b

Conversation

@WanjohiSammy
Copy link
Copy Markdown
Member

Issues

This pull request fixes #xxx.

Description

Cherry-pick: fad37ae

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

Additional work necessary

If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.

Repository notes

Team members can start a CI build by adding a comment with the text /AzurePipelines run to a PR. A bot may respond indicating that there is no pipeline associated with the pull request. This can be ignored if the build is triggered.

Team members should not trigger a build this way for pull requests coming from forked repositories. They should instead trigger the build manually by setting the "branch" to refs/pull/{prId}/merge where {prId} is the ID of the PR.

…tions (#3477)

* Add ShouldReadPropertyAsStream and depracate ReadAsStreamFunc

---------

Co-authored-by: John Gathogo <john.gathogo@gmail.com>
@WanjohiSammy
Copy link
Copy Markdown
Member Author

/AzurePipelines run

1 similar comment
@WanjohiSammy
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@WanjohiSammy
Copy link
Copy Markdown
Member Author

/AzurePipelines run

1 similar comment
@WanjohiSammy
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@WanjohiSammy WanjohiSammy force-pushed the cherrypick/2f80bcedc36e05b2d68f9dfa484643ec62a6d89b branch from 2492cf6 to d27fc46 Compare January 20, 2026 08:53
@WanjohiSammy
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@WanjohiSammy WanjohiSammy marked this pull request as ready for review January 20, 2026 09:32
ODataPropertyStreamingContext propertyReadingContext = new ODataPropertyStreamingContext
{
PrimitiveType = primitiveType,
IsCollection = false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IsCollection, PropertyName ... are hardcoded, It seems no sense?
We don't have the IEdmProperty for the declared property reading?

[Obsolete("Use 'ShouldReadPropertyAsStream' instead, which provides access to property annotations. ReadAsStreamFunc will be removed in a future ODL 9 release.")]
public Func<IEdmPrimitiveType, bool, string, IEdmProperty, bool> ReadAsStreamFunc { get; set; }

/// <summary>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we consider to make it as a service into the DI?

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.

2 participants