Skip to content

Commit

Permalink
Add dynamic single-valued property support for filter expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
gathogojr committed Oct 30, 2024
1 parent 8ba84ea commit 17fc5d6
Show file tree
Hide file tree
Showing 9 changed files with 768 additions and 41 deletions.
59 changes: 58 additions & 1 deletion src/Microsoft.AspNetCore.OData/Microsoft.AspNetCore.OData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7703,6 +7703,11 @@
Looks up a localized string similar to The type '{0}' must be an enum or Nullable<T> where T is an enum type..
</summary>
</member>
<member name="P:Microsoft.AspNetCore.OData.SRResources.TypeMustBeOpenType">
<summary>
Looks up a localized string similar to The type &apos;{0}&apos; must be an open type. The dynamic properties container property is only expected on open types..
</summary>
</member>
<member name="P:Microsoft.AspNetCore.OData.SRResources.TypeMustBeRelated">
<summary>
Looks up a localized string similar to The type &apos;{0}&apos; does not inherit from and is not a base type of &apos;{1}&apos;..
Expand Down Expand Up @@ -9401,7 +9406,7 @@
<summary>
Gets property for dynamic properties dictionary.
</summary>
<param name="openNode"></param>
<param name="openNode">The single-valued open property access node.</param>
<param name="context">The query binder context.</param>
<returns>Returns CLR property for dynamic properties container.</returns>
</member>
Expand All @@ -9413,6 +9418,24 @@
<param name="context">The query binder context.</param>
<returns>Returns null if no aggregations were used so far</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.BindPropertyAccessExpression(Microsoft.OData.UriParser.SingleValueNode,System.Reflection.PropertyInfo,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Binds property to the source node.
</summary>
<param name="sourceNode">The source node.</param>
<param name="prop">The property.</param>
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.GetDynamicPropertyContainer(Microsoft.OData.Edm.IEdmTypeReference,Microsoft.OData.UriParser.QueryNodeKind,Microsoft.OData.Edm.IEdmModel)">
<summary>
Gets property for dynamic properties dictionary.
</summary>
<param name="edmTypeReference">The Edm type reference.</param>
<param name="queryNodeKind">Query node kind.</param>
<param name="model">The Edm model.</param>
<returns>Returns CLR property for dynamic properties container.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.ApplyNullPropagationForFilterBody(System.Linq.Expressions.Expression,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Apply null propagation for filter body.
Expand All @@ -9421,6 +9444,40 @@
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.BindDynamicPropertyAccessExpression(Microsoft.OData.UriParser.SingleValueOpenPropertyAccessNode,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Binds dynamic property to the source node.
</summary>
<param name="openNode">The query node to bind.</param>
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.CreateDynamicPropertyAccessExpression(System.Linq.Expressions.Expression,System.String,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Creates an expression for retrieving a dynamic property from the dynamic properties container property.
</summary>
<param name="dynamicPropertiesContainerExpr">The dynamic properties container property access expression.</param>
<param name="propertyName">The dynamic property name.</param>
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.BindNestedDynamicPropertyAccessExpression(Microsoft.OData.UriParser.SingleValueOpenPropertyAccessNode,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Binds nested dynamic property to the source node.
</summary>
<param name="openNode">The query node to bind.</param>
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.CreateNestedDynamicPropertyAccessExpression(System.Linq.Expressions.Expression,Microsoft.OData.UriParser.SingleValueOpenPropertyAccessNode,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Creates an expression for retrieving a nested dynamic property.
</summary>
<param name="sourceExpr">The source expression.</param>
<param name="openNode">The query node to bind.</param>
<param name="context">The query binder context.</param>
<returns>The LINQ <see cref="T:System.Linq.Expressions.Expression"/> created.</returns>
</member>
<member name="M:Microsoft.AspNetCore.OData.Query.Expressions.QueryBinder.BindSingleValueFunctionCallNode(Microsoft.OData.UriParser.SingleValueFunctionCallNode,Microsoft.AspNetCore.OData.Query.Expressions.QueryBinderContext)">
<summary>
Binds a <see cref="T:Microsoft.OData.UriParser.SingleValueFunctionCallNode"/> to create a LINQ <see cref="T:System.Linq.Expressions.Expression"/> that
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Microsoft.AspNetCore.OData/Properties/SRResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -745,4 +745,7 @@
<value>Unable to identify a unique property named '{0}'.</value>
<comment>{0} = Property Name</comment>
</data>
<data name="TypeMustBeOpenType" xml:space="preserve">
<value>The type '{0}' must be an open type. The dynamic properties container property is only expected on open types.</value>
</data>
</root>
Loading

0 comments on commit 17fc5d6

Please sign in to comment.