sdk/dotnet/test/Microsoft.Datasync.Client.Test/Table/Operations.RemoteTable/GetAsyncItems.Test.cs
/// <summary>
/// Creates a paging response with JObjects.
/// </summary>
/// <param name="count"></param>
/// <param name="totalCount"></param>
/// <param name="nextLink"></param>
/// <returns></returns>
Creates a paging response with JObjects.
Creates a paging response with JObjects .
private Page<JObject> CreatePageOfJsonItems(int count, long? totalCount = null, Uri nextLink = null)
        {
            List<JObject> items = new();
            List<IdEntity> entities = new();
            for (int i = 0; i < count; i++)
            {
                var entity = new IdEntity { Id = Guid.NewGuid().ToString("N"), StringValue = $"Item #{i}" };
                items.Add(CreateJsonDocument(entity));
                entities.Add(entity);
            }
            MockHandler.AddResponse(HttpStatusCode.OK, new Page<IdEntity> { Items = entities, Count = totalCount, NextLink = nextLink });
            return new Page<JObject> { Items = items, Count = totalCount, NextLink = nextLink };
        }
private Page < JObject > CreatePageOfJsonItems ( int count , long ? totalCount = null , Uri nextLink = null ) { List < JObject > items = new ( ) ; List < IdEntity > entities = new ( ) ; for ( int i = 0 ; i < count ; i ++ ) { var entity = new IdEntity { Id = Guid . NewGuid ( ) . ToString ( " " ) , StringValue = $" Item # { i } " } ; items . Add ( CreateJsonDocument ( entity ) ) ; entities . Add ( entity ) ; } MockHandler . AddResponse ( HttpStatusCode . OK , new Page < IdEntity > { Items = entities , Count = totalCount , NextLink = nextLink } ) ; return new Page < JObject > { Items = items , Count = totalCount , NextLink = nextLink } ; }
Creates a paging response with JObjects.
Creates a paging response with JObjects .
None
count
int
None
totalCount
long?
None
nextLink
Uri
None