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

Make internal SelectExpandBinder methods public #840

Open
wants to merge 1 commit into
base: release-8.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public SelectExpandBinder(IFilterBinder filterBinder, IOrderByBinder orderByBind
/// <summary>
/// For unit test only.
/// </summary>
internal SelectExpandBinder()
public SelectExpandBinder()
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to make this method public since it's only used internally with some tests.

: this(new FilterBinder(), new OrderByBinder())
{ }

Expand Down Expand Up @@ -89,7 +89,7 @@ public virtual Expression BindSelectExpand(SelectExpandClause selectExpandClause
return projectionLambdaExpression;
}

internal Expression ProjectAsWrapper(QueryBinderContext context, Expression source, SelectExpandClause selectExpandClause,
public Expression ProjectAsWrapper(QueryBinderContext context, Expression source, SelectExpandClause selectExpandClause,
Copy link
Contributor

Choose a reason for hiding this comment

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

Make method virtual and add docstrings.

IEdmStructuredType structuredType, IEdmNavigationSource navigationSource, OrderByClause orderByClause = null,
ComputeClause computeClause = null,
long? topOption = null,
Expand Down Expand Up @@ -336,7 +336,7 @@ public class Child : Father

// Generates the expression
// source => new Wrapper { Instance = source, Container = new PropertyContainer { ..expanded properties.. } }
internal Expression ProjectElement(QueryBinderContext context, Expression source, SelectExpandClause selectExpandClause, IEdmStructuredType structuredType, IEdmNavigationSource navigationSource)
public Expression ProjectElement(QueryBinderContext context, Expression source, SelectExpandClause selectExpandClause, IEdmStructuredType structuredType, IEdmNavigationSource navigationSource)
Copy link
Contributor

Choose a reason for hiding this comment

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

Make method virtual and add docstrings.

{
Contract.Assert(source != null);

Expand Down Expand Up @@ -476,7 +476,7 @@ private static bool ParseComputedDynamicProperties(QueryBinderContext context, I
/// <param name="propertiesToExpand">The out properties to expand at current level, could be null.</param>
/// <param name="autoSelectedProperties">The out auto selected properties to include at current level, could be null.</param>
/// <returns>true if the select contains dynamic property selection, false if it's not.</returns>
internal static IList<DynamicPathSegment> GetSelectExpandProperties(IEdmModel model, IEdmStructuredType structuredType, IEdmNavigationSource navigationSource,
public static IList<DynamicPathSegment> GetSelectExpandProperties(IEdmModel model, IEdmStructuredType structuredType, IEdmNavigationSource navigationSource,
Copy link
Contributor

Choose a reason for hiding this comment

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

This method is static and cannot be overriden. How do you plan to use it?

SelectExpandClause selectExpandClause,
out IDictionary<IEdmStructuralProperty, PathSelectItem> propertiesToInclude,
out IDictionary<IEdmNavigationProperty, ExpandedReferenceSelectItem> propertiesToExpand,
Expand Down Expand Up @@ -829,7 +829,7 @@ private Expression BuildPropertyContainer(QueryBinderContext context, Expression
/// <param name="navigationProperty">The expanded navigation property.</param>
/// <param name="expandedItem">The expanded navigation select item. It may contain the nested query options.</param>
/// <param name="includedProperties">The container to hold the created property.</param>
internal void BuildExpandedProperty(QueryBinderContext context, Expression source, IEdmStructuredType structuredType,
public void BuildExpandedProperty(QueryBinderContext context, Expression source, IEdmStructuredType structuredType,
Copy link
Contributor

Choose a reason for hiding this comment

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

Make method virtual.

IEdmNavigationProperty navigationProperty, ExpandedReferenceSelectItem expandedItem,
IList<NamedPropertyExpression> includedProperties)
{
Expand Down Expand Up @@ -909,7 +909,7 @@ internal void BuildExpandedProperty(QueryBinderContext context, Expression sourc
/// <param name="structuralProperty">The selected structural property.</param>
/// <param name="pathSelectItem">The selected item. It may contain the nested query options and could be null.</param>
/// <param name="includedProperties">The container to hold the created property.</param>
internal void BuildSelectedProperty(QueryBinderContext context, Expression source, IEdmStructuredType structuredType,
public void BuildSelectedProperty(QueryBinderContext context, Expression source, IEdmStructuredType structuredType,
Copy link
Contributor

Choose a reason for hiding this comment

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

Make method virtual.

IEdmStructuralProperty structuralProperty, PathSelectItem pathSelectItem,
IList<NamedPropertyExpression> includedProperties)
{
Expand Down