Skip to content

Commit

Permalink
fix based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizabethOkerio committed Aug 7, 2023
1 parent 24c4987 commit 99a7a2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,19 @@ internal static ResourceSetContext Create(ODataSerializerContext writeContext, I
/// <summary>
/// Create a <see cref="ResourceSetContext"/> from an <see cref="ODataSerializerContext"/> and <see cref="IAsyncEnumerable{T}"/>.
/// </summary>
/// <param name="resourceSetInstance">The instance representing the resourceSet being written.</param>
/// <param name="writeContext">The serializer context.</param>
/// <param name="resourceSetInstance">The instance representing the resourceSet being written.</param>
/// <returns>A new <see cref="ResourceSetContext"/>.</returns>
/// <remarks>This signature uses types that are AspNetCore-specific.</remarks>
internal static ResourceSetContext Create(ODataSerializerContext writeContext, IAsyncEnumerable<object> resourceSetInstance)
{
ResourceSetContext resourceSetContext = new ResourceSetContext
return new ResourceSetContext
{
Request = writeContext.Request,
EntitySetBase = writeContext.NavigationSource as IEdmEntitySetBase,
// Url = writeContext.Url,
ResourceSetInstance = resourceSetInstance
};

return resourceSetContext;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private async Task WriteResourceSetAsync(IEnumerable enumerable, IEdmTypeReferen
{
lastResource = item;

await WriteResourceEntryAsync(item, elementType, isUntypedCollection, resourceSetType, writer, resourceSerializer, writeContext);
await WriteResourceSetItemAsync(item, elementType, isUntypedCollection, resourceSetType, writer, resourceSerializer, writeContext);
}

// Subtle and surprising behavior: If the NextPageLink property is set before calling WriteStart(resourceSet),
Expand Down Expand Up @@ -176,7 +176,7 @@ private async Task WriteResourceSetAsync(IAsyncEnumerable<object> asyncEnumerabl
{
lastResource = item;

await WriteResourceEntryAsync(item, elementType, isUntypedCollection, resourceSetType, writer, resourceSerializer, writeContext);
await WriteResourceSetItemAsync(item, elementType, isUntypedCollection, resourceSetType, writer, resourceSerializer, writeContext);
}

// Subtle and surprising behavior: If the NextPageLink property is set before calling WriteStart(resourceSet),
Expand Down Expand Up @@ -228,7 +228,7 @@ private void WriteResourceSetInternal(
resourceSet.NextPageLink = null;
}

private async Task WriteResourceEntryAsync(
private async Task WriteResourceSetItemAsync(
object item,
IEdmStructuredTypeReference elementType,
bool isUntypedCollection,
Expand Down Expand Up @@ -491,7 +491,7 @@ public virtual ODataResourceSet CreateResourceSet(IAsyncEnumerable<object> resou
return resourceSet;
}

internal void WriteEntityTypeOperations(
private void WriteEntityTypeOperations(
ODataResourceSet resourceSet,
ResourceSetContext resourceSetContext,
IEdmStructuredTypeReference structuredType,
Expand All @@ -514,7 +514,7 @@ internal void WriteEntityTypeOperations(
}
}

internal void ApplyODataResourceSetAnnotations(
private void ApplyODataResourceSetAnnotations(
ODataResourceSet resourceSet,
PageResult odataResourceSetAnnotations,
ODataSerializerContext writeContext)
Expand Down

0 comments on commit 99a7a2e

Please sign in to comment.