Граф коммитов

1848 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 5d082107b0
Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.7.0 (#1550)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.2 to 17.7.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.6.2...v17.7.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 07:50:07 +01:00
dependabot[bot] 507f758bfa
Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 (#1533)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.5 to 2.5.0.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/v2.4.5...2.5.0)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 01:40:43 +01:00
dependabot[bot] 1d4191ab31
Bump xunit from 2.4.2 to 2.5.0 (#1534)
Bumps [xunit](https://github.com/xunit/xunit) from 2.4.2 to 2.5.0.
- [Commits](https://github.com/xunit/xunit/compare/2.4.2...2.5.0)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 03:44:23 +01:00
dependabot[bot] ee3119974b
Bump BenchmarkDotNet from 0.13.5 to 0.13.6 (#1539)
Bumps [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet) from 0.13.5 to 0.13.6.
- [Release notes](https://github.com/dotnet/BenchmarkDotNet/releases)
- [Commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.5...v0.13.6)

---
updated-dependencies:
- dependency-name: BenchmarkDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 03:03:38 +01:00
Ani Betts bb88e19577
bump 2023-07-11 05:21:42 -04:00
Keith Dahlby 6a16c08df8
Rethrow for Better Stack Trace (#1532)
* Drop a trailing space

* Rethrow exception from generated method

* Generate async methods so throw actually helps
2023-07-07 11:39:26 -04:00
Ani Betts 4744780644
Ship 7.0.0 2023-06-29 14:20:14 -04:00
dependabot[bot] a50c8ae4c4
Bump System.Text.Json from 7.0.2 to 7.0.3 (#1523)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 00:14:38 +01:00
dependabot[bot] dd1eebf477
Bump Microsoft.NET.Test.Sdk from 17.6.0 to 17.6.2 (#1520)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.0 to 17.6.2.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.6.0...v17.6.2)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 00:15:02 +01:00
dependabot[bot] 57919c4ac3
Bump Nerdbank.GitVersioning from 3.6.132 to 3.6.133 (#1516)
Bumps [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.6.132 to 3.6.133.
- [Release notes](https://github.com/dotnet/Nerdbank.GitVersioning/releases)
- [Commits](https://github.com/dotnet/Nerdbank.GitVersioning/compare/v3.6.132...v3.6.133)

---
updated-dependencies:
- dependency-name: Nerdbank.GitVersioning
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 00:38:25 +01:00
dependabot[bot] 0e118d0f40
Bump System.Reactive from 5.0.0 to 6.0.0 (#1509)
Bumps [System.Reactive](https://github.com/dotnet/reactive) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/dotnet/reactive/releases)
- [Commits](https://github.com/dotnet/reactive/commits)

---
updated-dependencies:
- dependency-name: System.Reactive
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 09:05:46 +01:00
dependabot[bot] 34b81336de
Bump coverlet.msbuild from 3.2.0 to 6.0.0 (#1512)
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 3.2.0 to 6.0.0.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/compare/v3.2.0...v6.0.0)

---
updated-dependencies:
- dependency-name: coverlet.msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 07:39:31 +01:00
dependabot[bot] cd1b108be2
Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.0.1 to 4.6.0 (#1510)
Bumps [Microsoft.CodeAnalysis.CSharp.Workspaces](https://github.com/dotnet/roslyn) from 4.0.1 to 4.6.0.
- [Release notes](https://github.com/dotnet/roslyn/releases)
- [Changelog](https://github.com/dotnet/roslyn/blob/main/docs/Breaking%20API%20Changes.md)
- [Commits](https://github.com/dotnet/roslyn/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.CSharp.Workspaces
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 15:14:14 +10:00
dependabot[bot] ec73fed753
Bump Microsoft.VisualStudio.Threading.Analyzers from 17.5.22 to 17.6.40 (#1511)
Bumps [Microsoft.VisualStudio.Threading.Analyzers](https://github.com/microsoft/vs-threading) from 17.5.22 to 17.6.40.
- [Release notes](https://github.com/microsoft/vs-threading/releases)
- [Commits](https://github.com/microsoft/vs-threading/compare/v17.5.22...v17.6.40)

---
updated-dependencies:
- dependency-name: Microsoft.VisualStudio.Threading.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 15:13:59 +10:00
dependabot[bot] a16b0fd6b6
Bump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 (#1508)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.5.0 to 17.6.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.5.0...v17.6.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 06:13:07 +01:00
dependabot[bot] 65f395a7dd
Bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1506)
Bumps [Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit](https://github.com/dotnet/roslyn-sdk) from 1.1.2-beta1.23205.1 to 1.1.2-beta1.23251.2.
- [Release notes](https://github.com/dotnet/roslyn-sdk/releases)
- [Commits](https://github.com/dotnet/roslyn-sdk/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 11:09:33 +10:00
dependabot[bot] 0a03d4a4ca
Bump Nerdbank.GitVersioning from 3.5.119 to 3.6.132 (#1507)
Bumps [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.5.119 to 3.6.132.
- [Release notes](https://github.com/dotnet/Nerdbank.GitVersioning/releases)
- [Commits](https://github.com/dotnet/Nerdbank.GitVersioning/compare/v3.5.119...v3.6.132)

---
updated-dependencies:
- dependency-name: Nerdbank.GitVersioning
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-14 16:19:55 +01:00
Ani Betts de50934f73
bump 2023-05-14 08:19:30 -04:00
Ani Betts e4a3565c85
Revert #1418, #1367, introduce public version of RestMethodInfo (#1496)
* Revert "feature: Add named httpclient support (#1418)"

This reverts commit b78bbc79dd.

* Revert "Feature: allow developers to inject the MethodInfo as a Property (#1367)"

This reverts commit b06ef7c37d.

* no

* Make RestMethodInfo internal

* Implement a public RestMethodInfo

* Reenable RestMethodInfo, but our public one instead

amend

* Allow configuring the HttpClient name

* Fix typo
2023-05-14 08:18:55 -04:00
Ani Betts ef46395693
Add a DevContainer (#1501) 2023-04-21 14:09:21 -04:00
Ani Betts 35965b8238
BREAKING: Simplify authorization configuration (#1495) 2023-04-17 14:18:49 +00:00
Glenn 9276d6bcbf
housekeeping: Disallow making of package for benchmarks (#1492) 2023-04-13 11:41:04 +10:00
Glenn c10bcbf671
housekeeping: Add code coverage status in readme 2023-04-13 11:40:05 +10:00
Glenn 6cf8169a3d
housekeeping: Convert to using coverlet msbuild (#1491) 2023-04-13 11:32:06 +10:00
Glenn fec2cf3499
Update version.json 2023-04-13 11:02:41 +10:00
Bar Levy c8888e12d7
Fix condition of method return type in RequestBuilder to only allow Task<> and IObservable<> (#1364)
* Fix condition of generic return type in method info

* add test

* Update RestMethodInfo.cs

---------

Co-authored-by: barle <barle@users.noreply.github.com>
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-13 10:00:34 +10:00
Glenn 857becce5d
housekeeping: Update readme to show GitHub actions status 2023-04-13 09:46:12 +10:00
Cédric Luthi c0af5c2a3a
feature: Make the `RestMethodInfo` available in the request options (#1317)
* Make the `RestMethodInfo` available in the request options

While having the interface type available is nice, it might not be enough if using reflection on the called method is desired. Providing the `RestMethodInfo` opens new possibilities to introspect the called method.

Currently, to workaround this missing information, I'm using a `methodName` parameter decorated with a `[Property]` attribute and a default value to make it possible to introspect the return type of the called method.

At the interface method:

```csharp
Task<ApiResponse<User>> GetUserAsync(string id, [Property] string methodName = nameof(GetUserAsync));
```

Inside the HTTP message handler:

```csharp
request.Options.TryGetValue(new HttpRequestOptionsKey<Type>(HttpRequestMessageOptions.InterfaceType), out var refitInterfaceType)
request.Options.TryGetValue(new HttpRequestOptionsKey<string>("methodName"), out var methodName)
var methodReturnType = refitInterfaceType.GetMethod(methodName).ReturnType;
```

With the new `RestMethodInfo`, it becomes possible to access the method without having to pollute the interface definition:

```csharp
request.Options.TryGetValue(HttpRequestMessageOptions.RestMethodInfoKey, out var restMethodInfo);
var methodReturnType = restMethodInfo.MethodInfo.ReturnType;
```

Also, the new `HttpRequestMessageOptions.InterfaceTypeKey` and  `HttpRequestMessageOptions.RestMethodInfoKey` (available on .NET 5 onwards) make it easier to access the request options.

* Update and merge from Main

Add Net 7 testing

* Ensure all targets are net 6 for benchmark

---------

Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2023-04-13 09:37:15 +10:00
Alberto Monteiro ed61774dbf
Fix Added MemberNotNullWhen in IApiResponse (#1483)
* Added MemberNotNullWhen in IApiResponse

* Update ApiResponse.cs

---------

Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 20:16:09 +10:00
Int32Overflow c1516a83fe
Add HttpRequestMessageOptions to RefitSettings and add this dictionary to HttpRequestMessage.(Options/Properties) (#1353)
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2023-04-12 08:49:35 +00:00
James Tayler b06ef7c37d
Feature: allow developers to inject the MethodInfo as a Property (#1367)
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 08:16:06 +00:00
Cédric Luthi 77f084f0e4
feature: Add an authorization header value getter property that supports cancellation (#1413)
In addition to `AuthorizationHeaderValueGetter` and `AuthorizationHeaderValueWithParamGetter`, a new `AuthorizationHeaderValueWithCancellationTokenGetter` is added with support for CancellationToken.

Also, the `AuthenticatedHttpClientHandler` and `AuthenticatedParameterizedHttpClientHandler` internal classes have been merged into a single `AuthenticatedHttpClientHandler` class to reduce code duplication.

Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 17:53:43 +10:00
Chris Howarth 25c4840466
fix: Update readme with details on supply a custom HttpClient instance (#1362)
Co-authored-by: Chris Howarth <christopher.howarth@autocab.com>
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 08:45:17 +01:00
Chris Pulman 098c4e327d
housekeeping: Update Targets, Fix build, Update relevant packages (#1488)
* Update Targets, Fix build, Update relevant packages

* Fix newly added tests from merge

---------

Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 17:30:13 +10:00
Glenn e83f7e2308
housekeeping: Remove old targets from tests 2023-04-12 17:19:47 +10:00
Glenn Watson 500f4a2389 housekeeping: Remove invalid tag from release 2023-04-12 17:09:24 +10:00
Glenn Watson e571bc685a housekeeping: Remove invalid tag from release 2023-04-12 17:08:38 +10:00
Glenn Watson da483b9855 housekeeping: update directory.build.props file 2023-04-12 17:00:00 +10:00
Glenn Watson eb61d396ec housekeeping: remove duplicated tags 2023-04-12 16:51:11 +10:00
Glenn Watson 977246a77f housekeeping: Remove the need to install maui workflows 2023-04-12 16:47:37 +10:00
Glenn Watson b5ce1dbd87 Use the root directory for builds 2023-04-12 16:36:52 +10:00
Marco Minerva 5589ab9aac
Use Error property when throwing exception (#1448)
* Use Error property when throwing exception #1376

* Add Unit test

* Update test assertions
2023-04-12 16:30:32 +10:00
Int32Overflow c97fcb66ce
feature: Add RestMethodInfo in HttpRequestMessage (Options or Properties) (#1352)
Add Unit-Test
2023-04-12 16:26:53 +10:00
James Tayler b608846c09
Add benchmark dotnet and comprehensive set of end to end benchmarks (#1175)
* add BenchmarkDotNet and comprehensive set of end to end benchmarks

* http content does indeed throw

* cleanup unused variables

* fix benchmark that was complaining about IEnumerable return type and test against only 3 orders of magnitue

* fix memory leak in benchmarks

* allow controlling benchmarks from command line

* run all end to end benchmarks if no args supplied, else run benchmarks for the args supplied

* cut down number of benchmarks

* mock http was the wrong tool for the job here - fixed the benchmarks by returning static payloads instead as no state hangs around between runs

* add scripts to run benchmarks for each return type

* add multi-targeting support to benchmarks
2023-04-12 16:25:27 +10:00
Marcos Cordeiro b78bbc79dd
feature: Add named httpclient support (#1418)
* Adds named httpclient support

* Adds IRefitHttpClientFactory

Used to resolve Refit http clients
2023-04-12 16:24:29 +10:00
Int32Overflow 3c8761162a
Fix cache in RestService for generated type (#1348)
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 16:21:48 +10:00
James Tayler 469bfce046
add tests setting Authorization headers via HeaderCollection (#1385)
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 16:21:27 +10:00
dependabot[bot] 63b9654071
Bump Newtonsoft.Json from 13.0.1 to 13.0.3 (#1480)
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 13.0.1 to 13.0.3.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/13.0.1...13.0.3)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 12:21:19 +10:00
Naushad Warsi 00dde435b4
Sample using local api (#785)
* Add Sample

* change the reference of the Projects

---------

Co-authored-by: Benjamin Howarth <322383+benjaminhowarth1@users.noreply.github.com>
2023-04-12 12:16:25 +10:00
Glenn 5fe5ce5628
Update dependabot.yml 2023-04-12 12:12:37 +10:00