Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<!-- Internal tooling from the Azure Development Feed -->
<TestProxyVersion>1.0.0-dev.20260128.1</TestProxyVersion>
<UnbrandedGeneratorVersion>1.0.0-alpha.20260212.3</UnbrandedGeneratorVersion>
<UnbrandedGeneratorVersion>1.0.0-alpha.20260212.5</UnbrandedGeneratorVersion>
<AzureGeneratorVersion>1.0.0-alpha.20260209.2</AzureGeneratorVersion>

<!-- Legacy package use only -->
Expand Down
8 changes: 4 additions & 4 deletions eng/http-client-csharp-emitter-package-lock.json

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

2 changes: 1 addition & 1 deletion eng/http-client-csharp-emitter-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"main": "dist/src/index.js",
"dependencies": {
"client-plugin": "file:../../../../eng/packages/plugins/client",
"@typespec/http-client-csharp": "1.0.0-alpha.20260212.3"
"@typespec/http-client-csharp": "1.0.0-alpha.20260212.5"
},
"devDependencies": {
"@azure-tools/typespec-client-generator-core": "0.64.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ private MethodBodyStatement[] BuildAsPagesMethodBody()
Declare("result", ResponseModelType, responseVariable.CastTo(ResponseModelType), out var resultVariable),
};

var nextPageExpression = _paging.NextLink != null ? nextPageVariable.NullConditional().Property("AbsoluteUri") : nextPageVariable;
ValueExpression nextPageExpression = _paging.NextLink != null
? new TernaryConditionalExpression(
nextPageVariable.NullConditional().Property(nameof(Uri.IsAbsoluteUri)).Equal(True),
nextPageVariable.Property(nameof(Uri.AbsoluteUri)),
nextPageVariable.NullConditional().Property(nameof(Uri.OriginalString)))
: nextPageVariable;
if (_isProtocol)
{
// Convert items to BinaryData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, int? m
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, int ma
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, global
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public CatClientGetCatsAsyncCollectionResult(global::Samples.CatClient client, g
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public CatClientGetCatsCollectionResultOfT(global::Samples.CatClient client, glo
yield break;
}
global::Samples.Models.Page result = ((global::Samples.Models.Page)response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Samples.CatClient client
yield break;
}
global::Samples.Models.Page result = ((global::Samples.Models.Page)response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
nextPage = result.NextCat;
if ((nextPage == null))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ public CatClientGetCatsCollectionResultOfT(global::Samples.CatClient client, glo
yield break;
}
global::Samples.Models.Page result = ((global::Samples.Models.Page)response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
string nextPageString = result.NextCat;
if (string.IsNullOrEmpty(nextPageString))
{
yield break;
}
nextPage = new global::System.Uri(nextPageString);
nextPage = new global::System.Uri(nextPageString, global::System.UriKind.RelativeOrAbsolute);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, global
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
string nextPageString = result.NextCat;
if (string.IsNullOrEmpty(nextPageString))
{
yield break;
}
nextPage = new global::System.Uri(nextPageString);
nextPage = new global::System.Uri(nextPageString, global::System.UriKind.RelativeOrAbsolute);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, global
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
if ((response.Headers.TryGetValue("nextCat", out string value) && !string.IsNullOrEmpty(value)))
{
nextPage = new global::System.Uri(value);
nextPage = new global::System.Uri(value, global::System.UriKind.RelativeOrAbsolute);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public CatClientGetCatsAsyncCollectionResult(global::Samples.CatClient client, g
{
items.Add(global::System.ClientModel.Primitives.ModelReaderWriter.Write(item, global::Samples.ModelSerializationExtensions.WireOptions, global::Samples.SamplesContext.Default));
}
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::System.BinaryData>.FromValues(items, (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
if ((response.Headers.TryGetValue("nextCat", out string value) && !string.IsNullOrEmpty(value)))
{
nextPage = new global::System.Uri(value);
nextPage = new global::System.Uri(value, global::System.UriKind.RelativeOrAbsolute);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public CatClientGetCatsCollectionResultOfT(global::Samples.CatClient client, glo
yield break;
}
global::Samples.Models.Page result = ((global::Samples.Models.Page)response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
if ((response.Headers.TryGetValue("nextCat", out string value) && !string.IsNullOrEmpty(value)))
{
nextPage = new global::System.Uri(value);
nextPage = new global::System.Uri(value, global::System.UriKind.RelativeOrAbsolute);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public CatClientGetCatsAsyncCollectionResultOfT(global::Samples.CatClient client
yield break;
}
global::Samples.Models.Page result = ((global::Samples.Models.Page)response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), nextPage?.AbsoluteUri, response);
yield return global::Azure.Page<global::Samples.Models.Cat>.FromValues(((global::System.Collections.Generic.IReadOnlyList<global::Samples.Models.Cat>)result.Cats), (nextPage?.IsAbsoluteUri == true) ? nextPage.AbsoluteUri : nextPage?.OriginalString, response);
if ((response.Headers.TryGetValue("nextCat", out string value) && !string.IsNullOrEmpty(value)))
{
nextPage = new global::System.Uri(value);
nextPage = new global::System.Uri(value, global::System.UriKind.RelativeOrAbsolute);
}
else
{
Expand Down

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

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

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

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

Loading
Loading