Full Code of reactiveui/refit for AI

main d3b9f6eb2242 cached
281 files
1.3 MB
293.9k tokens
1982 symbols
1 requests
Download .txt
Showing preview only (1,403K chars total). Download the full file or copy to clipboard to get everything.
Repository: reactiveui/refit
Branch: main
Commit: d3b9f6eb2242
Files: 281
Total size: 1.3 MB

Directory structure:
gitextract_tnsc_ofx/

├── .devcontainers/
│   ├── Dockerfile
│   ├── devcontainer.json
│   └── post-create.sh
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.yml
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── renovate.json
│   └── workflows/
│       ├── ci-build.yml
│       ├── lock.yml
│       └── release.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── COPYING
├── CodeCoverage.runsettings
├── Directory.Build.props
├── InterfaceStubGenerator.Roslyn38/
│   └── InterfaceStubGenerator.Roslyn38.csproj
├── InterfaceStubGenerator.Roslyn41/
│   └── InterfaceStubGenerator.Roslyn41.csproj
├── InterfaceStubGenerator.Roslyn50/
│   └── InterfaceStubGenerator.Roslyn50.csproj
├── InterfaceStubGenerator.Shared/
│   ├── DiagnosticDescriptors.cs
│   ├── Emitter.cs
│   ├── ITypeSymbolExtensions.cs
│   ├── ImmutableEquatableArray.cs
│   ├── IncrementalValuesProviderExtensions.cs
│   ├── InterfaceStubGenerator.Shared.projitems
│   ├── InterfaceStubGenerator.Shared.shproj
│   ├── InterfaceStubGenerator.cs
│   ├── IsExternalInit.cs
│   ├── Models/
│   │   ├── ContextGenerationModel.cs
│   │   ├── InterfaceModel.cs
│   │   ├── MethodModel.cs
│   │   ├── ParameterModel.cs
│   │   ├── TypeConstraint.cs
│   │   └── WellKnownTypes.cs
│   ├── Parser.cs
│   ├── Polyfills/
│   │   └── IndexRange.cs
│   ├── SourceWriter.cs
│   └── UniqueNameBuilder.cs
├── LICENSE
├── NuGet.config
├── README.md
├── Refit/
│   ├── AnonymousDisposable.cs
│   ├── AotCompatibility.cs
│   ├── ApiException.cs
│   ├── ApiResponse.cs
│   ├── Attributes.cs
│   ├── AuthenticatedHttpClientHandler.cs
│   ├── Buffers/
│   │   ├── PooledBufferWriter.Stream.NETStandard21.cs
│   │   ├── PooledBufferWriter.Stream.cs
│   │   ├── PooledBufferWriter.ThrowExceptions.cs
│   │   └── PooledBufferWriter.cs
│   ├── CachedRequestBuilderImplementation.cs
│   ├── CamelCaseUrlParameterKeyFormatter.cs
│   ├── CloseGenericMethodKey.cs
│   ├── CollectionFormat.cs
│   ├── DynamicallyAccessedMembersAttribute.cs
│   ├── EnumerableExtensions.cs
│   ├── FormValueMultimap.cs
│   ├── HttpContentExtensions.cs
│   ├── HttpRequestMessageProperties.cs
│   ├── JsonContentSerializer.cs
│   ├── MultipartItem.cs
│   ├── NameValueCollection.cs
│   ├── Polyfills.Trimming.cs
│   ├── ProblemDetails.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── PushStreamContent.cs
│   ├── Refit.csproj
│   ├── RefitSettings.cs
│   ├── RequestBuilder.cs
│   ├── RequestBuilderFactory.cs
│   ├── RequestBuilderImplementation.TaskToObservable.cs
│   ├── RequestBuilderImplementation.cs
│   ├── RestMethodInfo.cs
│   ├── RestMethodParameterInfo.cs
│   ├── RestService.cs
│   ├── SystemTextJsonContentSerializer.cs
│   ├── UniqueName.cs
│   ├── ValidationApiException.cs
│   ├── ValueStringBuilder.cs
│   └── targets/
│       ├── refit.props
│       └── refit.targets
├── Refit.Benchmarks/
│   ├── Benchmarks/
│   │   ├── net5.0/
│   │   │   ├── Benchmark_AllReturnTypes.bat
│   │   │   ├── Benchmark_ObservableHttpResponseMessage.bat
│   │   │   ├── Benchmark_Task.bat
│   │   │   ├── Benchmark_TaskApiResponseT.bat
│   │   │   ├── Benchmark_TaskHttpContent.bat
│   │   │   ├── Benchmark_TaskHttpResponseMessage.bat
│   │   │   ├── Benchmark_TaskStream.bat
│   │   │   ├── Benchmark_TaskString.bat
│   │   │   └── Benchmark_TaskT.bat
│   │   ├── net6.0/
│   │   │   ├── Benchmark_AllReturnTypes.bat
│   │   │   ├── Benchmark_ObservableHttpResponseMessage.bat
│   │   │   ├── Benchmark_Task.bat
│   │   │   ├── Benchmark_TaskApiResponseT.bat
│   │   │   ├── Benchmark_TaskHttpContent.bat
│   │   │   ├── Benchmark_TaskHttpResponseMessage.bat
│   │   │   ├── Benchmark_TaskStream.bat
│   │   │   ├── Benchmark_TaskString.bat
│   │   │   └── Benchmark_TaskT.bat
│   │   └── netcoreapp3.1/
│   │       ├── Benchmark_AllReturnTypes.bat
│   │       ├── Benchmark_ObservableHttpResponseMessage.bat
│   │       ├── Benchmark_Task.bat
│   │       ├── Benchmark_TaskApiResponseT.bat
│   │       ├── Benchmark_TaskHttpContent.bat
│   │       ├── Benchmark_TaskHttpResponseMessage.bat
│   │       ├── Benchmark_TaskStream.bat
│   │       ├── Benchmark_TaskString.bat
│   │       └── Benchmark_TaskT.bat
│   ├── EndToEndBenchmark.cs
│   ├── IGitHubService.cs
│   ├── IPerformanceService.cs
│   ├── PerformanceBenchmark.cs
│   ├── Program.cs
│   ├── Refit.Benchmarks.csproj
│   ├── SourceGeneratorBenchmark.cs
│   ├── SourceGeneratorBenchmarksProjects.cs
│   ├── StartupBenchmark.cs
│   ├── StaticFileHttpResponseHandler.cs
│   ├── StaticValueHttpResponseHandler.cs
│   ├── newtonsoft-json-10-users.json
│   └── system-text-json-10-users.json
├── Refit.GeneratorTests/
│   ├── Fixture.cs
│   ├── GeneratedTest.cs
│   ├── Incremental/
│   │   ├── FunctionTest.cs
│   │   ├── GenericTest.cs
│   │   ├── IncrementalGeneratorRunReasons.cs
│   │   ├── IncrementalTest.cs
│   │   ├── InheritanceTest.cs
│   │   └── TestHelper.cs
│   ├── InterfaceTests.cs
│   ├── MethodTests.cs
│   ├── ModuleInitializer.cs
│   ├── ParameterTests.cs
│   ├── Refit.GeneratorTests.csproj
│   ├── ReturnTypeTests.cs
│   └── _snapshots/
│       ├── GeneratedTest.ShouldEmitAllFiles#Generated.g.verified.cs
│       ├── GeneratedTest.ShouldEmitAllFiles#IGeneratedClient.g.verified.cs
│       ├── GeneratedTest.ShouldEmitAllFiles#PreserveAttribute.g.verified.cs
│       ├── InterfaceTests.ContainedInterfaceTest#IContainedInterface.g.verified.cs
│       ├── InterfaceTests.DefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.DerivedDefaultInterfaceMethod#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.DerivedDefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.DisposableTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.GlobalNamespaceTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceDerivedFromRefitBaseTest#IDerivedInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceWithGenericConstraint#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentCasing#IApi.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentCasing#Iapi1.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentSignature#IApi.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentSignature#IApi1.g.verified.cs
│       ├── InterfaceTests.NestedNamespaceTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.NonRefitMethodShouldRaiseDiagnostic#IGeneratedClient.g.verified.cs
│       ├── InterfaceTests.NonRefitMethodShouldRaiseDiagnostic.verified.txt
│       ├── InterfaceTests.RefitInterfaceDerivedFromBaseTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.RefitInterfaceDerivedFromBaseTest.verified.txt
│       ├── InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IGeneratedInterface.g.verified.cs
│       ├── MethodTests.MethodsWithGenericConstraints#IGeneratedClient.g.verified.cs
│       ├── MethodTests.MethodsWithGenericConstraints.verified.txt
│       ├── ParameterTests.NullableRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.NullableValueTypeRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.RouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.ValueTypeRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericStructConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericTaskShouldWork#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericUnmanagedConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnIObservable#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnNullableObject#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnNullableValueType#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnUnsupportedType#IGeneratedClient.g.verified.cs
│       └── ReturnTypeTests.VoidTaskShouldWork#IGeneratedClient.g.verified.cs
├── Refit.HttpClientFactory/
│   ├── HttpClientFactoryCore.cs
│   ├── HttpClientFactoryExtensions.cs
│   ├── HttpClientFactoryExtensions.tt
│   ├── Refit.HttpClientFactory.csproj
│   └── SettingsFor.cs
├── Refit.Newtonsoft.Json/
│   ├── NewtonsoftJsonContentSerializer.cs
│   └── Refit.Newtonsoft.Json.csproj
├── Refit.Tests/
│   ├── API/
│   │   ├── ApiApprovalTests.Refit.DotNet8_0.verified.txt
│   │   ├── ApiApprovalTests.Refit.DotNet9_0.verified.txt
│   │   ├── ApiApprovalTests.cs
│   │   ├── ApiExtensions.cs
│   │   └── _snapshots/
│   │       ├── ApiApprovalTests.Refit.DotNet10_0.verified.txt
│   │       ├── ApiApprovalTests.Refit.DotNet8_0.verified.txt
│   │       └── ApiApprovalTests.Refit.DotNet9_0.verified.txt
│   ├── App.config
│   ├── AuthenticatedClientHandlerTests.cs
│   ├── CachedRequestBuilder.cs
│   ├── CamelCaseUrlParameterKeyFormatter.cs
│   ├── DefaultUrlParameterFormatterTest.cs
│   ├── DeliminatorSeparatedPropertyNamesContractResolver.cs
│   ├── DeserializationExceptionFactoryTests.cs
│   ├── ExceptionFactoryTests.cs
│   ├── ExplicitInterfaceRefitTests.cs
│   ├── FormValueMultimapTests.cs
│   ├── GitHubApi.cs
│   ├── GlobalSuppressions.cs
│   ├── HttpClientFactoryExtensionsTests.cs
│   ├── IDefaultInterfaceMethodTests.cs
│   ├── IFooWithOtherAttribute.cs
│   ├── IInterfaceWithoutRefit.cs
│   ├── IServiceWithoutNamespace.cs
│   ├── InheritedGenericInterfacesApi.cs
│   ├── InheritedInterfacesApi.cs
│   ├── InheritedInterfacesInSeparateFileApi.cs
│   ├── IntegrationTestHelper.cs
│   ├── InterfaceStubGenerator.cs
│   ├── MethodOverloads.cs
│   ├── ModuleInitializer.cs
│   ├── ModuleInitializerAttribute.cs
│   ├── MultipartTests.cs
│   ├── MyQueryParams.cs
│   ├── NamespaceCollisionApi.cs
│   ├── NamespaceOverlapApi.cs
│   ├── NamespaceWithGlobalAliasApi.cs
│   ├── NullableReferenceTypes.cs
│   ├── PartialInterfacesApi.First.cs
│   ├── PartialInterfacesApi.Second.cs
│   ├── ReducedUsingInsideNamespaceApi.cs
│   ├── Refit.Tests.csproj
│   ├── RefitSettings.cs
│   ├── ReflectionTests.cs
│   ├── RequestBuilder.cs
│   ├── ResponseTests.cs
│   ├── RestService.cs
│   ├── RestServiceExceptions.cs
│   ├── SerializedContentTests.cs
│   ├── TypeCollisionApiA.cs
│   ├── TypeCollisionApiB.cs
│   ├── UniqueNameTests.cs
│   ├── UseCultureAttribute.cs
│   ├── Verifiers/
│   │   ├── CSharpIncrementalSourceGeneratorVerifier`1+Test.cs
│   │   ├── CSharpIncrementalSourceGeneratorVerifier`1.cs
│   │   ├── CSharpSourceGeneratorVerifier`1+Test.cs
│   │   ├── CSharpSourceGeneratorVerifier`1.cs
│   │   └── CSharpVerifierHelper.cs
│   ├── XmlContentSerializerTests.cs
│   └── _snapshots/
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#Generated.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApi.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApiDisposable.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#INestedGitHubApi.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#PreserveAttribute.g.verified.cs
│       ├── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#Generated.g.verified.cs
│       ├── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#IServiceWithoutNamespace.g.verified.cs
│       └── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#PreserveAttribute.g.verified.cs
├── Refit.Xml/
│   ├── Refit.Xml.csproj
│   └── XmlContentSerializer.cs
├── Refit.sln
├── _config.yml
├── buildtask.snk
├── config/
│   ├── filelist.txt
│   └── signclient.json
├── examples/
│   ├── Meow/
│   │   ├── Meow.csproj
│   │   └── Program.cs
│   ├── Meow.Common/
│   │   ├── Meow.Common.csproj
│   │   ├── Middleware/
│   │   │   └── HttpClientDiagnosticsHandler.cs
│   │   ├── Responses/
│   │   │   └── SearchResponse.cs
│   │   └── Services/
│   │       ├── CatsService.cs
│   │       ├── ITheCatsAPI.cs
│   │       └── Issue2056And2058Demo.cs
│   ├── Meow.sln
│   ├── SampleUsingLocalApi/
│   │   ├── ConsoleApplication/
│   │   │   ├── ConsoleSampleUsingLocalApi.csproj
│   │   │   └── Program.cs
│   │   ├── LibraryWithSDKandRefitService/
│   │   │   ├── IRestService.cs
│   │   │   ├── LibraryWithSDKandRefitService.csproj
│   │   │   └── ModelForTest.cs
│   │   └── RestApiforTest/
│   │       ├── Controllers/
│   │       │   └── ValuesController.cs
│   │       ├── Program.cs
│   │       ├── Properties/
│   │       │   └── launchSettings.json
│   │       ├── RestApiForTest.csproj
│   │       ├── Startup.cs
│   │       ├── appsettings.Development.json
│   │       └── appsettings.json
│   └── SampleUsingLocalApi.sln
├── stylesheets/
│   ├── pygment_trac.css
│   └── styles.css
└── version.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .devcontainers/Dockerfile
================================================
# [Choice] .NET version: 7.0, 7.0-bullseye-slim, 7.0-jammy, 6.0, 6.0-bullseye-slim, 6.0-jammy, 6.0-focal
ARG VARIANT="7.0-jammy"
FROM mcr.microsoft.com/dotnet/sdk:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
#     && apt-get -y install --no-install-recommends <your-package-list-here>

================================================
FILE: .devcontainers/devcontainer.json
================================================
{
  "name": "DevContainer for .NET",

  "build": {
    "dockerfile": "./Dockerfile",
    "context": ".",
    "args": {
      // version: 7.0, 7.0-bullseye-slim, 7.0-jammy, 6.0, 6.0-bullseye-slim, 6.0-jammy, 6.0-focal
      "VARIANT": "7.0"
    }
  },

  "features": {
    // GitHub CLI
    "ghcr.io/devcontainers/features/github-cli:1": {
      "version": "latest"
    },

    // Install common utilities
    "ghcr.io/devcontainers/features/common-utils:1": {
      "installZsh": true,
      "installOhMyZsh": true,
      "upgradePackages": true,
      "username": "vscode",
      "uid": "1000",
      "gid": "1000"
    }
  },

  "overrideFeatureInstallOrder": [
    "ghcr.io/devcontainers/features/common-utils"
  ],

  // Configure tool-specific properties.
  "customizations": {
    // Configure properties specific to VS Code.
    "vscode": {
      // Add the IDs of extensions you want installed when the container is created.
      "extensions": [
        "ms-dotnettools.csharp",
        "ms-vscode.PowerShell",
        "VisualStudioExptTeam.vscodeintellicode"
      ],
      "settings": {
      }
    }
  },

  // Uncomment if you want to use bash in 'postCreateCommand' after the container is created
  "postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh > ~/post-create.log",

  // Uncomment if you want to connect other than 'root'. More info: https://aka.ms/vscode-remote/containers/non-root.
  "remoteUser": "vscode"
}


================================================
FILE: .devcontainers/post-create.sh
================================================
## Restore .NET packages and build the default solution
dotnet restore


================================================
FILE: .editorconfig
================================================
# EditorConfig is awesome:http://EditorConfig.org
# From https://raw.githubusercontent.com/dotnet/roslyn/master/.editorconfig

# top-most EditorConfig file
root = true

# Don't use tabs for indentation.
[*]
indent_style = space
trim_trailing_whitespace = true
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2

# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2

# Yml/Yaml files
[*.{yaml,yml}]
indent_size = 2

# Powershell files
[*.ps1]
indent_size = 2

# JSON files
[*.json]
indent_size = 2

# Shell scripts
[*.sh]
end_of_line = lf

[*.{cmd,bat}]
end_of_line = crlf

# Dotnet code style settings:
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
# Put a blank line between System.* and Microsoft.*
dotnet_separate_import_directive_groups = true

# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion

# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Prefer read-only on fields
dotnet_style_readonly_field = true:warning

# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = false
dotnet_style_prefer_conditional_expression_over_assignment = false
dotnet_style_prefer_auto_properties = true:suggestion

# Parentheses
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent

# Accessibility modifiers
dotnet_style_require_accessibility_modifiers = omit_if_default:suggestion


# Naming Rules

# Interfaces start with an I and are PascalCased
dotnet_naming_rule.interfaces_must_be_pascal_cased_and_prefixed_with_I.symbols                        = interface_symbols
dotnet_naming_rule.interfaces_must_be_pascal_cased_and_prefixed_with_I.style                          = pascal_case_and_prefix_with_I_style
dotnet_naming_rule.interfaces_must_be_pascal_cased_and_prefixed_with_I.severity                       = warning

# External members are PascalCased
dotnet_naming_rule.externally_visible_members_must_be_pascal_cased.symbols                            = externally_visible_symbols
dotnet_naming_rule.externally_visible_members_must_be_pascal_cased.style                              = pascal_case_style
dotnet_naming_rule.externally_visible_members_must_be_pascal_cased.severity                           = warning

# Parameters are camelCased
dotnet_naming_rule.parameters_must_be_camel_cased.symbols                                             = parameter_symbols
dotnet_naming_rule.parameters_must_be_camel_cased.style                                               = camel_case_style
dotnet_naming_rule.parameters_must_be_camel_cased.severity                                            = warning

# Constants are PascalCased
dotnet_naming_rule.constants_must_be_pascal_cased.symbols                                             = constant_symbols
dotnet_naming_rule.constants_must_be_pascal_cased.style                                               = pascal_case_style
dotnet_naming_rule.constants_must_be_pascal_cased.severity                                            = warning

# Uncomment this group and comment out the next group if you prefer s_ prefixes for static fields

# Private static fields are prefixed with s_ and are camelCased like s_myStatic
#dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.symbols   = private_static_field_symbols
#dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.style     = camel_case_and_prefix_with_s_underscore_style
#dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.severity  = warning

# Static readonly fields are PascalCased
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols                               = private_static_readonly_field_symbols
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style                                 = pascal_case_style
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity                              = warning

# Comment this group and uncomment out the next group if you don't want _ prefixed fields.

# Private instance fields are camelCased with an _ like _myField
#dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.symbols   = private_field_symbols
#dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.style     = camel_case_and_prefix_with_underscore_style
#dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.severity  = warning

# Private instance fields are camelCased
dotnet_naming_rule.private_instance_fields_must_be_camel_cased.symbols                                = private_field_symbols
dotnet_naming_rule.private_instance_fields_must_be_camel_cased.style                                  = camel_case_style
dotnet_naming_rule.private_instance_fields_must_be_camel_cased.severity                               = warning

# Symbols
dotnet_naming_symbols.externally_visible_symbols.applicable_kinds                                     = class,struct,interface,enum,property,method,field,event,delegate
dotnet_naming_symbols.externally_visible_symbols.applicable_accessibilities                           = public,internal,friend,protected,protected_internal,protected_friend,private_protected

dotnet_naming_symbols.interface_symbols.applicable_kinds                                              = interface
dotnet_naming_symbols.interface_symbols.applicable_accessibilities                                    = *

dotnet_naming_symbols.parameter_symbols.applicable_kinds                                              = parameter
dotnet_naming_symbols.parameter_symbols.applicable_accessibilities                                    = *

dotnet_naming_symbols.constant_symbols.applicable_kinds                                               = field
dotnet_naming_symbols.constant_symbols.required_modifiers                                             = const
dotnet_naming_symbols.constant_symbols.applicable_accessibilities                                     = *

dotnet_naming_symbols.private_static_field_symbols.applicable_kinds                                   = field
dotnet_naming_symbols.private_static_field_symbols.required_modifiers                                 = static,shared
dotnet_naming_symbols.private_static_field_symbols.applicable_accessibilities                         = private

dotnet_naming_symbols.private_static_readonly_field_symbols.applicable_kinds                          = field
dotnet_naming_symbols.private_static_readonly_field_symbols.required_modifiers                        = static,shared,readonly
dotnet_naming_symbols.private_static_readonly_field_symbols.applicable_accessibilities                = private

dotnet_naming_symbols.private_field_symbols.applicable_kinds                                          = field
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities                                = private

# Styles
dotnet_naming_style.camel_case_style.capitalization                                                   = camel_case

dotnet_naming_style.pascal_case_style.capitalization                                                  = pascal_case

dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.required_prefix                     = s_
dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.capitalization                      = camel_case

dotnet_naming_style.camel_case_and_prefix_with_underscore_style.required_prefix                       = _
dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization                        = camel_case

dotnet_naming_style.pascal_case_and_prefix_with_I_style.required_prefix                               = I
dotnet_naming_style.pascal_case_and_prefix_with_I_style.capitalization                                = pascal_case


# CSharp code style settings:
[*.cs]
# Modifier order
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion

# Code block
csharp_prefer_braces = false:none

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Code style defaults
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true

# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none

# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none

# Expression 
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion

# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion

# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false


================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs     diff=csharp

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain

.idea/


================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.yml
================================================
name: Bug Report
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        ## Please note although we can't commit to any timeline, priority will be given to those who are [Contributors](https://github.com/reactiveui/ReactiveUI#contribute ) to the project.
  - type: textarea
    id: description
    attributes:
      label: Describe the bug 🐞
      description: A clear and concise description of what the bug is.
      value: "A bug happened!"
    validations:
      required: true
  - type: textarea
    id: reproduce-steps
    attributes:
      label: Step to reproduce
      description: "Steps to reproduce the behavior:"
      value: |
        1. Go to '...'
        2. Click on '....'
        3. Scroll down to '....'
        4. See error
    validations:
      required: true
  - type: input
    id: reproduce-repository
    attributes:
      label: Reproduction repository
      description: "Simple repository representing the bug"
      placeholder: https://github.com/reactiveui/refit
      value: |
        https://github.com/reactiveui/refit
    validations:
      required: false
  - type: textarea
    id: expected-behavior
    attributes:
      label: Expected behavior
      description: A clear and concise description of what you expected to happen.
      value: This should happen...
    validations:
      required: true
  - type: textarea
    id: screenshots
    attributes:
      label: Screenshots 🖼️
      description: If applicable, add screenshots to help explain your problem.
    validations:
      required: false
  - type: dropdown
    id: ide
    attributes:
      label: IDE
      multiple: true
      options:
        - Visual Studio 2022
        - Visual Studio 2019
        - Visual Studio 2017
        - Visual Studio for Mac
        - Rider Windows
        - Rider macOS
        - Visual Studio Code
  - type: input
    id: operating-system
    attributes:
      label: Operating system
      description: Windows, Linux, Mac OS...
    validations:
      required: false
  - type: input
    id: system-version
    attributes:
      label: Version
      description: Version and distribution (if applicable)
    validations:
      required: false
  - type: input
    id: device
    attributes:
      label: Device
      description: Device e.g. iPhone 6
    validations:
      required: false
  - type: input
    id: refit-version
    attributes:
      label: Refit Version
      description: e.g. 15.1.1
    validations:
      required: false
  - type: textarea
    id: additional-information
    attributes:
      label: Additional information ℹ️
      description: Add any other information about the problem here.
    validations:
      required: false


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Questions
    url: https://github.com/reactiveui/refit/discussions
    about: 'For general questions about Refit, ask in the GitHub discussions'
  - name: Chat
    url: https://www.reactiveui.net/slack
    about: 'Our slack chat community invite'


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

<!--
Please note although we can't commit to any timeline, priority will be given to those who are [Contributors](https://github.com/reactiveui/ReactiveUI#contribute ) to the project.

If this is a question please ask on [StackOverflow](https://stackoverflow.com/questions/tagged/reactiveui).
-->

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. -->



**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->



**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->



**Describe suggestions on how to achieve the feature**
<!-- A clear description to how to achieve the feature. -->



**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->


================================================
FILE: .github/renovate.json
================================================
{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": ["local>reactiveui/.github:renovate"]
}

================================================
FILE: .github/workflows/ci-build.yml
================================================
name: Build

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

# Needed so the reusable workflow can optionally delete the temp per-OS artifacts it creates.
permissions:
  contents: read
  actions: write

env:
  productNamespacePrefix: "Refit"

jobs:
  build:
    uses: reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml@main
    with:
      productNamespacePrefix: "Refit"
      srcFolder: "./"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


================================================
FILE: .github/workflows/lock.yml
================================================
name: 'Lock Threads'

on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:

permissions:
  issues: write
  pull-requests: write

concurrency:
  group: lock

jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/lock-threads@v6
        with:
          github-token: ${{ github.token }}
          issue-inactive-days: '14'
          pr-inactive-days: '14'
          issue-comment: >
            This issue has been automatically locked since there
            has not been any recent activity after it was closed.
            Please open a new issue for related bugs.
          pr-comment: >
            This pull request has been automatically locked since there
            has not been any recent activity after it was closed.
            Please open a new issue for related bugs.


================================================
FILE: .github/workflows/release.yml
================================================
name: Release

on:
  workflow_dispatch:

permissions:
  contents: write
  id-token: write

jobs:
  release:
    uses: reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main
    with:
      srcFolder: "./"
    secrets:
      ES_USERNAME: ${{ secrets.ES_USERNAME }}
      ES_PASSWORD: ${{ secrets.ES_PASSWORD }}
      CREDENTIAL_ID: ${{ secrets.CREDENTIAL_ID }}
      ES_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}

  publish-nuget:
    needs: release
    runs-on: ubuntu-latest
    environment:
      name: release
    permissions:
      id-token: write
    steps:
      - name: Download signed packages
        uses: actions/download-artifact@v8
        with:
          name: signed-nuget

      - name: Setup .NET
        uses: actions/setup-dotnet@v5

      - name: NuGet login (OIDC trusted publishing)
        id: nuget-login
        uses: NuGet/login@v1
        with:
          user: ${{ secrets.NUGET_USER }}

      - name: Push to NuGet
        shell: bash
        run: |
          for pkg in *.nupkg; do
            dotnet nuget push "$pkg" --source https://api.nuget.org/v3/index.json --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}"
          done
  create-release:
    needs: [release, publish-nuget]
    uses: reactiveui/actions-common/.github/workflows/workflow-common-create-release.yml@main
    with:
      version: ${{ needs.release.outputs.semver2 }}


================================================
FILE: .gitignore
================================================
# Windows image file caches
Thumbs.db 

# Folder config file
Desktop.ini

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userprefs

.vs/

# Build results
bin/[Dd]ebug/
bin/[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
bin/**/*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds

# Idea cache files

.idea/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

*.ide/


*.lock.json
*.nuget.props
*.nuget.targets

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Click-Once directory
publish

# Visual Studio Code

.vscode/

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
.DS_Store
Generated_Code #added for RIA/Silverlight projects

# Custom

# packages
Release/
packages/

*.userprefs
Refit-Tests/test-results
/InterfaceStubGenerator.App/Properties/launchSettings.json
*.binlog
/InterfaceStubGenerator.Core/Properties/launchSettings.json
*.svclog
**/BenchmarkDotNet.Artifacts


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
  addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at anais@anaisbetts.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.


This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/


================================================
FILE: COPYING
================================================
Copyright (c) 2012 GitHub

Permission is hereby granted,  free of charge,  to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to  use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


================================================
FILE: CodeCoverage.runsettings
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- File name extension must be .runsettings -->
<RunSettings>
  <DataCollectionRunSettings>
    <DataCollectors>
       <DataCollector friendlyName="XPlat code coverage">
        <Configuration>
          <Format>cobertura</Format>
          <Exclude>[xunit.*]*,[*Tests]*,[System.*]*,[InterfaceStubGenerator.App]*</Exclude> <!-- [Assembly-Filter]Type-Filter -->
          <ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
        </Configuration>
      </DataCollector>      
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>


================================================
FILE: Directory.Build.props
================================================
<Project>
  <PropertyGroup>
    <MinClientVersion>2.12</MinClientVersion>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
    <DebugType>embedded</DebugType>
    <Authors>.NET Foundation and Contributors</Authors>
    <Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PackageProjectUrl>https://github.com/reactiveui/refit</PackageProjectUrl>
    <PackageIcon>refit_logo.png</PackageIcon>
    <PackageReadmeFile>README.md</PackageReadmeFile>
    <DefaultLanguage>en-US</DefaultLanguage>
    <Description>The automatic type-safe REST library for Xamarin and .NET</Description>
    <NoPackageAnalysis>true</NoPackageAnalysis>
    <LangVersion>preview</LangVersion>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <!-- Net Analyzers config taken from : https://docs.microsoft.com/en-gb/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers?view=vs-2019 -->
    <EnableNETAnalyzers>True</EnableNETAnalyzers>
    <AnalysisLevel>latest</AnalysisLevel>
    <AnalysisMode>AllEnabledByDefault</AnalysisMode>
    <ImplicitUsings>true</ImplicitUsings>
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)buildtask.snk</AssemblyOriginatorKeyFile>
    <!--<SignAssembly>true</SignAssembly>-->
    <RefitTargets Condition="$([MSBuild]::IsOsPlatform('Windows'))">net462</RefitTargets>
    <RefitTestTargets>net8.0;net9.0;net10.0</RefitTestTargets>
    <RefitTargets>$(RefitTargets);netstandard2.0;$(RefitTestTargets)</RefitTargets>
    <NoWarn>IDE0040;CA1054;CA1510</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
    <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
  </PropertyGroup>

  <ItemGroup>
    <None Include="$(MSBuildThisFileDirectory)refit_logo.png" Pack="true" PackagePath="\" Visible="false"  />
    <None Include="$(MSBuildThisFileDirectory)LICENSE" Pack="true" PackagePath="LICENSE" />
    <None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" />
  </ItemGroup>

  <ItemGroup Condition="'$(IsTestProject)' != 'true'">
    <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" PrivateAssets="All" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
    <PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
  </ItemGroup>

  <Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
    <ItemGroup>
      <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
        <_Parameter1>CommitHash</_Parameter1>
        <_Parameter2>$(SourceRevisionId)</_Parameter2>
      </AssemblyAttribute>
    </ItemGroup>
  </Target>
</Project>


================================================
FILE: InterfaceStubGenerator.Roslyn38/InterfaceStubGenerator.Roslyn38.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0</TargetFrameworks>
    <AssemblyName>InterfaceStubGeneratorV1</AssemblyName>
    <RootNamespace>Refit.Generator</RootNamespace>
    <IsPackable>false</IsPackable>
    <AssemblyOriginatorKeyFile>..\buildtask.snk</AssemblyOriginatorKeyFile>
    <SignAssembly>true</SignAssembly>
    <IsRoslynComponent>true</IsRoslynComponent>
    <Nullable>enable</Nullable>
    <MsCACSharpVersion>3.8.0</MsCACSharpVersion>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MsCACSharpVersion)" />
  </ItemGroup>

  <Target Name="SetBuildVer" AfterTargets="GetBuildVersion" BeforeTargets="SetCloudBuildVersionVars;SetCloudBuildNumberWithVersion">
    <PropertyGroup>
      <Version>$(BuildVersion)</Version>
      <AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
    </PropertyGroup>
  </Target>

  <Import Project="..\InterfaceStubGenerator.Shared\InterfaceStubGenerator.Shared.projitems" Label="Shared" />

</Project>


================================================
FILE: InterfaceStubGenerator.Roslyn41/InterfaceStubGenerator.Roslyn41.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0</TargetFrameworks>
    <AssemblyName>InterfaceStubGeneratorV2</AssemblyName>
    <RootNamespace>Refit.Generator</RootNamespace>
    <IsPackable>false</IsPackable>
    <AssemblyOriginatorKeyFile>..\buildtask.snk</AssemblyOriginatorKeyFile>
    <SignAssembly>true</SignAssembly>
    <IsRoslynComponent>true</IsRoslynComponent>
    <Nullable>enable</Nullable>
    <DefineConstants>$(DefineConstants);ROSLYN_4</DefineConstants>
    <MsCACSharpVersion>4.1.0</MsCACSharpVersion>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MsCACSharpVersion)" PrivateAssets="all" />
  </ItemGroup>

  <Target Name="SetBuildVer" AfterTargets="GetBuildVersion" BeforeTargets="SetCloudBuildVersionVars;SetCloudBuildNumberWithVersion">
    <PropertyGroup>
      <Version>$(BuildVersion)</Version>
      <AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
    </PropertyGroup>
  </Target>

  <Import Project="..\InterfaceStubGenerator.Shared\InterfaceStubGenerator.Shared.projitems" Label="Shared" />

</Project>


================================================
FILE: InterfaceStubGenerator.Roslyn50/InterfaceStubGenerator.Roslyn50.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0</TargetFrameworks>
    <AssemblyName>InterfaceStubGeneratorV3</AssemblyName>
    <RootNamespace>Refit.Generator</RootNamespace>
    <IsPackable>false</IsPackable>
    <AssemblyOriginatorKeyFile>..\buildtask.snk</AssemblyOriginatorKeyFile>
    <SignAssembly>true</SignAssembly>
    <IsRoslynComponent>true</IsRoslynComponent>
    <Nullable>enable</Nullable>
    <DefineConstants>$(DefineConstants);ROSLYN_4;ROSLYN_5</DefineConstants>
    <MsCACSharpVersion>5.0.0</MsCACSharpVersion>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MsCACSharpVersion)" PrivateAssets="all" />
  </ItemGroup>

  <Target Name="SetBuildVer" AfterTargets="GetBuildVersion" BeforeTargets="SetCloudBuildVersionVars;SetCloudBuildNumberWithVersion">
    <PropertyGroup>
      <Version>$(BuildVersion)</Version>
      <AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
    </PropertyGroup>
  </Target>

  <Import Project="..\InterfaceStubGenerator.Shared\InterfaceStubGenerator.Shared.projitems" Label="Shared" />

</Project>


================================================
FILE: InterfaceStubGenerator.Shared/DiagnosticDescriptors.cs
================================================
using Microsoft.CodeAnalysis;

namespace Refit.Generator;

internal static class DiagnosticDescriptors
{
#pragma warning disable RS2008 // Enable analyzer release tracking
    public static readonly DiagnosticDescriptor InvalidRefitMember =
        new(
            "RF001",
            "Refit types must have Refit HTTP method attributes",
            "Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument",
            "Refit",
            DiagnosticSeverity.Warning,
            true
        );

    public static readonly DiagnosticDescriptor RefitNotReferenced =
        new(
            "RF002",
            "Refit must be referenced",
            "Refit is not referenced. Add a reference to Refit.",
            "Refit",
            DiagnosticSeverity.Error,
            true
        );
#pragma warning restore RS2008 // Enable analyzer release tracking
}


================================================
FILE: InterfaceStubGenerator.Shared/Emitter.cs
================================================
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis.Text;

namespace Refit.Generator;

internal static class Emitter
{
    private const string TypeParameterVariableName = "______typeParameters";

    public static void EmitSharedCode(
        ContextGenerationModel model,
        Action<string, SourceText> addSource
    )
    {
        if (model.Interfaces.Count == 0)
            return;

        var attributeText = $$"""

            #pragma warning disable
            namespace {{model.RefitInternalNamespace}}
            {
                [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
                [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
                [global::System.AttributeUsage (global::System.AttributeTargets.Class | global::System.AttributeTargets.Struct | global::System.AttributeTargets.Enum | global::System.AttributeTargets.Constructor | global::System.AttributeTargets.Method | global::System.AttributeTargets.Property | global::System.AttributeTargets.Field | global::System.AttributeTargets.Event | global::System.AttributeTargets.Interface | global::System.AttributeTargets.Delegate)]
                sealed class PreserveAttribute : global::System.Attribute
                {
                    //
                    // Fields
                    //
                    public bool AllMembers;

                    public bool Conditional;
                }
            }
            #pragma warning restore

            """;
        // add the attribute text
        addSource("PreserveAttribute.g.cs", SourceText.From(attributeText, Encoding.UTF8));

        var generatedClassText = $$"""

            #pragma warning disable
            namespace Refit.Implementation
            {

                /// <inheritdoc />
                [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
                [global::System.Diagnostics.DebuggerNonUserCode]
                [{{model.PreserveAttributeDisplayName}}]
                [global::System.Reflection.Obfuscation(Exclude=true)]
                [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
                internal static partial class Generated
                {
            #if NET5_0_OR_GREATER
                    [System.Runtime.CompilerServices.ModuleInitializer]
                    [System.Diagnostics.CodeAnalysis.DynamicDependency(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All, typeof(global::Refit.Implementation.Generated))]
                    public static void Initialize()
                    {
                    }
            #endif
                }
            }
            #pragma warning restore

            """;
        addSource("Generated.g.cs", SourceText.From(generatedClassText, Encoding.UTF8));
    }

    public static SourceText EmitInterface(InterfaceModel model)
    {
        var source = new SourceWriter();

        // if nullability is supported emit the nullable directive
        if (model.Nullability != Nullability.None)
        {
            source.WriteLine(
                "#nullable " + (model.Nullability == Nullability.Enabled ? "enable" : "disable")
            );
        }

        source.WriteLine(
            $$"""
            #pragma warning disable
            namespace Refit.Implementation
            {

                partial class Generated
                {

                /// <inheritdoc />
                [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
                [global::System.Diagnostics.DebuggerNonUserCode]
                [{{model.PreserveAttributeDisplayName}}]
                [global::System.Reflection.Obfuscation(Exclude=true)]
                [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
                partial class {{model.Ns}}{{model.ClassDeclaration}}
                    : {{model.InterfaceDisplayName}}
            """
        );

        source.Indentation += 2;
        GenerateConstraints(source, model.Constraints, false);
        source.Indentation--;

        source.WriteLine(
            $$"""
            {
                /// <inheritdoc />
                public global::System.Net.Http.HttpClient Client { get; }
                readonly global::Refit.IRequestBuilder requestBuilder;

                /// <inheritdoc />
                public {{model.Ns}}{{model.ClassSuffix}}(global::System.Net.Http.HttpClient client, global::Refit.IRequestBuilder requestBuilder)
                {
                    Client = client;
                    this.requestBuilder = requestBuilder;
                }

            """
        );

        source.Indentation++;
        var uniqueNames = new UniqueNameBuilder();
        uniqueNames.Reserve(model.MemberNames);

        // Handle Refit Methods
        foreach (var method in model.RefitMethods)
        {
            WriteRefitMethod(source, method, true, uniqueNames);
        }

        foreach (var method in model.DerivedRefitMethods)
        {
            WriteRefitMethod(source, method, false, uniqueNames);
        }

        // Handle non-refit Methods that aren't static or properties or have a method body
        foreach (var method in model.NonRefitMethods)
        {
            WriteNonRefitMethod(source, method);
        }

        // Handle Dispose
        if (model.DisposeMethod)
        {
            WriteDisposableMethod(source);
        }

        source.Indentation -= 2;
        source.WriteLine(
            """
                }
                }
            }

            #pragma warning restore
            """
        );
        return source.ToSourceText();
    }

    /// <summary>
    /// Generates the body of the Refit method
    /// </summary>
    /// <param name="source"></param>
    /// <param name="methodModel"></param>
    /// <param name="isTopLevel">True if directly from the type we're generating for, false for methods found on base interfaces</param>
    /// <param name="uniqueNames">Contains the unique member names in the interface scope.</param>
    private static void WriteRefitMethod(
        SourceWriter source,
        MethodModel methodModel,
        bool isTopLevel,
        UniqueNameBuilder uniqueNames
    )
    {
        var parameterTypesExpression = GenerateTypeParameterExpression(
            source,
            methodModel,
            uniqueNames
        );

        var returnType = methodModel.ReturnType;
        var (isAsync, @return, configureAwait) = methodModel.ReturnTypeMetadata switch
        {
            ReturnTypeInfo.AsyncVoid => (true, "await (", ").ConfigureAwait(false)"),
            ReturnTypeInfo.AsyncResult => (true, "return await (", ").ConfigureAwait(false)"),
            ReturnTypeInfo.Return => (false, "return ", ""),
            _ => throw new ArgumentOutOfRangeException(
                nameof(methodModel.ReturnTypeMetadata),
                methodModel.ReturnTypeMetadata,
                "Unsupported value."
            ),
        };

        var isExplicit = methodModel.IsExplicitInterface || !isTopLevel;
        WriteMethodOpening(source, methodModel, isExplicit, isExplicit, isAsync);

        // Build the list of args for the array
        var argArray = methodModel
            .Parameters.AsArray()
            .Select(static param => $"@{param.MetadataName}")
            .ToArray();

        // List of generic arguments
        var genericArray = methodModel
            .Constraints.AsArray()
            .Select(static typeParam => $"typeof({typeParam.DeclaredName})")
            .ToArray();

        var argumentsArrayString =
            argArray.Length == 0
                ? "global::System.Array.Empty<object>()"
                : $"new object[] {{ {string.Join(", ", argArray)} }}";

        var genericString =
            genericArray.Length > 0
                ? $", new global::System.Type[] {{ {string.Join(", ", genericArray)} }}"
                : string.Empty;

        // Normalize method lookup key: strip explicit interface prefix if present (e.g. IFoo.Bar -> Bar)
        var lookupName = methodModel.Name;
        var lastDotIndex = lookupName.LastIndexOf('.');
        if (lastDotIndex >= 0 && lastDotIndex < lookupName.Length - 1)
        {
            lookupName = lookupName.Substring(lastDotIndex + 1);
        }

        source.WriteLine(
            $"""
            var ______arguments = {argumentsArrayString};
            var ______func = requestBuilder.BuildRestResultFuncForMethod("{lookupName}", {parameterTypesExpression}{genericString} );

            {@return}({returnType})______func(this.Client, ______arguments){configureAwait};
            """
        );

        WriteMethodClosing(source);
    }

    private static void WriteNonRefitMethod(SourceWriter source, MethodModel methodModel)
    {
        var isExplicit = methodModel.IsExplicitInterface;
        WriteMethodOpening(source, methodModel, isExplicit, isExplicit);

        source.WriteLine(
            @"throw new global::System.NotImplementedException(""Either this method has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument."");"
        );

        WriteMethodClosing(source);
    }

    private static void WriteDisposableMethod(SourceWriter source)
    {
        source.WriteLine(
            """

            /// <inheritdoc />
            void global::System.IDisposable.Dispose()
            {
                    Client?.Dispose();
            }
            """
        );
    }

    private static string GenerateTypeParameterExpression(
        SourceWriter source,
        MethodModel methodModel,
        UniqueNameBuilder uniqueNames
    )
    {
        // use Array.Empty if method has no parameters.
        if (methodModel.Parameters.Count == 0)
            return "global::System.Array.Empty<global::System.Type>()";

        // if one of the parameters is/contains a type parameter then it cannot be cached as it will change type between calls.
        if (methodModel.Parameters.Any(x => x.IsGeneric))
        {
            var typeEnumerable = methodModel.Parameters.Select(param => $"typeof({param.Type})");
            return $"new global::System.Type[] {{ {string.Join(", ", typeEnumerable)} }}";
        }

        // find a name and generate field declaration.
        var typeParameterFieldName = uniqueNames.New(TypeParameterVariableName);
        var types = string.Join(", ", methodModel.Parameters.Select(x => $"typeof({x.Type})"));

        source.WriteLine(
            $$"""

            private static readonly global::System.Type[] {{typeParameterFieldName}} = new global::System.Type[] {{{types}} };
            """
        );

        return typeParameterFieldName;
    }

    private static void WriteMethodOpening(
        SourceWriter source,
        MethodModel methodModel,
        bool isDerivedExplicitImpl,
        bool isExplicitInterface,
        bool isAsync = false
    )
    {
        var visibility = !isExplicitInterface ? "public " : string.Empty;
        var async = isAsync ? "async " : "";

        var builder = new StringBuilder();
        builder.Append(
            @$"/// <inheritdoc />
{visibility}{async}{methodModel.ReturnType} "
        );

        if (isExplicitInterface)
        {
            var ct = methodModel.ContainingType;
            if (!ct.StartsWith("global::"))
            {
                ct = "global::" + ct;
            }
            builder.Append(@$"{ct}.");
        }
        builder.Append(@$"{methodModel.DeclaredMethod}(");

        if (methodModel.Parameters.Count > 0)
        {
            var list = new List<string>();
            foreach (var param in methodModel.Parameters)
            {
                var annotation = param.Annotation;
                list.Add($@"{param.Type}{(annotation ? '?' : string.Empty)} @{param.MetadataName}");
            }

            builder.Append(string.Join(", ", list));
        }

        builder.Append(")");

        source.WriteLine();
        source.WriteLine(builder.ToString());
        source.Indentation++;
        GenerateConstraints(source, methodModel.Constraints, isDerivedExplicitImpl || isExplicitInterface);
        source.Indentation--;
        source.WriteLine("{");
        source.Indentation++;
    }

    private static void WriteMethodClosing(SourceWriter source)
    {
        source.Indentation--;
        source.WriteLine("}");
    }

    private static void GenerateConstraints(
        SourceWriter writer,
        ImmutableEquatableArray<TypeConstraint> typeParameters,
        bool isOverrideOrExplicitImplementation
    )
    {
        // Need to loop over the constraints and create them
        foreach (var typeParameter in typeParameters)
        {
            WriteConstraintsForTypeParameter(
                writer,
                typeParameter,
                isOverrideOrExplicitImplementation
            );
        }
    }

    private static void WriteConstraintsForTypeParameter(
        SourceWriter source,
        TypeConstraint typeParameter,
        bool isOverrideOrExplicitImplementation
    )
    {
        // Explicit interface implementations and overrides can only have class or struct constraints

        var parameters = new List<string>();
        var knownConstraints = typeParameter.KnownTypeConstraint;
        if (knownConstraints.HasFlag(KnownTypeConstraint.Class))
        {
            parameters.Add("class");
        }
        if (
            knownConstraints.HasFlag(KnownTypeConstraint.Unmanaged)
            && !isOverrideOrExplicitImplementation
        )
        {
            parameters.Add("unmanaged");
        }
        if (knownConstraints.HasFlag(KnownTypeConstraint.Struct))
        {
            parameters.Add("struct");
        }
        if (
            knownConstraints.HasFlag(KnownTypeConstraint.NotNull)
            && !isOverrideOrExplicitImplementation
        )
        {
            parameters.Add("notnull");
        }
        if (!isOverrideOrExplicitImplementation)
        {
            parameters.AddRange(typeParameter.Constraints);
        }

        // new constraint has to be last
        if (
            knownConstraints.HasFlag(KnownTypeConstraint.New) && !isOverrideOrExplicitImplementation
        )
        {
            parameters.Add("new()");
        }

        if (parameters.Count > 0)
        {
            source.WriteLine($"where {typeParameter.TypeName} : {string.Join(", ", parameters)}");
        }
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/ITypeSymbolExtensions.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;

namespace Refit.Generator
{
    static class ITypeSymbolExtensions
    {
        public static IEnumerable<ITypeSymbol> GetBaseTypesAndThis(this ITypeSymbol? type)
        {
            var current = type;
            while (current != null)
            {
                yield return current;
                current = current.BaseType;
            }
        }

        // Determine if "type" inherits from "baseType", ignoring constructed types, optionally including interfaces,
        // dealing only with original types.
        public static bool InheritsFromOrEquals(
            this ITypeSymbol type,
            ITypeSymbol baseType,
            bool includeInterfaces
        )
        {
            if (!includeInterfaces)
            {
                return InheritsFromOrEquals(type, baseType);
            }

            return type.GetBaseTypesAndThis()
                .Concat(type.AllInterfaces)
                .Any(t => t.Equals(baseType, SymbolEqualityComparer.Default));
        }

        // Determine if "type" inherits from "baseType", ignoring constructed types and interfaces, dealing
        // only with original types.
        public static bool InheritsFromOrEquals(this ITypeSymbol type, ITypeSymbol baseType)
        {
            return type.GetBaseTypesAndThis()
                .Any(t => t.Equals(baseType, SymbolEqualityComparer.Default));
        }
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/ImmutableEquatableArray.cs
================================================
using System.Collections;

namespace Refit.Generator;

internal static class ImmutableEquatableArray
{
    public static ImmutableEquatableArray<T> Empty<T>()
        where T : IEquatable<T> => ImmutableEquatableArray<T>.Empty;

    public static ImmutableEquatableArray<T> ToImmutableEquatableArray<T>(
        this IEnumerable<T>? values
    )
        where T : IEquatable<T> => values == null ? Empty<T>() : new(values);
}

/// <summary>
/// Provides an immutable list implementation which implements sequence equality.
/// </summary>
internal sealed class ImmutableEquatableArray<T>
    : IEquatable<ImmutableEquatableArray<T>>,
        IReadOnlyList<T>
    where T : IEquatable<T>
{
    public static ImmutableEquatableArray<T> Empty { get; } = new(Array.Empty<T>());

    private readonly T[] _values;
    public T this[int index] => _values[index];
    public int Count => _values.Length;

    public ImmutableEquatableArray(T[] values) => _values = values;

    public ImmutableEquatableArray(IEnumerable<T> values) => _values = values.ToArray();

    public T[] AsArray() => _values;

    public bool Equals(ImmutableEquatableArray<T>? other) =>
        other != null && ((ReadOnlySpan<T>)_values).SequenceEqual(other._values);

    public override bool Equals(object? obj) =>
        obj is ImmutableEquatableArray<T> other && Equals(other);

    public override int GetHashCode()
    {
        var hash = 0;
        foreach (T value in _values)
        {
            hash = Combine(hash, value.GetHashCode());
        }

        static int Combine(int h1, int h2)
        {
            // RyuJIT optimizes this to use the ROL instruction
            // Related GitHub pull request: https://github.com/dotnet/coreclr/pull/1830
            uint rol5 = ((uint)h1 << 5) | ((uint)h1 >> 27);
            return ((int)rol5 + h1) ^ h2;
        }

        return hash;
    }

    public Enumerator GetEnumerator() => new(_values);

    IEnumerator<T> IEnumerable<T>.GetEnumerator() => ((IEnumerable<T>)_values).GetEnumerator();

    IEnumerator IEnumerable.GetEnumerator() => _values.GetEnumerator();

    public record struct Enumerator
    {
        private readonly T[] _values;
        private int _index;

        internal Enumerator(T[] values)
        {
            _values = values;
            _index = -1;
        }

        public bool MoveNext()
        {
            var newIndex = _index + 1;

            if ((uint)newIndex < (uint)_values.Length)
            {
                _index = newIndex;
                return true;
            }

            return false;
        }

        public readonly T Current => _values[_index];
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/IncrementalValuesProviderExtensions.cs
================================================
#if ROSLYN_4
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;

namespace Refit.Generator;

internal static class IncrementalValuesProviderExtensions
{
    /// <summary>
    /// Registers an output node into an <see cref="IncrementalGeneratorInitializationContext"/> to output a diagnostic.
    /// </summary>
    /// <param name="context">The input <see cref="IncrementalGeneratorInitializationContext"/> instance.</param>
    /// <param name="diagnostic">The input <see cref="IncrementalValuesProvider{TValues}"/> sequence of diagnostics.</param>
    public static void ReportDiagnostics(
        this IncrementalGeneratorInitializationContext context,
        IncrementalValuesProvider<Diagnostic> diagnostic
    )
    {
        context.RegisterSourceOutput(
            diagnostic,
            static (context, diagnostic) => context.ReportDiagnostic(diagnostic)
        );
    }

    /// <summary>
    /// Registers an output node into an <see cref="IncrementalGeneratorInitializationContext"/> to output diagnostics.
    /// </summary>
    /// <param name="context">The input <see cref="IncrementalGeneratorInitializationContext"/> instance.</param>
    /// <param name="diagnostics">The input <see cref="IncrementalValuesProvider{TValues}"/> sequence of diagnostics.</param>
    public static void ReportDiagnostics(
        this IncrementalGeneratorInitializationContext context,
        IncrementalValueProvider<ImmutableEquatableArray<Diagnostic>> diagnostics
    )
    {
        context.RegisterSourceOutput(
            diagnostics,
            static (context, diagnostics) =>
            {
                foreach (var diagnostic in diagnostics)
                {
                    context.ReportDiagnostic(diagnostic);
                }
            }
        );
    }

    /// <summary>
    /// Registers an implementation source output for the provided mappers.
    /// </summary>
    /// <param name="context">The context, on which the output is registered.</param>
    /// <param name="model">The interfaces stubs.</param>
    public static void EmitSource(
        this IncrementalGeneratorInitializationContext context,
        IncrementalValuesProvider<InterfaceModel> model
    )
    {
        context.RegisterImplementationSourceOutput(
            model,
            static (spc, model) =>
            {
                var mapperText = Emitter.EmitInterface(model);
                spc.AddSource(model.FileName, mapperText);
            }
        );
    }
}
#endif


================================================
FILE: InterfaceStubGenerator.Shared/InterfaceStubGenerator.Shared.projitems
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
    <HasSharedItems>true</HasSharedItems>
    <SharedGUID>b591423d-f92d-4e00-b0eb-615c9853506c</SharedGUID>
  </PropertyGroup>
  <PropertyGroup Label="Configuration">
    <Import_RootNamespace>InterfaceStubGenerator.Shared</Import_RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="$(MSBuildThisFileDirectory)DiagnosticDescriptors.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Emitter.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)ImmutableEquatableArray.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)IncrementalValuesProviderExtensions.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)InterfaceStubGenerator.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)IsExternalInit.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)ITypeSymbolExtensions.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\ContextGenerationModel.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\InterfaceModel.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\MethodModel.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\ParameterModel.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\TypeConstraint.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Models\WellKnownTypes.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Parser.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Polyfills\IndexRange.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)SourceWriter.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UniqueNameBuilder.cs" />
  </ItemGroup>
</Project>

================================================
FILE: InterfaceStubGenerator.Shared/InterfaceStubGenerator.Shared.shproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Label="Globals">
    <ProjectGuid>b591423d-f92d-4e00-b0eb-615c9853506c</ProjectGuid>
    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
  <PropertyGroup />
  <Import Project="InterfaceStubGenerator.Shared.projitems" Label="Shared" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>


================================================
FILE: InterfaceStubGenerator.Shared/InterfaceStubGenerator.cs
================================================
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;

namespace Refit.Generator
{
    /// <summary>
    /// InterfaceStubGenerator.
    /// </summary>
    [Generator]
#if ROSLYN_4
    public class InterfaceStubGeneratorV2 : IIncrementalGenerator
#else
    public class InterfaceStubGenerator : ISourceGenerator
#endif
    {
        private const string TypeParameterVariableName = "______typeParameters";

#if !ROSLYN_4
        /// <summary>
        /// Executes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void Execute(GeneratorExecutionContext context)
        {
            if (context.SyntaxReceiver is not SyntaxReceiver receiver)
                return;

            context.AnalyzerConfigOptions.GlobalOptions.TryGetValue(
                "build_property.RefitInternalNamespace",
                out var refitInternalNamespace
            );

            var parseStep = Parser.GenerateInterfaceStubs(
                (CSharpCompilation)context.Compilation,
                refitInternalNamespace,
                receiver.CandidateMethods.ToImmutableArray(),
                receiver.CandidateInterfaces.ToImmutableArray(),
                context.CancellationToken
            );

            foreach (var diagnostic in parseStep.diagnostics)
            {
                context.ReportDiagnostic(diagnostic);
            }

            foreach (var interfaceModel in parseStep.contextGenerationSpec.Interfaces)
            {
                var interfaceText = Emitter.EmitInterface(interfaceModel);
                context.AddSource(
                    interfaceModel.FileName,
                    interfaceText
                );
            }

            Emitter.EmitSharedCode(
                parseStep.contextGenerationSpec,
                (name, code) => context.AddSource(name, code)
            );
        }
#endif

#if ROSLYN_4
        /// <inheritdoc/>
        public void Initialize(IncrementalGeneratorInitializationContext context)
        {
            var candidateMethodsProvider = context.SyntaxProvider.CreateSyntaxProvider(
                (syntax, cancellationToken) =>
                    syntax
                        is MethodDeclarationSyntax
                        {
                            Parent: InterfaceDeclarationSyntax,
                            AttributeLists.Count: > 0
                        },
                (context, cancellationToken) => (MethodDeclarationSyntax)context.Node
            );

            var candidateInterfacesProvider = context.SyntaxProvider.CreateSyntaxProvider(
                (syntax, cancellationToken) =>
                    syntax is InterfaceDeclarationSyntax { BaseList: not null },
                (context, cancellationToken) => (InterfaceDeclarationSyntax)context.Node
            );

            var refitInternalNamespace = context.AnalyzerConfigOptionsProvider.Select(
                (analyzerConfigOptionsProvider, cancellationToken) =>
                    analyzerConfigOptionsProvider.GlobalOptions.TryGetValue(
                        "build_property.RefitInternalNamespace",
                        out var refitInternalNamespace
                    )
                        ? refitInternalNamespace
                        : null
            );

            var inputs = candidateMethodsProvider
                .Collect()
                .Combine(candidateInterfacesProvider.Collect())
                .Select(
                    (combined, cancellationToken) =>
                        (candidateMethods: combined.Left, candidateInterfaces: combined.Right)
                )
                .Combine(refitInternalNamespace)
                .Combine(context.CompilationProvider)
                .Select(
                    (combined, cancellationToken) =>
                        (
                            combined.Left.Left.candidateMethods,
                            combined.Left.Left.candidateInterfaces,
                            refitInternalNamespace: combined.Left.Right,
                            compilation: combined.Right
                        )
                );

            var parseStep = inputs.Select(
                (collectedValues, cancellationToken) =>
                {
                    return Parser.GenerateInterfaceStubs(
                        (CSharpCompilation)collectedValues.compilation,
                        collectedValues.refitInternalNamespace,
                        collectedValues.candidateMethods,
                        collectedValues.candidateInterfaces,
                        cancellationToken
                    );
                }
            );

            var diagnostics = parseStep
                .Select(static (x, _) => x.diagnostics.ToImmutableEquatableArray())
                .WithTrackingName(RefitGeneratorStepName.ReportDiagnostics);
            context.ReportDiagnostics(diagnostics);

            var contextModel = parseStep.Select(static (x, _) => x.Item2);
            var interfaceModels = contextModel
                .SelectMany(static (x, _) => x.Interfaces)
                .WithTrackingName(RefitGeneratorStepName.BuildRefit);
            context.EmitSource(interfaceModels);

            context.RegisterImplementationSourceOutput(
                contextModel,
                static (spc, model) =>
                {
                    Emitter.EmitSharedCode(model, (name, code) => spc.AddSource(name, code));
                }
            );
        }
#else
        /// <summary>
        /// Initializes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void Initialize(GeneratorInitializationContext context)
        {
            context.RegisterForSyntaxNotifications(() => new SyntaxReceiver());
        }

        class SyntaxReceiver : ISyntaxReceiver
        {
            public List<MethodDeclarationSyntax> CandidateMethods { get; } = [];

            public List<InterfaceDeclarationSyntax> CandidateInterfaces { get; } = [];

            public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
            {
                if (
                    syntaxNode is MethodDeclarationSyntax methodDeclarationSyntax
                    && methodDeclarationSyntax.Parent is InterfaceDeclarationSyntax
                    && methodDeclarationSyntax.AttributeLists.Count > 0
                )
                {
                    CandidateMethods.Add(methodDeclarationSyntax);
                }

                if (syntaxNode is InterfaceDeclarationSyntax iface && iface.BaseList is not null)
                {
                    CandidateInterfaces.Add(iface);
                }
            }
        }
#endif
    }

    internal static class RefitGeneratorStepName
    {
        public const string ReportDiagnostics = "ReportDiagnostics";
        public const string BuildRefit = "BuildRefit";
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/IsExternalInit.cs
================================================
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#if NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48

using System.ComponentModel;

// ReSharper disable once CheckNamespace
namespace System.Runtime.CompilerServices
{
    /// <summary>
    /// Reserved to be used by the compiler for tracking metadata.
    /// This class should not be used by developers in source code.
    /// </summary>
    [EditorBrowsable(EditorBrowsableState.Never)]
    internal static class IsExternalInit { }
}

#endif


================================================
FILE: InterfaceStubGenerator.Shared/Models/ContextGenerationModel.cs
================================================
namespace Refit.Generator;

internal sealed record ContextGenerationModel(
    string RefitInternalNamespace,
    string PreserveAttributeDisplayName,
    ImmutableEquatableArray<InterfaceModel> Interfaces
);


================================================
FILE: InterfaceStubGenerator.Shared/Models/InterfaceModel.cs
================================================
namespace Refit.Generator;

internal sealed record InterfaceModel(
    string PreserveAttributeDisplayName,
    string FileName,
    string ClassName,
    string Ns,
    string ClassDeclaration,
    string InterfaceDisplayName,
    string ClassSuffix,
    ImmutableEquatableArray<TypeConstraint> Constraints,
    ImmutableEquatableArray<string> MemberNames,
    ImmutableEquatableArray<MethodModel> NonRefitMethods,
    ImmutableEquatableArray<MethodModel> RefitMethods,
    ImmutableEquatableArray<MethodModel> DerivedRefitMethods,
    Nullability Nullability,
    bool DisposeMethod
);

internal enum Nullability : byte
{
    Enabled,
    Disabled,
    None
}


================================================
FILE: InterfaceStubGenerator.Shared/Models/MethodModel.cs
================================================
using System.Collections.Immutable;

namespace Refit.Generator;

internal sealed record MethodModel(
    string Name,
    string ReturnType,
    string ContainingType,
    string DeclaredMethod,
    ReturnTypeInfo ReturnTypeMetadata,
    ImmutableEquatableArray<ParameterModel> Parameters,
    ImmutableEquatableArray<TypeConstraint> Constraints,
    bool IsExplicitInterface
);

internal enum ReturnTypeInfo : byte
{
    Return,
    AsyncVoid,
    AsyncResult
}


================================================
FILE: InterfaceStubGenerator.Shared/Models/ParameterModel.cs
================================================
namespace Refit.Generator;

internal sealed record ParameterModel(
    string MetadataName,
    string Type,
    bool Annotation,
    bool IsGeneric
);


================================================
FILE: InterfaceStubGenerator.Shared/Models/TypeConstraint.cs
================================================
namespace Refit.Generator;

internal readonly record struct TypeConstraint(
    string TypeName,
    string DeclaredName,
    KnownTypeConstraint KnownTypeConstraint,
    ImmutableEquatableArray<string> Constraints
);

[Flags]
internal enum KnownTypeConstraint : byte
{
    None = 0,
    Class = 1 << 0,
    Unmanaged = 1 << 1,
    Struct = 1 << 2,
    NotNull = 1 << 3,
    New = 1 << 4
}


================================================
FILE: InterfaceStubGenerator.Shared/Models/WellKnownTypes.cs
================================================
using Microsoft.CodeAnalysis;

namespace Refit.Generator;

/// <summary>
/// WellKnownTypes.
/// </summary>
public class WellKnownTypes(Compilation compilation)
{
    readonly Dictionary<string, INamedTypeSymbol?> cachedTypes = [];

    /// <summary>
    /// Gets this instance.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <returns></returns>
    public INamedTypeSymbol Get<T>() => Get(typeof(T));

    /// <summary>
    /// Gets the specified type.
    /// </summary>
    /// <param name="type">The type.</param>
    /// <returns></returns>
    /// <exception cref="InvalidOperationException">Could not get name of type " + type</exception>
    public INamedTypeSymbol Get(Type type)
    {
        if (type is null)
        {
            throw new ArgumentNullException(nameof(type));
        }

        return Get(type.FullName ?? throw new InvalidOperationException("Could not get name of type " + type));
    }

    /// <summary>
    /// Tries the get.
    /// </summary>
    /// <param name="typeFullName">Full name of the type.</param>
    /// <returns></returns>
    public INamedTypeSymbol? TryGet(string typeFullName)
    {
        if (cachedTypes.TryGetValue(typeFullName, out var typeSymbol))
        {
            return typeSymbol;
        }

        typeSymbol = compilation.GetTypeByMetadataName(typeFullName);
        cachedTypes.Add(typeFullName, typeSymbol);

        return typeSymbol;
    }

    INamedTypeSymbol Get(string typeFullName) =>
        TryGet(typeFullName) ?? throw new InvalidOperationException("Could not get type " + typeFullName);
}


================================================
FILE: InterfaceStubGenerator.Shared/Parser.cs
================================================
using System.Collections.Immutable;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;

namespace Refit.Generator;

internal static class Parser
{
    /// <summary>
    /// Generates the interface stubs.
    /// </summary>
    /// <param name="compilation">The compilation.</param>
    /// <param name="refitInternalNamespace">The refit internal namespace.</param>
    /// <param name="candidateMethods">The candidate methods.</param>
    /// <param name="candidateInterfaces">The candidate interfaces.</param>
    /// <param name="cancellationToken">The cancellation token.</param>
    /// <returns></returns>
    public static (
        List<Diagnostic> diagnostics,
        ContextGenerationModel contextGenerationSpec
    ) GenerateInterfaceStubs(
        CSharpCompilation compilation,
        string? refitInternalNamespace,
        ImmutableArray<MethodDeclarationSyntax> candidateMethods,
        ImmutableArray<InterfaceDeclarationSyntax> candidateInterfaces,
        CancellationToken cancellationToken
    )
    {
        if (compilation == null)
            throw new ArgumentNullException(nameof(compilation));

        var wellKnownTypes = new WellKnownTypes(compilation);

        refitInternalNamespace = $"{refitInternalNamespace ?? string.Empty}RefitInternalGenerated";

        // Remove - as they are valid in csproj, but invalid in a namespace
        refitInternalNamespace = refitInternalNamespace.Replace('-', '_').Replace('@', '_');

        // we're going to create a new compilation that contains the attribute.
        // TODO: we should allow source generators to provide source during initialize, so that this step isn't required.
        var options = (CSharpParseOptions)compilation.SyntaxTrees[0].Options;

        var disposableInterfaceSymbol = wellKnownTypes.Get(typeof(IDisposable));
        var httpMethodBaseAttributeSymbol = wellKnownTypes.TryGet(
            "Refit.HttpMethodAttribute"
        );

        var diagnostics = new List<Diagnostic>();
        if (httpMethodBaseAttributeSymbol == null)
        {
            diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.RefitNotReferenced, null));
            return (
                diagnostics,
                new ContextGenerationModel(
                    refitInternalNamespace,
                    string.Empty,
                    ImmutableEquatableArray.Empty<InterfaceModel>()
                )
            );
        }

        // Check the candidates and keep the ones we're actually interested in

#pragma warning disable RS1024 // Compare symbols correctly
        var interfaceToNullableEnabledMap = new Dictionary<INamedTypeSymbol, bool>(
            SymbolEqualityComparer.Default
        );
#pragma warning restore RS1024 // Compare symbols correctly
        var methodSymbols = new List<IMethodSymbol>();
        foreach (var group in candidateMethods.GroupBy(m => m.SyntaxTree))
        {
            var model = compilation.GetSemanticModel(group.Key);
            foreach (var method in group)
            {
                // Get the symbol being declared by the method
                var methodSymbol = model.GetDeclaredSymbol(
                    method,
                    cancellationToken: cancellationToken
                );
                if (!IsRefitMethod(methodSymbol, httpMethodBaseAttributeSymbol))
                    continue;

                var isAnnotated =
                    compilation.Options.NullableContextOptions == NullableContextOptions.Enable
                    || model.GetNullableContext(method.SpanStart) == NullableContext.Enabled;
                interfaceToNullableEnabledMap[methodSymbol!.ContainingType] = isAnnotated;

                methodSymbols.Add(methodSymbol!);
            }
        }

        var interfaces = methodSymbols
            .GroupBy<IMethodSymbol, INamedTypeSymbol>(
                m => m.ContainingType,
                SymbolEqualityComparer.Default
            )
            .ToDictionary<
                IGrouping<INamedTypeSymbol, IMethodSymbol>,
                INamedTypeSymbol,
                List<IMethodSymbol>
            >(g => g.Key, v => [.. v], SymbolEqualityComparer.Default);

        // Look through the candidate interfaces
        var interfaceSymbols = new List<INamedTypeSymbol>();
        foreach (var group in candidateInterfaces.GroupBy(i => i.SyntaxTree))
        {
            var model = compilation.GetSemanticModel(group.Key);
            foreach (var iface in group)
            {
                // get the symbol belonging to the interface
                var ifaceSymbol = model.GetDeclaredSymbol(
                    iface,
                    cancellationToken: cancellationToken
                );

                // See if we already know about it, might be a dup
                if (ifaceSymbol is null || interfaces.ContainsKey(ifaceSymbol))
                    continue;

                // The interface has no refit methods, but its base interfaces might
                var hasDerivedRefit = ifaceSymbol
                    .AllInterfaces.SelectMany(i => i.GetMembers().OfType<IMethodSymbol>())
                    .Any(m => IsRefitMethod(m, httpMethodBaseAttributeSymbol));

                if (hasDerivedRefit)
                {
                    // Add the interface to the generation list with an empty set of methods
                    // The logic already looks for base refit methods
                    interfaces.Add(ifaceSymbol, []);
                    var isAnnotated =
                        model.GetNullableContext(iface.SpanStart) == NullableContext.Enabled;

                    interfaceToNullableEnabledMap[ifaceSymbol] = isAnnotated;
                }
            }
        }

        cancellationToken.ThrowIfCancellationRequested();

        // Bail out if there aren't any interfaces to generate code for. This may be the case with transitives
        if (interfaces.Count == 0)
            return (
                diagnostics,
                new ContextGenerationModel(
                    refitInternalNamespace,
                    string.Empty,
                    ImmutableEquatableArray.Empty<InterfaceModel>()
                )
            );

        var supportsNullable = options.LanguageVersion >= LanguageVersion.CSharp8;

        var keyCount = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);

        var attributeText =
            @$"
#pragma warning disable
namespace {refitInternalNamespace}
{{
    [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
    [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
    [global::System.AttributeUsage (global::System.AttributeTargets.Class | global::System.AttributeTargets.Struct | global::System.AttributeTargets.Enum | global::System.AttributeTargets.Constructor | global::System.AttributeTargets.Method | global::System.AttributeTargets.Property | global::System.AttributeTargets.Field | global::System.AttributeTargets.Event | global::System.AttributeTargets.Interface | global::System.AttributeTargets.Delegate)]
    sealed class PreserveAttribute : global::System.Attribute
    {{
        //
        // Fields
        //
        public bool AllMembers;

        public bool Conditional;
    }}
}}
#pragma warning restore
";

        // TODO: Delete?
        // Is it necessary to add the attributes to the compilation now, does it affect the users ide experience?
        // Is it needed in order to get the preserve attribute display name.
        // Will the compilation ever change this.
        compilation = compilation.AddSyntaxTrees(
            CSharpSyntaxTree.ParseText(
                SourceText.From(attributeText, Encoding.UTF8),
                options,
                cancellationToken: cancellationToken
            )
        );

        // get the newly bound attribute
        var preserveAttributeSymbol = compilation.GetTypeByMetadataName(
            $"{refitInternalNamespace}.PreserveAttribute"
        )!;

        var preserveAttributeDisplayName = preserveAttributeSymbol.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        var interfaceModels = new List<InterfaceModel>();
        // group the fields by interface and generate the source
        foreach (var group in interfaces)
        {
            cancellationToken.ThrowIfCancellationRequested();

            // each group is keyed by the Interface INamedTypeSymbol and contains the members
            // with a refit attribute on them. Types may contain other members, without the attribute, which we'll
            // need to check for and error out on
            var keyName = group.Key.Name;
            int value;
            while (keyCount.TryGetValue(keyName, out value))
            {
                keyName = $"{keyName}{++value}";
            }
            keyCount[keyName] = value;
            var fileName = $"{keyName}.g.cs";

            var interfaceModel = ProcessInterface(
                fileName,
                diagnostics,
                group.Key,
                group.Value,
                preserveAttributeDisplayName,
                disposableInterfaceSymbol,
                httpMethodBaseAttributeSymbol,
                supportsNullable,
                interfaceToNullableEnabledMap[group.Key]
            );

            interfaceModels.Add(interfaceModel);
        }

        var contextGenerationSpec = new ContextGenerationModel(
            refitInternalNamespace,
            preserveAttributeDisplayName,
            interfaceModels.ToImmutableEquatableArray()
        );
        return (diagnostics, contextGenerationSpec);
    }

    static InterfaceModel ProcessInterface(
        string fileName,
        List<Diagnostic> diagnostics,
        INamedTypeSymbol interfaceSymbol,
        List<IMethodSymbol> refitMethods,
        string preserveAttributeDisplayName,
        ISymbol disposableInterfaceSymbol,
        INamedTypeSymbol httpMethodBaseAttributeSymbol,
        bool supportsNullable,
        bool nullableEnabled
    )
    {
        // Get the class name with the type parameters, then remove the namespace
        var className = interfaceSymbol.ToDisplayString();
        var lastDot = className.LastIndexOf('.');
        if (lastDot > 0)
        {
            className = className.Substring(lastDot + 1);
        }
        var classDeclaration = $"{interfaceSymbol.ContainingType?.Name}{className}";

        // Get the class name itself
        var classSuffix = $"{interfaceSymbol.ContainingType?.Name}{interfaceSymbol.Name}";
        var ns = interfaceSymbol.ContainingNamespace?.ToDisplayString();

        // if it's the global namespace, our lookup rules say it should be the same as the class name
        if (interfaceSymbol.ContainingNamespace is { IsGlobalNamespace: true })
        {
            ns = string.Empty;
        }

        // Remove dots
        ns = ns!.Replace(".", "");
        var interfaceDisplayName = interfaceSymbol.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        // Get any other methods on the refit interfaces. We'll need to generate something for them and warn
        var nonRefitMethods = interfaceSymbol
            .GetMembers()
            .OfType<IMethodSymbol>()
            .Except(refitMethods, SymbolEqualityComparer.Default)
            .Cast<IMethodSymbol>()
            .ToArray();

        // get methods for all inherited
        var derivedMethods = interfaceSymbol
            .AllInterfaces.SelectMany(i => i.GetMembers().OfType<IMethodSymbol>())
            .ToList();

        // Look for disposable
        var disposeMethod = derivedMethods.Find(
            m =>
                m.ContainingType?.Equals(disposableInterfaceSymbol, SymbolEqualityComparer.Default)
                == true
        );
        if (disposeMethod != null)
        {
            //remove it from the derived methods list so we don't process it with the rest
            derivedMethods.Remove(disposeMethod);
        }

        // Pull out the refit methods from the derived types
        var derivedRefitMethods = derivedMethods
            .Where(m => IsRefitMethod(m, httpMethodBaseAttributeSymbol))
            .ToArray();
        var derivedNonRefitMethods = derivedMethods
            .Except(derivedRefitMethods, SymbolEqualityComparer.Default)
            .Cast<IMethodSymbol>()
            .ToArray();

        // Exclude base interface methods that the current interface explicitly implements.
        // This avoids false positive RF001 diagnostics for cases like:
        // interface IFoo { int Bar(); } and interface IRemoteFoo : IFoo { [Get] abstract int IFoo.Bar(); }
        if (derivedNonRefitMethods.Length > 0)
        {
            var explicitlyImplementedBaseMethods = new HashSet<IMethodSymbol>(
                SymbolEqualityComparer.Default
            );

            foreach (var member in interfaceSymbol.GetMembers().OfType<IMethodSymbol>())
            {
                foreach (var baseMethod in member.ExplicitInterfaceImplementations)
                {
                    // Use OriginalDefinition for robustness when comparing generic methods
                    explicitlyImplementedBaseMethods.Add(
                        baseMethod.OriginalDefinition ?? baseMethod
                    );
                }
            }

            if (explicitlyImplementedBaseMethods.Count > 0)
            {
                derivedNonRefitMethods = derivedNonRefitMethods
                    .Where(m => !explicitlyImplementedBaseMethods.Contains(m.OriginalDefinition ?? m))
                    .ToArray();
            }
        }

        var memberNames = interfaceSymbol
            .GetMembers()
            .Select(x => x.Name)
            .Distinct()
            .ToImmutableEquatableArray();

        // Handle Refit Methods
        var refitMethodsArray = refitMethods
            .Select(m => ParseMethod(m, true))
            .ToImmutableEquatableArray();

        // Only include refit methods discovered on base interfaces here.
        // Do NOT duplicate the current interface's refit methods.
        var derivedRefitMethodsArray = derivedRefitMethods
            .Select(m => ParseMethod(m, false))
            .ToImmutableEquatableArray();

        // Handle non-refit Methods that aren't static or properties or have a method body
        var nonRefitMethodModelList = new List<MethodModel>();
        foreach (var method in nonRefitMethods)
        {
            if (
                method.IsStatic
                || method.MethodKind == MethodKind.PropertyGet
                || method.MethodKind == MethodKind.PropertySet
                || !method.IsAbstract
            )
                continue;

            nonRefitMethodModelList.Add(ParseNonRefitMethod(method, diagnostics, isDerived: false));
        }
        foreach (var method in derivedNonRefitMethods)
        {
            if (
                method.IsStatic
                || method.MethodKind == MethodKind.PropertyGet
                || method.MethodKind == MethodKind.PropertySet
                || !method.IsAbstract
            )
                continue;

            // Derived non-refit methods should be emitted as explicit interface implementations
            nonRefitMethodModelList.Add(ParseNonRefitMethod(method, diagnostics, isDerived: true));
        }

        var nonRefitMethodModels = nonRefitMethodModelList.ToImmutableEquatableArray();

        var constraints = GenerateConstraints(interfaceSymbol.TypeParameters, false);
        var hasDispose = disposeMethod != null;
        var nullability = (supportsNullable, nullableEnabled) switch
        {
            (false, _) => Nullability.None,
            (true, true) => Nullability.Enabled,
            (true, false) => Nullability.Disabled,
        };
        return new InterfaceModel(
            preserveAttributeDisplayName,
            fileName,
            className,
            ns,
            classDeclaration,
            interfaceDisplayName,
            classSuffix,
            constraints,
            memberNames,
            nonRefitMethodModels,
            refitMethodsArray,
            derivedRefitMethodsArray,
            nullability,
            hasDispose
        );
    }

    private static MethodModel ParseNonRefitMethod(
        IMethodSymbol methodSymbol,
        List<Diagnostic> diagnostics,
        bool isDerived
    )
    {
        // report invalid error diagnostic
        foreach (var location in methodSymbol.Locations)
        {
            var diagnostic = Diagnostic.Create(
                DiagnosticDescriptors.InvalidRefitMember,
                location,
                methodSymbol.ContainingType.Name,
                methodSymbol.Name
            );
            diagnostics.Add(diagnostic);
        }

        // Parse like a regular method, but force explicit implementation for derived base-interface methods
        var explicitImpl = methodSymbol.ExplicitInterfaceImplementations.FirstOrDefault();
        var containingTypeSymbol = explicitImpl?.ContainingType ?? methodSymbol.ContainingType;
        var containingType = containingTypeSymbol.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        // Method name should be simple name only (never include interface qualifier)
        var declaredBaseName = methodSymbol.Name;
        var lastDot = declaredBaseName.LastIndexOf('.');
        if (lastDot >= 0)
        {
            declaredBaseName = declaredBaseName.Substring(lastDot + 1);
        }

        if (methodSymbol.TypeParameters.Length > 0)
        {
            var typeParams = string.Join(
                ", ",
                methodSymbol.TypeParameters.Select(
                    tp => tp.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)
                )
            );
            declaredBaseName += $"<{typeParams}>";
        }

        var returnType = methodSymbol.ReturnType.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        var returnTypeInfo = methodSymbol.ReturnType.MetadataName switch
        {
            "Task" => ReturnTypeInfo.AsyncVoid,
            "Task`1" or "ValueTask`1" => ReturnTypeInfo.AsyncResult,
            _ => ReturnTypeInfo.Return,
        };

        var parameters = methodSymbol.Parameters.Select(ParseParameter).ToImmutableEquatableArray();

        var isExplicit = isDerived || explicitImpl is not null;
        var constraints = GenerateConstraints(methodSymbol.TypeParameters, isExplicit);

        return new MethodModel(
            methodSymbol.Name,
            returnType,
            containingType,
            declaredBaseName,
            returnTypeInfo,
            parameters,
            constraints,
            isExplicit
        );
    }

    private static bool IsRefitMethod(
        IMethodSymbol? methodSymbol,
        INamedTypeSymbol httpMethodAttribute
    )
    {
        return methodSymbol
                ?.GetAttributes()
                .Any(ad => ad.AttributeClass?.InheritsFromOrEquals(httpMethodAttribute) == true)
            == true;
    }

    private static ImmutableEquatableArray<TypeConstraint> GenerateConstraints(
        ImmutableArray<ITypeParameterSymbol> typeParameters,
        bool isOverrideOrExplicitImplementation
    )
    {
        // Need to loop over the constraints and create them
        return typeParameters
            .Select(
                typeParameter =>
                    ParseConstraintsForTypeParameter(
                        typeParameter,
                        isOverrideOrExplicitImplementation
                    )
            )
            .ToImmutableEquatableArray();
    }

    private static TypeConstraint ParseConstraintsForTypeParameter(
        ITypeParameterSymbol typeParameter,
        bool isOverrideOrExplicitImplementation
    )
    {
        // Explicit interface implementations and overrides can only have class or struct constraints
        var known = KnownTypeConstraint.None;

        if (typeParameter.HasReferenceTypeConstraint)
        {
            known |= KnownTypeConstraint.Class;
        }
        if (typeParameter.HasUnmanagedTypeConstraint && !isOverrideOrExplicitImplementation)
        {
            known |= KnownTypeConstraint.Unmanaged;
        }

        // unmanaged constraints are both structs and unmanaged so the struct constraint is redundant
        if (typeParameter.HasValueTypeConstraint && !typeParameter.HasUnmanagedTypeConstraint)
        {
            known |= KnownTypeConstraint.Struct;
        }
        if (typeParameter.HasNotNullConstraint && !isOverrideOrExplicitImplementation)
        {
            known |= KnownTypeConstraint.NotNull;
        }

        var constraints = ImmutableEquatableArray<string>.Empty;
        if (!isOverrideOrExplicitImplementation)
        {
            constraints = typeParameter
                .ConstraintTypes.Select(
                    typeConstraint =>
                        typeConstraint.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)
                )
                .ToImmutableEquatableArray();
        }

        // new constraint has to be last
        if (typeParameter.HasConstructorConstraint && !isOverrideOrExplicitImplementation)
        {
            known |= KnownTypeConstraint.New;
        }

        var declaredName = typeParameter.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
        return new TypeConstraint(typeParameter.Name, declaredName, known, constraints);
    }

    private static ParameterModel ParseParameter(IParameterSymbol param)
    {
        var annotation =
            !param.Type.IsValueType && param.NullableAnnotation == NullableAnnotation.Annotated;

        var paramType = param.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
        var isGeneric = ContainsTypeParameter(param.Type);

        return new ParameterModel(param.MetadataName, paramType, annotation, isGeneric);
    }

    private static bool ContainsTypeParameter(ITypeSymbol symbol)
    {
        if (symbol is ITypeParameterSymbol)
            return true;

        if (symbol is not INamedTypeSymbol { TypeParameters.Length: > 0 } namedType)
            return false;

        foreach (var typeArg in namedType.TypeArguments)
        {
            if (ContainsTypeParameter(typeArg))
                return true;
        }

        return false;
    }

    private static MethodModel ParseMethod(IMethodSymbol methodSymbol, bool isImplicitInterface)
    {
        var returnType = methodSymbol.ReturnType.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        // For explicit interface implementations, the containing type for the explicit method signature
        // must be the interface being implemented (e.g. IFoo), not the interface that declares it.
        var explicitImpl = methodSymbol.ExplicitInterfaceImplementations.FirstOrDefault();
        var containingTypeSymbol = explicitImpl?.ContainingType ?? methodSymbol.ContainingType;
        var containingType = containingTypeSymbol.ToDisplayString(
            SymbolDisplayFormat.FullyQualifiedFormat
        );

        // Simple method name (strip any explicit interface qualifier if present)
        var declaredBaseName = methodSymbol.Name;
        var lastDot = declaredBaseName.LastIndexOf('.');
        if (lastDot >= 0)
        {
            declaredBaseName = declaredBaseName.Substring(lastDot + 1);
        }

        if (methodSymbol.TypeParameters.Length > 0)
        {
            var typeParams = string.Join(
                ", ",
                methodSymbol.TypeParameters.Select(
                    tp => tp.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)
                )
            );
            declaredBaseName += $"<{typeParams}>";
        }

        var returnTypeInfo = methodSymbol.ReturnType.MetadataName switch
        {
            "Task" => ReturnTypeInfo.AsyncVoid,
            "Task`1" or "ValueTask`1" => ReturnTypeInfo.AsyncResult,
            _ => ReturnTypeInfo.Return,
        };

        var parameters = methodSymbol.Parameters.Select(ParseParameter).ToImmutableEquatableArray();

        var isExplicit = explicitImpl is not null;
        var constraints = GenerateConstraints(methodSymbol.TypeParameters, isExplicit || !isImplicitInterface);

        return new MethodModel(
            methodSymbol.Name,
            returnType,
            containingType,
            declaredBaseName,
            returnTypeInfo,
            parameters,
            constraints,
            isExplicit
        );
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/Polyfills/IndexRange.cs
================================================
#if NETSTANDARD2_0 || NET462
namespace System
{
    /// <summary>
    /// Minimal polyfill for <c>System.Index</c> to support the C# index syntax when targeting
    /// .NET Standard 2.0 or .NET Framework 4.6.2. This implementation only exposes the members
    /// required by this codebase and is not a full replacement for the BCL type.
    /// </summary>
    /// <remarks>
    /// This type exists solely to allow the source to compile on older targets where
    /// <c>System.Index</c> is not available. It should not be used as a general-purpose
    /// substitute outside of this project.
    /// </remarks>
    public readonly record struct Index
    {
        private readonly int _value;
        private readonly bool _fromEnd;

        /// <summary>
        /// Creates a new <see cref="Index"/> from the start of a sequence.
        /// </summary>
        /// <param name="value">The zero-based index from the start.</param>
        public Index(int value) { _value = value; _fromEnd = false; }

        /// <summary>
        /// Creates a new <see cref="Index"/> with the specified origin.
        /// </summary>
        /// <param name="value">The index position value.</param>
        /// <param name="fromEnd">
        /// When <see langword="true"/>, the index is calculated from the end of the sequence; otherwise from the start.
        /// </param>
        public Index(int value, bool fromEnd) { _value = value; _fromEnd = fromEnd; }

        /// <summary>
        /// Gets the index value.
        /// </summary>
        public int Value => _value;

        /// <summary>
        /// Gets a value indicating whether the index is from the end of the sequence.
        /// </summary>
        public bool IsFromEnd => _fromEnd;

        /// <summary>
        /// Gets an <see cref="Index"/> that points to the start of a sequence.
        /// </summary>
        public static Index Start => new(0);

        /// <summary>
        /// Gets an <see cref="Index"/> that points just past the end of a sequence.
        /// </summary>
        public static Index End => new(0, true);

        /// <summary>
        /// Implicitly converts an <see cref="int"/> to an <see cref="Index"/> from the start.
        /// </summary>
        /// <param name="value">The zero-based index from the start.</param>
        public static implicit operator Index(int value) => new(value);
    }

    /// <summary>
    /// Minimal polyfill for <c>System.Range</c> to support the C# range syntax when targeting
    /// .NET Standard 2.0 or .NET Framework 4.6.2. This implementation only exposes the members
    /// required by this codebase and is not a full replacement for the BCL type.
    /// </summary>
    /// <remarks>
    /// This type exists solely to allow the source to compile on older targets where
    /// <c>System.Range</c> is not available. It should not be used as a general-purpose
    /// substitute outside of this project.
    /// </remarks>
    public readonly record struct Range
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Range"/> struct.
        /// </summary>
        /// <param name="start">The inclusive start <see cref="Index"/>.</param>
        /// <param name="end">The exclusive end <see cref="Index"/>.</param>
        public Range(Index start, Index end) { Start = start; End = end; }

        /// <summary>
        /// Gets the inclusive start <see cref="Index"/> of the range.
        /// </summary>
        public Index Start { get; }

        /// <summary>
        /// Gets the exclusive end <see cref="Index"/> of the range.
        /// </summary>
        public Index End { get; }

        /// <summary>
        /// Creates a <see cref="Range"/> that starts at the specified index and ends at <see cref="Index.End"/>.
        /// </summary>
        /// <param name="start">The inclusive start <see cref="Index"/>.</param>
        /// <returns>A new <see cref="Range"/>.</returns>
        public static Range StartAt(Index start) => new(start, Index.End);

        /// <summary>
        /// Creates a <see cref="Range"/> that starts at <see cref="Index.Start"/> and ends at the specified index.
        /// </summary>
        /// <param name="end">The exclusive end <see cref="Index"/>.</param>
        /// <returns>A new <see cref="Range"/>.</returns>
        public static Range EndAt(Index end) => new(Index.Start, end);

        /// <summary>
        /// Gets a <see cref="Range"/> that represents the entire sequence.
        /// </summary>
        public static Range All => new(Index.Start, Index.End);
    }
}
#endif


================================================
FILE: InterfaceStubGenerator.Shared/SourceWriter.cs
================================================
using System.Diagnostics;
using System.Text;
using Microsoft.CodeAnalysis.Text;

namespace Refit.Generator;

// From https://github.com/dotnet/runtime/blob/233826c88d2100263fb9e9535d96f75824ba0aea/src/libraries/Common/src/SourceGenerators/SourceWriter.cs#L11
internal sealed class SourceWriter
{
    const char IndentationChar = ' ';
    const int CharsPerIndentation = 4;

    readonly StringBuilder sb = new();
    int indentation;

    public int Indentation
    {
        get => indentation;
        set
        {
            if (value < 0)
            {
                Throw();
                static void Throw() => throw new ArgumentOutOfRangeException(nameof(value));
            }

            indentation = value;
        }
    }

    public void Append(string text) => sb.Append(text);

    public void WriteLine(char value)
    {
        AddIndentation();
        sb.Append(value);
        sb.AppendLine();
    }

    public void WriteLine(string text)
    {
        if (indentation == 0)
        {
            sb.AppendLine(text);
            return;
        }

        bool isFinalLine;
        ReadOnlySpan<char> remainingText = text.AsSpan();
        do
        {
            ReadOnlySpan<char> nextLine = GetNextLine(ref remainingText, out isFinalLine);

            if (!nextLine.IsEmpty)
            {
                AddIndentation();
            }
            AppendSpan(sb, nextLine);
            sb.AppendLine();
        }
        while (!isFinalLine);
    }

    public void WriteLine() => sb.AppendLine();

    public SourceText ToSourceText()
    {
        Debug.Assert(indentation == 0 && sb.Length > 0);
        return SourceText.From(sb.ToString(), Encoding.UTF8);
    }

    public void Reset()
    {
        sb.Clear();
        indentation = 0;
    }

    private void AddIndentation() =>
        sb.Append(IndentationChar, CharsPerIndentation * indentation);

    private static ReadOnlySpan<char> GetNextLine(
        ref ReadOnlySpan<char> remainingText,
        out bool isFinalLine
    )
    {
        if (remainingText.IsEmpty)
        {
            isFinalLine = true;
            return default;
        }

        ReadOnlySpan<char> next;
        ReadOnlySpan<char> rest;

        int lineLength = remainingText.IndexOf('\n');
        if (lineLength == -1)
        {
            lineLength = remainingText.Length;
            isFinalLine = true;
            rest = default;
        }
        else
        {
            rest = remainingText.Slice(lineLength + 1);
            isFinalLine = false;
        }

        if ((uint)lineLength > 0 && remainingText[lineLength - 1] == '\r')
        {
            lineLength--;
        }

        next = remainingText.Slice(0, lineLength);
        remainingText = rest;
        return next;
    }

    private static unsafe void AppendSpan(StringBuilder builder, ReadOnlySpan<char> span)
    {
        fixed (char* ptr = span)
        {
            builder.Append(ptr, span.Length);
        }
    }
}


================================================
FILE: InterfaceStubGenerator.Shared/UniqueNameBuilder.cs
================================================
namespace Refit.Generator;

// <Summary>
// UniqueNameBuilder.
// </Summary>
public class UniqueNameBuilder()
{
    private readonly HashSet<string> _usedNames = new(StringComparer.Ordinal);
    private readonly UniqueNameBuilder? _parentScope;

    private UniqueNameBuilder(UniqueNameBuilder parentScope)
        : this()
    {
        _parentScope = parentScope;
    }

    /// <summary>
    /// Reserve a name.
    /// </summary>
    /// <param name="name"></param>
    public void Reserve(string name) => _usedNames.Add(name);

    /// <summary>
    /// Create a new scope.
    /// </summary>
    /// <returns>Unique Name Builder.</returns>
    public UniqueNameBuilder NewScope() => new(this);

    /// <summary>
    /// Generate a unique name.
    /// </summary>
    /// <param name="name">THe name.</param>
    /// <returns></returns>
    public string New(string name)
    {
        var i = 0;
        var uniqueName = name;
        while (Contains(uniqueName))
        {
            uniqueName = name + i;
            i++;
        }

        _usedNames.Add(uniqueName);

        return uniqueName;
    }

    /// <summary>
    /// Reserve names.
    /// </summary>
    /// <param name="names">The name.</param>
    public void Reserve(IEnumerable<string> names)
    {
        if (names == null)
        {
            return;
        }

        foreach (var name in names)
        {
            _usedNames.Add(name);
        }
    }

    private bool Contains(string name)
    {
        if (_usedNames.Contains(name))
            return true;

        if (_parentScope != null)
            return _parentScope.Contains(name);

        return false;
    }
}


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) ReactiveUI 2012 - 2025

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: NuGet.config
================================================
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" /> 
  </packageSources>
</configuration>

================================================
FILE: README.md
================================================
![Refit](refit_logo.png)

## Refit: The automatic type-safe REST library for .NET Core, Xamarin and .NET

[![Build](https://github.com/reactiveui/refit/actions/workflows/ci-build.yml/badge.svg)](https://github.com/reactiveui/refit/actions/workflows/ci-build.yml) [![codecov](https://codecov.io/github/reactiveui/refit/branch/main/graph/badge.svg?token=2guEgHsDU2)](https://codecov.io/github/reactiveui/refit)

||Refit|Refit.HttpClientFactory|Refit.Newtonsoft.Json|
|-|-|-|-|
|*NuGet*|[![NuGet](https://img.shields.io/nuget/v/Refit.svg)](https://www.nuget.org/packages/Refit/)|[![NuGet](https://img.shields.io/nuget/v/Refit.HttpClientFactory.svg)](https://www.nuget.org/packages/Refit.HttpClientFactory/)|[![NuGet](https://img.shields.io/nuget/v/Refit.Newtonsoft.Json.svg)](https://www.nuget.org/packages/Refit.Newtonsoft.Json/)|

Refit is a library heavily inspired by Square's
[Retrofit](http://square.github.io/retrofit) library, and it turns your REST
API into a live interface:

```csharp
public interface IGitHubApi
{
    [Get("/users/{user}")]
    Task<User> GetUser(string user);
}
```

The `RestService` class generates an implementation of `IGitHubApi` that uses
`HttpClient` to make its calls:

```csharp
var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com");
var octocat = await gitHubApi.GetUser("octocat");
```
.NET Core supports registering via HttpClientFactory
```csharp
services
    .AddRefitClient<IGitHubApi>()
    .ConfigureHttpClient(c => c.BaseAddress = new Uri("https://api.github.com"));
```

# Table of Contents

* [Where does this work?](#where-does-this-work)
  * [Breaking changes in 6.x](#breaking-changes-in-6x)
* [API Attributes](#api-attributes)
* [Querystrings](#querystrings)
  * [Dynamic Querystring Parameters](#dynamic-querystring-parameters)
  * [Collections as Querystring parameters](#collections-as-querystring-parameters)
  * [Unescape Querystring parameters](#unescape-querystring-parameters)
  * [Custom Querystring Parameter formatting](#custom-querystring-parameter-formatting)
* [Body content](#body-content)
  * [Buffering and the Content-Length header](#buffering-and-the-content-length-header)
  * [JSON content](#json-content)
  * [XML Content](#xml-content)
  * [Form posts](#form-posts)
* [Setting request headers](#setting-request-headers)
  * [Static headers](#static-headers)
  * [Dynamic headers](#dynamic-headers)
  * [Bearer Authentication](#bearer-authentication)
  * [Reducing header boilerplate with DelegatingHandlers (Authorization headers worked example)](#reducing-header-boilerplate-with-delegatinghandlers-authorization-headers-worked-example)
  * [Redefining headers](#redefining-headers)
  * [Removing headers](#removing-headers)
* [Passing state into DelegatingHandlers](#passing-state-into-delegatinghandlers)
  * [Support for Polly and Polly.Context](#support-for-polly-and-pollycontext)
  * [Target Interface type](#target-interface-type)
  * [MethodInfo of the method on the Refit client interface that was invoked](#methodinfo-of-the-method-on-the-refit-client-interface-that-was-invoked)
* [Multipart uploads](#multipart-uploads)
* [Retrieving the response](#retrieving-the-response)
* [Using generic interfaces](#using-generic-interfaces)
* [Interface inheritance](#interface-inheritance)
  * [Headers inheritance](#headers-inheritance)
* [Default Interface Methods](#default-interface-methods)
* [Using HttpClientFactory](#using-httpclientfactory)
* [Providing a custom HttpClient](#providing-a-custom-httpclient)
* [Handling exceptions](#handling-exceptions)
  * [When returning Task&lt;IApiResponse&gt;, Task&lt;IApiResponse&lt;T&gt;&gt;, or Task&lt;ApiResponse&lt;T&gt;&gt;](#when-returning-taskiapiresponse-taskiapiresponset-or-taskapiresponset)
  * [When returning Task&lt;T&gt;](#when-returning-taskt)
  * [Providing a custom ExceptionFactory](#providing-a-custom-exceptionfactory)
  * [ApiException deconstruction with Serilog](#apiexception-deconstruction-with-serilog)

### Where does this work?

Refit currently supports the following platforms and any .NET Standard 2.0 target:

* UWP
* Xamarin.Android
* Xamarin.Mac
* Xamarin.iOS
* Desktop .NET 4.6.1
* .NET 6 / 8
* Blazor
* Uno Platform

### SDK Requirements

### Updates in 8.0.x
Fixes for some issues experienced, this lead to some breaking changes.
See [Releases](https://github.com/reactiveui/refit/releases) for full details.

### V6.x.x

Refit 6 requires Visual Studio 16.8 or higher, or the .NET SDK 5.0.100 or higher. It can target any .NET Standard 2.0 platform.

Refit 6 does not support the old `packages.config` format for NuGet references (as they do not support analyzers/source generators). You must
[migrate to PackageReference](https://devblogs.microsoft.com/nuget/migrate-packages-config-to-package-reference/) to use Refit v6 and later.

#### Breaking changes in 6.x

Refit 6 makes [System.Text.Json](https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-overview) the default JSON serializer. If you'd like to continue to use `Newtonsoft.Json`, add the `Refit.Newtonsoft.Json` NuGet package and set your `ContentSerializer` to `NewtonsoftJsonContentSerializer` on your `RefitSettings` instance. `System.Text.Json` is faster and uses less memory, though not all features are supported. The [migration guide](https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to?pivots=dotnet-5-0) contains more details.

`IContentSerializer` was renamed to `IHttpContentSerializer` to better reflect its purpose. Additionally, two of its methods were renamed, `SerializeAsync<T>` -> `ToHttpContent<T>` and `DeserializeAsync<T>` -> `FromHttpContentAsync<T>`. Any existing implementations of these will need to be updated, though the changes should be minor.

##### Updates in 6.3

Refit 6.3 splits out the XML serialization via `XmlContentSerializer` into a separate package, `Refit.Xml`. This
is to reduce the dependency size when using Refit with Web Assembly (WASM) applications. If you require XML, add a reference
to `Refit.Xml`.

### API Attributes

Every method must have an HTTP attribute that provides the request method and
relative URL. There are six built-in annotations: Get, Post, Put, Delete, Patch and
Head. The relative URL of the resource is specified in the annotation.

```csharp
[Get("/users/list")]
```

You can also specify query parameters in the URL:

```csharp
[Get("/users/list?sort=desc")]
```

A request URL can be updated dynamically using replacement blocks and
parameters on the method. A replacement block is an alphanumeric string
surrounded by { and }.

If the name of your parameter doesn't match the name in the URL path, use the
`AliasAs` attribute.

```csharp
[Get("/group/{id}/users")]
Task<List<User>> GroupList([AliasAs("id")] int groupId);
```

A request url can also bind replacement blocks to a custom object

```csharp
[Get("/group/{request.groupId}/users/{request.userId}")]
Task<List<User>> GroupList(UserGroupRequest request);

class UserGroupRequest{
    int groupId { get;set; }
    int userId { get;set; }
}

```

Parameters that are not specified as a URL substitution will automatically be
used as query parameters. This is different than Retrofit, where all
parameters must be explicitly specified.

The comparison between parameter name and URL parameter is *not*
case-sensitive, so it will work correctly if you name your parameter `groupId`
in the path `/group/{groupid}/show` for example.

```csharp
[Get("/group/{groupid}/users")]
Task<List<User>> GroupList(int groupId, [AliasAs("sort")] string sortOrder);

GroupList(4, "desc");
>>> "/group/4/users?sort=desc"
```

Round-tripping route parameter syntax: Forward slashes aren't encoded when using a double-asterisk (\*\*) catch-all parameter syntax.

During link generation, the routing system encodes the value captured in a double-asterisk (\*\*) catch-all parameter (for example, {**myparametername}) except the forward slashes.

The type of round-tripping route parameter must be string.

```csharp
[Get("/search/{**page}")]
Task<List<Page>> Search(string page);

Search("admin/products");
>>> "/search/admin/products"
```

### Querystrings

#### Dynamic Querystring Parameters

If you specify an `object` as a query parameter, all public properties which are not null are used as query parameters.
This previously only applied to GET requests, but has now been expanded to all HTTP request methods, partly thanks to Twitter's hybrid API that insists on non-GET requests with querystring parameters.
Use the `Query` attribute to change the behavior to 'flatten' your query parameter object. If using this Attribute you can specify values for the Delimiter and the Prefix which are used to 'flatten' the object.

```csharp
public class MyQueryParams
{
    [AliasAs("order")]
    public string SortOrder { get; set; }

    public int Limit { get; set; }

    public KindOptions Kind { get; set; }
}

public enum KindOptions
{
    Foo,

    [EnumMember(Value = "bar")]
    Bar
}


[Get("/group/{id}/users")]
Task<List<User>> GroupList([AliasAs("id")] int groupId, MyQueryParams params);

[Get("/group/{id}/users")]
Task<List<User>> GroupListWithAttribute([AliasAs("id")] int groupId, [Query(".","search")] MyQueryParams params);


params.SortOrder = "desc";
params.Limit = 10;
params.Kind = KindOptions.Bar;

GroupList(4, params)
>>> "/group/4/users?order=desc&Limit=10&Kind=bar"

GroupListWithAttribute(4, params)
>>> "/group/4/users?search.order=desc&search.Limit=10&search.Kind=bar"
```

A similar behavior exists if using a Dictionary, but without the advantages of the `AliasAs` attributes and of course no intellisense and/or type safety.

You can also specify querystring parameters with [Query] and have them flattened in non-GET requests, similar to:
```csharp
[Post("/statuses/update.json")]
Task<Tweet> PostTweet([Query]TweetParams params);
```

Where `TweetParams` is a POCO, and properties will also support `[AliasAs]` attributes.

If you need to keep internal-only properties on your query DTO, mark them with one of the standard ignore attributes and Refit will skip them when building the query string:

- `[IgnoreDataMember]`
- `[System.Text.Json.Serialization.JsonIgnore]`
- `[Newtonsoft.Json.JsonIgnore]`

#### Collections as Querystring parameters

Use the `Query` attribute to specify format in which collections should be formatted in query string

```csharp
[Get("/users/list")]
Task Search([Query(CollectionFormat.Multi)]int[] ages);

Search(new [] {10, 20, 30})
>>> "/users/list?ages=10&ages=20&ages=30"

[Get("/users/list")]
Task Search([Query(CollectionFormat.Csv)]int[] ages);

Search(new [] {10, 20, 30})
>>> "/users/list?ages=10%2C20%2C30"
```

You can also specify collection format in `RefitSettings`, that will be used by default, unless explicitly defined in `Query` attribute.

```csharp
var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        CollectionFormat = CollectionFormat.Multi
    });
```

#### Unescape Querystring parameters

Use the `QueryUriFormat` attribute to specify if the query parameters should be url escaped

```csharp
[Get("/query")]
[QueryUriFormat(UriFormat.Unescaped)]
Task Query(string q);

Query("Select+Id,Name+From+Account")
>>> "/query?q=Select+Id,Name+From+Account"
```

#### Custom Querystring parameter formatting

**Formatting Keys**

To customize the format of query keys, you have two main options:

1. **Using the `AliasAs` Attribute**:

   You can use the `AliasAs` attribute to specify a custom key name for a property. This attribute will always take precedence over any key formatter you specify.

   ```csharp
   public class MyQueryParams
   {
       [AliasAs("order")]
       public string SortOrder { get; set; }

       public int Limit { get; set; }
   }

   [Get("/group/{id}/users")]
   Task<List<User>> GroupList([AliasAs("id")] int groupId, [Query] MyQueryParams params);

   params.SortOrder = "desc";
   params.Limit = 10;

   GroupList(1, params);
   ```

   This will generate the following request:

   ```
   /group/1/users?order=desc&Limit=10
   ```

2. **Using the `RefitSettings.UrlParameterKeyFormatter` Property**:

   By default, Refit uses the property name as the query key without any additional formatting. If you want to apply a custom format across all your query keys, you can use the `UrlParameterKeyFormatter` property. Remember that if a property has an `AliasAs` attribute, it will be used regardless of the formatter.

   The following example uses the built-in `CamelCaseUrlParameterKeyFormatter`:

   ```csharp
   public class MyQueryParams
   {
       public string SortOrder { get; set; }

       [AliasAs("queryLimit")]
       public int Limit { get; set; }
   }

   [Get("/group/users")]
   Task<List<User>> GroupList([Query] MyQueryParams params);

   params.SortOrder = "desc";
   params.Limit = 10;
   ```

   The request will look like:

   ```
   /group/users?sortOrder=desc&queryLimit=10
   ```

**Note**: The `AliasAs` attribute always takes the top priority. If both the attribute and a custom key formatter are present, the `AliasAs` attribute's value will be used.

#### Formatting URL Parameter Values with the `UrlParameterFormatter`

In Refit, the `UrlParameterFormatter` property within `RefitSettings` allows you to customize how parameter values are formatted in the URL. This can be particularly useful when you need to format dates, numbers, or other types in a specific manner that aligns with your API's expectations.

**Using `UrlParameterFormatter`**:

Assign a custom formatter that implements the `IUrlParameterFormatter` interface to the `UrlParameterFormatter` property.

```csharp
public class CustomDateUrlParameterFormatter : IUrlParameterFormatter
{
    public string? Format(object? value, ICustomAttributeProvider attributeProvider, Type type)
    {
        if (value is DateTime dt)
        {
            return dt.ToString("yyyyMMdd");
        }

        return value?.ToString();
    }
}

var settings = new RefitSettings
{
    UrlParameterFormatter = new CustomDateUrlParameterFormatter()
};
```

In this example, a custom formatter is created for date values. Whenever a `DateTime` parameter is encountered, it formats the date as `yyyyMMdd`.

**Formatting Dictionary Keys**:

When dealing with dictionaries, it's important to note that keys are treated as values. If you need custom formatting for dictionary keys, you should use the `UrlParameterFormatter` as well.

For instance, if you have a dictionary parameter and you want to format its keys in a specific way, you can handle that in the custom formatter:

```csharp
public class CustomDictionaryKeyFormatter : IUrlParameterFormatter
{
    public string? Format(object? value, ICustomAttributeProvider attributeProvider, Type type)
    {
        // Handle dictionary keys
        if (attributeProvider is PropertyInfo prop && prop.PropertyType.IsGenericType && prop.PropertyType.GetGenericTypeDefinition() == typeof(Dictionary<,>))
        {
            // Custom formatting logic for dictionary keys
            return value?.ToString().ToUpperInvariant();
        }

        return value?.ToString();
    }
}

var settings = new RefitSettings
{
    UrlParameterFormatter = new CustomDictionaryKeyFormatter()
};
```

In the above example, the dictionary keys will be converted to uppercase.

### Body content

One of the parameters in your method can be used as the body, by using the
Body attribute:

```csharp
[Post("/users/new")]
Task CreateUser([Body] User user);
```

There are four possibilities for supplying the body data, depending on the
type of the parameter:

* If the type is `Stream`, the content will be streamed via `StreamContent`
* If the type is `string`, the string will be used directly as the content unless `[Body(BodySerializationMethod.Json)]` is set which will send it as a `StringContent`
* If the parameter has the attribute `[Body(BodySerializationMethod.UrlEncoded)]`,
  the content will be URL-encoded (see [form posts](#form-posts) below)
* For all other types, the object will be serialized using the content serializer specified in
RefitSettings (JSON is the default).

#### Buffering and the `Content-Length` header

By default, Refit streams the body content without buffering it. This means you can
stream a file from disk, for example, without incurring the overhead of loading
the whole file into memory. The downside of this is that no `Content-Length` header
is set _on the request_. If your API needs you to send a `Content-Length` header with
the request, you can disable this streaming behavior by setting the `buffered` argument
of the `[Body]` attribute to `true`:

```csharp
Task CreateUser([Body(buffered: true)] User user);
```

#### JSON content

JSON requests and responses are serialized/deserialized using an instance of the `IHttpContentSerializer` interface. Refit provides two implementations out of the box: `SystemTextJsonContentSerializer` (which is the default JSON serializer) and `NewtonsoftJsonContentSerializer`. The first uses `System.Text.Json` APIs and is focused on high performance and low memory usage, while the latter uses the known `Newtonsoft.Json` library and is more versatile and customizable. You can read more about the two serializers and the main differences between the two [at this link](https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to).

For instance, here is how to create a new `RefitSettings` instance using the `Newtonsoft.Json`-based serializer (you'll also need to add a `PackageReference` to `Refit.Newtonsoft.Json`):

```csharp
var settings = new RefitSettings(new NewtonsoftJsonContentSerializer());
```

If you're using `Newtonsoft.Json` APIs, you can customize their behavior by setting the `Newtonsoft.Json.JsonConvert.DefaultSettings` property:

```csharp
JsonConvert.DefaultSettings =
    () => new JsonSerializerSettings() {
        ContractResolver = new CamelCasePropertyNamesContractResolver(),
        Converters = {new StringEnumConverter()}
    };

// Serialized as: {"day":"Saturday"}
await PostSomeStuff(new { Day = DayOfWeek.Saturday });
```

As these are global settings they will affect your entire application. It
might be beneficial to isolate the settings for calls to a particular API.
When creating a Refit generated live interface, you may optionally pass a
`RefitSettings` that will allow you to specify what serializer settings you
would like. This allows you to have different serializer settings for separate
APIs:

```csharp
var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        ContentSerializer = new NewtonsoftJsonContentSerializer(
            new JsonSerializerSettings {
                ContractResolver = new SnakeCasePropertyNamesContractResolver()
        }
    )});

var otherApi = RestService.For<IOtherApi>("https://api.example.com",
    new RefitSettings {
        ContentSerializer = new NewtonsoftJsonContentSerializer(
            new JsonSerializerSettings {
                ContractResolver = new CamelCasePropertyNamesContractResolver()
        }
    )});
```

Property serialization/deserialization can be customised using Json.NET's
JsonProperty attribute:

```csharp
public class Foo
{
    // Works like [AliasAs("b")] would in form posts (see below)
    [JsonProperty(PropertyName="b")]
    public string Bar { get; set; }
}
```

##### JSON source generator

To apply the benefits of the new [JSON source generator](https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/) for System.Text.Json added in .NET 6, you can use `SystemTextJsonContentSerializer` with a custom instance of `RefitSettings` and `JsonSerializerOptions`:

```csharp
var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        ContentSerializer = new SystemTextJsonContentSerializer(MyJsonSerializerContext.Default.Options)
    });
```

#### XML Content

XML requests and responses are serialized/deserialized using _System.Xml.Serialization.XmlSerializer_.
By default, Refit will use JSON content serialization, to use XML content configure the ContentSerializer to use the `XmlContentSerializer`:

```csharp
var gitHubApi = RestService.For<IXmlApi>("https://www.w3.org/XML",
    new RefitSettings {
        ContentSerializer = new XmlContentSerializer()
    });
```

Property serialization/deserialization can be customised using   attributes found in the _System.Xml.Serialization_ namespace:

```csharp
    public class Foo
    {
        [XmlElement(Namespace = "https://www.w3.org/XML")]
        public string Bar { get; set; }
    }
```

The _System.Xml.Serialization.XmlSerializer_ provides many options for serializing, those options can be set by providing an `XmlContentSerializerSettings` to the `XmlContentSerializer` constructor:

```csharp
var gitHubApi = RestService.For<IXmlApi>("https://www.w3.org/XML",
    new RefitSettings {
        ContentSerializer = new XmlContentSerializer(
            new XmlContentSerializerSettings
            {
                XmlReaderWriterSettings = new XmlReaderWriterSettings()
                {
                    ReaderSettings = new XmlReaderSettings
                    {
                        IgnoreWhitespace = true
                    }
                }
            }
        )
    });
```

#### <a name="form-posts"></a>Form posts

For APIs that take form posts (i.e. serialized as `application/x-www-form-urlencoded`),
initialize the Body attribute with `BodySerializationMethod.UrlEncoded`.

The parameter can be an `IDictionary`:

```csharp
public interface IMeasurementProtocolApi
{
    [Post("/collect")]
    Task Collect([Body(BodySerializationMethod.UrlEncoded)] Dictionary<string, object> data);
}

var data = new Dictionary<string, object> {
    {"v", 1},
    {"tid", "UA-1234-5"},
    {"cid", new Guid("d1e9ea6b-2e8b-4699-93e0-0bcbd26c206c")},
    {"t", "event"},
};

// Serialized as: v=1&tid=UA-1234-5&cid=d1e9ea6b-2e8b-4699-93e0-0bcbd26c206c&t=event
await api.Collect(data);
```

Or you can just pass any object and all _public, readable_ properties will
be serialized as form fields in the request. This approach allows you to alias
property names using `[AliasAs("whatever")]` which can help if the API has
cryptic field names:

```csharp
public interface IMeasurementProtocolApi
{
    [Post("/collect")]
    Task Collect([Body(BodySerializationMethod.UrlEncoded)] Measurement measurement);
}

public class Measurement
{
    // Properties can be read-only and [AliasAs] isn't required
    public int v { get { return 1; } }

    [AliasAs("tid")]
    public string WebPropertyId { get; set; }

    [AliasAs("cid")]
    public Guid ClientId { get; set; }

    [AliasAs("t")]
    public string Type { get; set; }

    public object IgnoreMe { private get; set; }
}

var measurement = new Measurement {
    WebPropertyId = "UA-1234-5",
    ClientId = new Guid("d1e9ea6b-2e8b-4699-93e0-0bcbd26c206c"),
    Type = "event"
};

// Serialized as: v=1&tid=UA-1234-5&cid=d1e9ea6b-2e8b-4699-93e0-0bcbd26c206c&t=event
await api.Collect(measurement);
```

If you have a type that has `[JsonProperty(PropertyName)]` attributes setting property aliases, Refit will use those too (`[AliasAs]` will take precedence where you have both).
This means that the following type will serialize as `one=value1&two=value2`:

```csharp

public class SomeObject
{
    [JsonProperty(PropertyName = "one")]
    public string FirstProperty { get; set; }

    [JsonProperty(PropertyName = "notTwo")]
    [AliasAs("two")]
    public string SecondProperty { get; set; }
}

```

**NOTE:** This use of `AliasAs` applies to querystring parameters and form body posts, but not to response objects; for aliasing fields on response objects, you'll still need to use `[JsonProperty("full-property-name")]`.

### Setting request headers

#### Static headers

You can set one or more static request headers for a request applying a `Headers`
attribute to the method:

```csharp
[Headers("User-Agent: Awesome Octocat App")]
[Get("/users/{user}")]
Task<User> GetUser(string user);
```

Static headers can also be added to _every request in the API_ by applying the
`Headers` attribute to the interface:

```csharp
[Headers("User-Agent: Awesome Octocat App")]
public interface IGitHubApi
{
    [Get("/users/{user}")]
    Task<User> GetUser(string user);

    [Post("/users/new")]
    Task CreateUser([Body] User user);
}
```

#### Dynamic headers

If the content of the header needs to be set at runtime, you can add a header
with a dynamic value to a request by applying a `Header` attribute to a parameter:

```csharp
[Get("/users/{user}")]
Task<User> GetUser(string user, [Header("Authorization")] string authorization);

// Will add the header "Authorization: token OAUTH-TOKEN" to the request
var user = await GetUser("octocat", "token OAUTH-TOKEN");
```

Adding an `Authorization` header is such a common use case that you can add an access token to a request by applying an `Authorize` attribute to a parameter and optionally specifying the scheme:

```csharp
[Get("/users/{user}")]
Task<User> GetUser(string user, [Authorize("Bearer")] string token);

// Will add the header "Authorization: Bearer OAUTH-TOKEN}" to the request
var user = await GetUser("octocat", "OAUTH-TOKEN");

//note: the scheme defaults to Bearer if none provided
```

If you need to set multiple headers at runtime, you can add a `IDictionary<string, string>`
and apply a `HeaderCollection` attribute to the parameter and it will inject the headers into the request:

[//]: # ({% raw %})
```csharp

[Get("/users/{user}")]
Task<User> GetUser(string user, [HeaderCollection] IDictionary<string, string> headers);

var headers = new Dictionary<string, string> {{"Authorization","Bearer tokenGoesHere"}, {"X-Tenant-Id","123"}};
var user = await GetUser("octocat", headers);
```
[//]: # ({% endraw %})

#### Bearer Authentication

Most APIs need some sort of Authentication. The most common is OAuth Bearer authentication. A header is added to each request of the form: `Authorization: Bearer <token>`. Refit makes it easy to insert your logic to get the token however your app needs, so you don't have to pass a token into each method.

1. Add `[Headers("Authorization: Bearer")]` to the interface or methods which need the token.
2. Set `AuthorizationHeaderValueGetter` in the `RefitSettings` instance. Refit will call your delegate each time it needs to obtain the token, so it's a good idea for your mechanism to cache the token value for some period within the token lifetime.

`AuthorizationHeaderValueGetter` works whether you create clients with `RestService.For<T>("https://...")` or supply your own `HttpClient` via `RestService.For<T>(httpClient, settings)`. If your API methods accept a `CancellationToken`, that token is propagated to the getter delegate.

#### Reducing header boilerplate with DelegatingHandlers (Authorization headers worked example)
Although we make provisions for adding dynamic headers at runtime directly in Refit,
most use-cases would likely benefit from registering a custom `DelegatingHandler` in order to inject the headers as part of the `HttpClient` middleware pipeline
thus removing the need to add lots of `[Header]` or `[HeaderCollection]` attributes.

In the example above we are leveraging a `[HeaderCollection]` parameter to inject an `Authorization` and `X-Tenant-Id` header.
This is quite a common scenario if you are integrating with a 3rd party that uses OAuth2. While it's ok for the occasional endpoint,
it would be quite cumbersome if we had to add that boilerplate to every method in our interface.

In this example we will assume our application is a multi-tenant application that is able to pull information about a tenant through
some interface `ITenantProvider` and has a data store `IAuthTokenStore` that can be used to retrieve an auth token to attach to the outbound request.

```csharp

 //Custom delegating handler for adding Auth headers to outbound requests
 class AuthHeaderHandler : DelegatingHandler
 {
     private readonly ITenantProvider tenantProvider;
     private readonly IAuthTokenStore authTokenStore;

    public AuthHeaderHandler(ITenantProvider tenantProvider, IAuthTokenStore authTokenStore)
    {
         this.tenantProvider = tenantProvider ?? throw new ArgumentNullException(nameof(tenantProvider));
         this.authTokenStore = authTokenStore ?? throw new ArgumentNullException(nameof(authTokenStore));
         // InnerHandler must be left as null when using DI, but must be assigned a value when
         // using RestService.For<IMyApi>
         // InnerHandler = new HttpClientHandler();
    }

    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        var token = await authTokenStore.GetToken();

        //potentially refresh token here if it has expired etc.

        request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
        request.Headers.Add("X-Tenant-Id", tenantProvider.GetTenantId());

        return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
    }
}

//Startup.cs
public void ConfigureServices(IServiceCollection services)
{
    services.AddTransient<ITenantProvider, TenantProvider>();
    services.AddTransient<IAuthTokenStore, AuthTokenStore>();
    services.AddTransient<AuthHeaderHandler>();

    //this will add our refit api implementation with an HttpClient
    //that is configured to add auth headers to all requests

    //note: AddRefitClient<T> requires a reference to Refit.HttpClientFactory
    //note: the order of delegating handlers is important and they run in the order they are added!

    services.AddRefitClient<ISomeThirdPartyApi>()
        .ConfigureHttpClient(c => c.BaseAddress = new Uri("https://api.example.com"))
        .AddHttpMessageHandler<AuthHeaderHandler>();
        //you could add Polly here to handle HTTP 429 / HTTP 503 etc
}

//Your application code
public class SomeImportantBusinessLogic
{
    private ISomeThirdPartyApi thirdPartyApi;

    public SomeImportantBusinessLogic(ISomeThirdPartyApi thirdPartyApi)
    {
        this.thirdPartyApi = thirdPartyApi;
    }

    public async Task DoStuffWithUser(string username)
    {
        var user = await thirdPartyApi.GetUser(username);
        //do your thing
    }
}
```

If you aren't using dependency injection then you could achieve the same thing by doing something like this:

```csharp
var api = RestService.For<ISomeThirdPartyApi>(new HttpClient(new AuthHeaderHandler(tenantProvider, authTokenStore))
    {
        BaseAddress = new Uri("https://api.example.com")
    }
);

var user = await thirdPartyApi.GetUser(username);
//do your thing
```

#### Redefining headers

Unlike Retrofit, where headers do not overwrite each other and are all added to
the request regardless of how many times the same header is defined, Refit takes
a similar approach to the approach ASP.NET MVC takes with action filters &mdash;
**redefining a header will replace it**, in the following order of precedence:

* `Headers` attribute on the interface _(lowest priority)_
* `Headers` attribute on the method
* `Header` attribute or `HeaderCollection` attribute on a method parameter _(highest priority)_

```csharp
[Headers("X-Emoji: :rocket:")]
public interface IGitHubApi
{
    [Get("/users/list")]
    Task<List> GetUsers();

    [Get("/users/{user}")]
    [Headers("X-Emoji: :smile_cat:")]
    Task<User> GetUser(string user);

    [Post("/users/new")]
    [Headers("X-Emoji: :metal:")]
    Task CreateUser([Body] User user, [Header("X-Emoji")] string emoji);
}

// X-Emoji: :rocket:
var users = await GetUsers();

// X-Emoji: :smile_cat:
var user = await GetUser("octocat");

// X-Emoji: :trollface:
await CreateUser(user, ":trollface:");
```

**Note:** This redefining behavior only applies to headers _with the same name_. Headers with different names are not replaced. The following code will result in all headers being included:

```csharp
[Headers("Header-A: 1")]
public interface ISomeApi
{
    [Headers("Header-B: 2")]
    [Post("/post")]
    Task PostTheThing([Header("Header-C")] int c);
}

// Header-A: 1
// Header-B: 2
// Header-C: 3
var user = await api.PostTheThing(3);
```

#### Removing headers

Headers defined on an interface or method can be removed by redefining
a static header without a value (i.e. without `: <value>`) or passing `null` for
a dynamic header. _Empty strings will be included as empty headers._

```csharp
[Headers("X-Emoji: :rocket:")]
public interface IGitHubApi
{
    [Get("/users/list")]
    [Headers("X-Emoji")] // Remove the X-Emoji header
    Task<List> GetUsers();

    [Get("/users/{user}")]
    [Headers("X-Emoji:")] // Redefine the X-Emoji header as empty
    Task<User> GetUser(string user);

    [Post("/users/new")]
    Task CreateUser([Body] User user, [Header("X-Emoji")] string emoji);
}

// No X-Emoji header
var users = await GetUsers();

// X-Emoji:
var user = await GetUser("octocat");

// No X-Emoji header
await CreateUser(user, null);

// X-Emoji:
await CreateUser(user, "");
```

### Passing state into DelegatingHandlers

If there is runtime state that you need to pass to a `DelegatingHandler` you can add a property with a dynamic value to the underlying `HttpRequestMessage.Properties`
by applying a `Property` attribute to a parameter:

```csharp
public interface IGitHubApi
{
    [Post("/users/new")]
    Task CreateUser([Body] User user, [Property("SomeKey")] string someValue);

    [Post("/users/new")]
    Task CreateUser([Body] User user, [Property] string someOtherKey);
}
```

The attribute constructor optionally takes a string which becomes the key in the `HttpRequestMessage.Properties` dictionary.
If no key is explicitly defined then the name of the parameter becomes the key.
If a key is defined multiple times the value in `HttpRequestMessage.Properties` will be overwritten.
The parameter itself can be any `object`. Properties can be accessed inside a `DelegatingHandler` as follows:

> ⚠️ **Important for `IHttpClientFactory` users:** `DelegatingHandler` instances are pooled and can live longer than a single request scope. Avoid reading per-request state from services that may be scoped/cached across handler lifetimes (for example a tenant/customer resolver stored on the handler). For per-request values like `CustomerId`, pass the value through `[Property]` so each request carries its own state.

```csharp
class RequestPropertyHandler : DelegatingHandler
{
    public RequestPropertyHandler(HttpMessageHandler innerHandler = null) : base(innerHandler ?? new HttpClientHandler()) {}

    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        // See if the request has a the property
        if(request.Properties.ContainsKey("SomeKey"))
        {
            var someProperty = request.Properties["SomeKey"];
            //do stuff
        }

        if(request.Properties.ContainsKey("someOtherKey"))
        {
            var someOtherProperty = request.Properties["someOtherKey"];
            //do stuff
        }

        return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
    }
}
```

Note: in .NET 5 `HttpRequestMessage.Properties` has been marked `Obsolete` and Refit will instead populate the value into the new `HttpRequestMessage.Options`.

#### Support for Polly and Polly.Context

Because Refit supports `HttpClientFactory` it is possible to configure Polly policies on your HttpClient.
If your policy makes use of `Polly.Context` this can be passed via Refit by adding `[Property("PolicyExecutionContext")] Polly.Context context`
as behind the scenes `Polly.Context` is simply stored in `HttpRequestMessage.Properties` under the key `PolicyExecutionContext` and is of type `Polly.Context`. It's only recommended to pass the `Polly.Context` this way if your use case requires that the `Polly.Context` be initialized with dynamic content only known at runtime. If your `Polly.Context` only requires the same content every time (e.g an `ILogger` that you want to use to log from inside your policies) a cleaner approach is to inject the `Polly.Context` via a `DelegatingHandler` as described in [#801](https://github.com/reactiveui/refit/issues/801#issuecomment-1137318526)

#### Target Interface Type and method info

There may be times when you want to know what the target interface type is of the Refit instance. An example is where you
have a derived interface that implements a common base like this:

```csharp
public interface IGetAPI<TEntity>
{
    [Get("/{key}")]
    Task<TEntity> Get(long key);
}

public interface IUsersAPI : IGetAPI<User>
{
}

public interface IOrdersAPI : IGetAPI<Order>
{
}
```

You can access the concrete type of the interface for use in a handler, such as to alter the URL of the request:

[//]: # ({% raw %})
```csharp
class RequestPropertyHandler : DelegatingHandler
{
    public RequestPropertyHandler(HttpMessageHandler innerHandler = null) : base(innerHandler ?? new HttpClientHandler()) {}

    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        // Get the type of the target interface
        Type interfaceType = (Type)request.Properties[HttpMessageRequestOptions.InterfaceType];

        var builder = new UriBuilder(request.RequestUri);
        // Alter the Path in some way based on the interface or an attribute on it
        builder.Path = $"/{interfaceType.Name}{builder.Path}";
        // Set the new Uri on the outgoing message
        request.RequestUri = builder.Uri;

        return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
    }
}
```
[//]: # ({% endraw %})

The full method information (`RestMethodInfo`) is also always available in the request options. The `RestMethodInfo` contains more information about the method being called such as the full `MethodInfo` when using reflection is needed:

[//]: # ({% raw %})
```csharp
class RequestPropertyHandler : DelegatingHandler
{
    public RequestPropertyHandler(HttpMessageHandler innerHandler = null) : base(innerHandler ?? new HttpClientHandler()) {}

    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        // Get the method info
        if (request.Options.TryGetValue(new HttpRequestOptionsKey<RestMethodInfo>(HttpRequestMessageOptions.RestMethodInfo), out RestMethodInfo restMethodInfo))
        {
            var builder = new UriBuilder(request.RequestUri);
            // Alter the Path in some way based on the method info or an attribute on it
            builder.Path = $"/{restMethodInfo.MethodInfo.Name}{builder.Path}";
            // Set the new Uri on the outgoing message
            request.RequestUri = builder.Uri;
        }

        return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
    }
}
```
[//]: # ({% endraw %})

Note: in .NET 5 `HttpRequestMessage.Properties` has been marked `Obsolete` and Refit will instead populate the value into the new `HttpRequestMessage.Options`. Refit provides `HttpRequestMessageOptions.InterfaceType` and `HttpRequestMessageOptions.RestMethodInfo` to respectively access the interface type and REST method info from the options.

### Multipart uploads

Methods decorated with `Multipart` attribute will be submitted with multipart content type.
At this time, multipart methods support the following parameter types:

 - `string` (parameter name will be used as name and string value as value)
 - byte array
 - `Stream`
 - `FileInfo`

Name of the field in the multipart data priority precedence:

* `multipartItem.Name` if specified and not null (optional); dynamic, allows naming form data part at execution time.
* `[AliasAs]` attribute  (optional) that decorate the streamPart parameter in the method signature (see below); static, defined in code.
* `MultipartItem` parameter name (default) as defined in the method signature; static, defined in code.

A custom boundary can be specified with an optional string parameter to the `Multipart` attribute. If left empty, this defaults to `----MyGreatBoundary`.

To specify the file name and content type for byte array (`byte[]`), `Stream` and `FileInfo` parameters, use of a wrapper class is required.
The wrapper classes for these types are `ByteArrayPart`, `StreamPart` and `FileInfoPart`.

```csharp
public interface ISomeApi
{
    [Multipart]
    [Post("/users/{id}/photo")]
    Task UploadPhoto(int id, [AliasAs("myPhoto")] StreamPart stream);
}
```

To pass a `Stream` to this method, construct a StreamPart object like so:

```csharp
someApiInstance.UploadPhoto(id, new StreamPart(myPhotoStream, "photo.jpg", "image/jpeg"));
```

Note: The `AttachmentName` attribute that was previously described in this section has been deprecated and its use is not recommended.

### Retrieving the response

Note that in Refit unlike in Retrofit, there is no option for a synchronous
network request - all requests must be async, either via `Task` or via
`IObservable`. There is also no option to create an async method via a Callback
parameter unlike Retrofit, because we live in the async/await future.

Similarly to how body content changes via the parameter type, the return type
will determine the content returned.

Returning Task without a type parameter will discard the content and solely
tell you whether or not the call succeeded:

```csharp
[Post("/users/new")]
Task CreateUser([Body] User user);

// This will throw if the network call fails
await CreateUser(someUser);
```

If the type parameter is 'HttpResponseMessage' or 'string', the raw response
message or the content as a string will be returned respectively.

```csharp
// Returns the content as a string (i.e. the JSON data)
[Get("/users/{user}")]
Task<string> GetUser(string user);

// Returns the raw response, as an IObservable that can be used with the
// Reactive Extensions
[Get("/users/{user}")]
IObservable<HttpResponseMessage> GetUser(string user);
```

There is also a generic wrapper class called `ApiResponse<T>` that can be used as a return type. Using this class as a return type allows you to retrieve not just the content as an object, but also any metadata associated with the request/response. This includes information such as response headers, the http status code and reason phrase (e.g. 404 Not Found), the response version, the original request message that was sent and in the case of an error, an `ApiException` object containing details of the error. Following are some examples of how you can retrieve the response metadata.

```csharp
//Returns the content within a wrapper class containing metadata about the request/response
[Get("/users/{user}")]
Task<ApiResponse<User>> GetUser(string user);

//Calling the API
var response = await gitHubApi.GetUser("octocat");

//Getting the status code (returns a value from the System.Net.HttpStatusCode enumeration)
var httpStatus = response.StatusCode;

//Determining if a success status code was received and there wasn't any other error
//(for example, during content deserialization)
if(response.IsSuccessful)
{
    //YAY! Do the thing...
}

//Retrieving a well-known header value (e.g. "Server" header)
var serverHeaderValue = response.Headers.Server != null ? response.Headers.Server.ToString() : string.Empty;

//Retrieving a custom header value
var customHeaderValue = string.Join(',', response.Headers.GetValues("A-Custom-Header"));

//Looping through all the headers
foreach(var header in response.Headers)
{
    var headerName = header.Key;
    var headerValue = string.Join(',', header.Value);
}

//Finally, retrieving the content in the response body as a strongly-typed object
var user = response.Content;
```

### Using generic interfaces

When using something like ASP.NET Web API, it's a fairly common pattern to have a whole stack of CRUD REST services. Refit now supports these, allowing you to define a single API interface with a generic type:

```csharp
public interface IReallyExcitingCrudApi<T, in TKey> where T : class
{
    [Post("")]
    Task<T> Create([Body] T payload);

    [Get("")]
    Task<List<T>> ReadAll();

    [Get("/{key}")]
    Task<T> ReadOne(TKey key);

    [Put("/{key}")]
    Task Update(TKey key, [Body]T payload);

    [Delete("/{key}")]
    Task Delete(TKey key);
}
```

Which can be used like this:

```csharp
// The "/users" part here is kind of important if you want it to work for more
// than one type (unless you have a different domain for each type)
var api = RestService.For<IReallyExcitingCrudApi<User, string>>("http://api.example.com/users");
```
### Interface inheritance

When multiple services that need to be kept separate share a number of APIs, it is possible to leverage interface inheritance to avoid having to define the same Refit methods multiple times in different services:

```csharp
public interface IBaseService
{
    [Get("/resources")]
    Task<Resource> GetResource(string id);
}

public interface IDerivedServiceA : IBaseService
{
    [Delete("/resources")]
    Task DeleteResource(string id);
}

public interface IDerivedServiceB : IBaseService
{
    [Post("/resources")]
    Task<string> AddResource([Body] Resource resource);
}
```

In this example, the `IDerivedServiceA` interface will expose both the `GetResource` and `DeleteResource` APIs, while `IDerivedServiceB` will expose `GetResource` and `AddResource`.

#### Headers inheritance

When using inheritance, existing header attributes will be passed along as well, and the inner-most ones will have precedence:

```csharp
[Headers("User-Agent: AAA")]
public interface IAmInterfaceA
{
    [Get("/get?result=Ping")]
    Task<string> Ping();
}

[Headers("User-Agent: BBB")]
public interface IAmInterfaceB : IAmInterfaceA
{
    [Get("/get?result=Pang")]
    [Headers("User-Agent: PANG")]
    Task<string> Pang();

    [Get("/get?result=Foo")]
    Task<string> Foo();
}
```

Here, `IAmInterfaceB.Pang()` will use `PANG` as its user agent, while `IAmInterfaceB.Foo` and `IAmInterfaceB.Ping` will use `BBB`.
Note that if `IAmInterfaceB` didn't have a header attribute, `Foo` would then use the `AAA` value inherited from `IAmInterfaceA`.
If an interface is inheriting more than one interface, the order of precedence is the same as the one in which the inherited interfaces are declared:

```csharp
public interface IAmInterfaceC : IAmInterfaceA, IAmInterfaceB
{
    [Get("/get?result=Foo")]
    Task<string> Foo();
}
```

Here `IAmInterfaceC.Foo` would use the header attribute inherited from `IAmInterfaceA`, if present, or the one inherited from `IAmInterfaceB`, and so on for all the declared interfaces.

### Default Interface Methods
Starting with C# 8.0, default interface methods (a.k.a. DIMs) can be defined on interfaces. Refit interfaces can provide additional logic using DIMs, optionally combined with private and/or static helper methods:
```csharp
public interface IApiClient
{
    // implemented by Refit but not exposed publicly
    [Get("/get")]
    internal Task<string> GetInternal();
    // Publicly available with added logic applied to the result from the API call
    public async Task<string> Get()
        => FormatResponse(await GetInternal());
    private static String FormatResponse(string response)
        => $"The response is: {response}";
}
```
The type generated by Refit will implement the method `IApiClient.GetInternal`. If additional logic is required immediately before or after its invocation, it shouldn't be exposed directly and can thus be hidden from consumers by being marked as `internal`.
The default interface method `IApiClient.Get` will be inherited by all types implementing `IApiClient`, including - of course - the type generated by Refit.
Consumers of the `IApiClient` will call the public `Get` method and profit from the additional logic provided in its implementation (optionally, in this case, with the help of the private static helper `FormatResponse`).
To support runtimes without DIM-support (.NET Core 2.x and below or .NET Standard 2.0 and below), two additional types would be required for the same solution.
```csharp
internal interface IApiClientInternal
{
    [Get("/get")]
    Task<string> Get();
}
public interface IApiClient
{
    public Task<string> Get();
}
internal class ApiClient : IApiClient
{
    private readonly IApiClientInternal client;
    public ApiClient(IApiClientInternal client) => this.client = client;
    public async Task<string> Get()
        => FormatResponse(await client.Get());
    private static String FormatResponse(string response)
        => $"The response is: {response}";
}
```

### Using HttpClientFactory

Refit has first class support for the ASP.Net Core 2.1 HttpClientFactory. Add a reference to `Refit.HttpClientFactory` and call
the provided extension method in your `ConfigureServices` method to configure your Refit interface:

```csharp
services.AddRefitClient<IWebApi>()
        .ConfigureHttpClient(c => c.BaseAddress = new Uri("https://api.example.com"));
        // Add additional IHttpClientBuilder chained methods as required here:
        // .AddHttpMessageHandler<MyHandler>()
        // .SetHandlerLifetime(TimeSpan.FromMinutes(2));
```

Optionally, a `RefitSettings` object can be included:
```csharp
var settings = new RefitSettings();
// Configure refit settings here

services.AddRefitClient<IWebApi>(settings)
        .ConfigureHttpClient(c => c.BaseAddress = new Uri("https://api.example.com"));
        // Add additional IHttpClientBuilder chained methods as required here:
        // .AddHttpMessageHandler<MyHandler>()
        // .SetHandlerLifetime(TimeSpan.FromMinutes(2));

// or injected from the container
services.AddRefitClient<IWebApi>(provider => new RefitSettings() { /* configure settings */ })
        .ConfigureHttpClient(c => c.BaseAddress = new Uri("https://api.example.com"));
        // Add additional IHttpClientBuilder chained methods as required here:
        // .AddHttpMessageHandler<MyHandler>()
        // .SetHandlerLifetime(TimeSpan.FromMinutes(2));

```
Note that some of the properties of `RefitSettings` will be ignored because the `HttpClient` and `HttpClientHandlers` will be managed by the `HttpClientFactory` instead of Refit.

You can then get the api interface using constructor injection:

```csharp
public class HomeController : Controller
{
    public HomeController(IWebApi webApi)
    {
        _webApi = webApi;
    }

    private readonly IWebApi _webApi;

    public async Task<IActionResult> Index(CancellationToken cancellationToken)
    {
        var thing = await _webApi.GetSomethingWeNeed(cancellationToken);
        return View(thing);
    }
}
```

### Providing a custom HttpClient

You can supply a custom `HttpClient` instance by simply passing it as a parameter to the `RestService.For<T>` method:

```csharp
RestService.For<ISomeApi>(new HttpClient()
{
    BaseAddress = new Uri("https://www.someapi.com/api/")
});
```

However, when supplying a custom `HttpClient` instance, `HttpMessageHandlerFactory` will not be used because you already control the handler pipeline.

`AuthorizationHeaderValueGetter` does still work with `RestService.For<T>(httpClient, settings)` when the request includes an `Authorization` header placeholder (for example `[Headers("Authorization: Bearer")]`).

If you still want to be able to configure the `HtttpClient` instance that `Refit` provides while still making use of the above settings, simply expose the `HttpClient` on the API interface:

```csharp
interface ISomeApi
{
    // This will automagically be populated by Refit if the property exists
    HttpClient Client { get; }

    [Headers("Authorization: Bearer")]
    [Get("/endpoint")]
    Task<string> SomeApiEndpoint();
}
```

Then, after creating the REST service, you can set any `HttpClient` property you want, e.g. `Timeout`:

```csharp
SomeApi = RestService.For<ISomeApi>("https://www.someapi.com/api/", new RefitSettings()
{
    AuthorizationHeaderValueGetter = (rq, ct) => GetTokenAsync()
});

SomeApi.Client.Timeout = timeout;
```

### Native AoT / trimming guidance

Refit's recommended **source-generator-first** setup for Native AoT and trimmed applications is:

1. Use normal Refit interfaces so the Refit source generator produces the client implementation at build time.
2. Prefer `RestService.For<T>(...)` over reflection-heavy manual patterns around `Type` where possible.
3. Supply source-generated `System.Text.Json` metadata for your DTOs.

For the default `SystemTextJsonContentSerializer` on .NET 8+, Refit prefers `JsonTypeInfo` metadata from your configured `JsonSerializerOptions` when it is available. That means Native AoT apps can improve compatibility by supplying source-generated metadata through a `JsonSerializerContext` or `TypeInfoResolver` on the serializer options they pass into `SystemTextJsonContentSerializer`.

```csharp
[JsonSerializable(typeof(Todo))]
public partial class TodoJsonContext : JsonSerializerContext
{
}

var settings = new RefitSettings(
    new SystemTextJsonContentSerializer(
        new JsonSerializerOptions(JsonSerializerDefaults.Web)
        {
            TypeInfoResolver = TodoJsonContext.Default
        }
    )
);

var api = RestService.For<ITodoApi>("https://api.example.com", settings);
```

If a generated Refit client cannot be found at runtime, Refit now explicitly points you back to the source generator/build output and recommends generated clients plus source-generated `System.Text.Json` metadata for Native AoT scenarios.

Refit also ships analyzers for newer Roslyn toolchains, including a Roslyn 5.0 build for newer Visual Studio versions.

### Handling exceptions
Refit has different exception handling behavior depending on if your Refit interface methods return `Task<T>` or if they return `Task<IApiResponse>`, `Task<IApiResponse<T>>`, or `Task<ApiResponse<T>>`.

#### <a id="when-returning-taskapiresponset"></a>When returning `Task<IApiResponse>`, `Task<IApiResponse<T>>`, or `Task<ApiResponse<T>>`
Refit traps any `ApiException` raised by the `ExceptionFactory` when processing the response, and any errors that occur when attempting to deserialize the response to `ApiResponse<T>`, and populates the exception into the `Error` property on `ApiResponse<T>` without throwing the exception.

You can then decide what to do like so:

```csharp
var response = await _myRefitClient.GetSomeStuff();
if(response.IsSuccessful)
{
   //do your thing
}
else
{
   _logger.LogError(response.Error, response.Error.Content);
}
```

> [!NOTE]
> The `IsSuccessful` property checks whether the response status code is in the range 200-299 and there wasn't any other error (for example, during content deserialization). If you just want to check the HTTP response status code, you can use the `IsSuccessStatusCode` property.

#### When returning `Task<T>`
Refit throws any `ApiException` raised by the `ExceptionFactory` when processing the response and any errors that occur when attempting to deserialize the response to `Task<T>`.

```csharp
// ...
try
{
   var result = await awesomeApi.GetFooAsync("bar");
}
catch (ApiException exception)
{
   //exception handling
}
// ...
```

Refit can also throw `ValidationApiException` instead which in addition to the information present on `ApiException` also contains `ProblemDetails` when the service implements the [RFC 7807](https://tools.ietf.org/html/rfc7807) specification for problem details and the response content type is `application/problem+json`

For specific information on the problem details of the validation exception, simply catch `ValidationApiException`:

```csharp
// ...
try
{
   var result = await awesomeApi.GetFooAsync("bar");
}
catch (ValidationApiException validationException)
{
   // handle validation here by using validationException.Content,
   // which is type of ProblemDetails according to RFC 7807

   // If the response contains additional properties on the problem details,
   // they will be added to the validationException.Content.Extensions collection.
}
catch (ApiException exception)
{
   // other exception handling
}
// ...
```

#### Providing a custom `ExceptionFactory`

You can also override default exceptions behavior that are raised by the `ExceptionFactory` when processing the result by providing a custom exception factory in `RefitSettings`. For example, you can suppress all exceptions with the following:

```csharp
var nullTask = Task.FromResult<Exception>(null);

var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        ExceptionFactory = httpResponse => nullTask;
    });
```

For exceptions raised when attempting to deserialize the response use DeserializationExceptionFactory described bellow.

#### Providing a custom `DeserializationExceptionFactory`

You can override default deserialization exceptions behavior that are raised by the `DeserializationExceptionFactory` when processing the result by providing a custom exception factory in `RefitSettings`. For example, you can suppress all deserialization exceptions with the following:

```csharp
var nullTask = Task.FromResult<Exception>(null);

var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        DeserializationExceptionFactory = (httpResponse, exception) => nullTask;
    });
```

#### `ApiException` deconstruction with Serilog

For users of [Serilog](https://serilog.net), you can enrich the logging of `ApiException` using the
[Serilog.Exceptions.Refit](https://www.nuget.org/packages/Serilog.Exceptions.Refit) NuGet package. Details of how to
integrate this package into your applications can be found [here](https://github.com/RehanSaeed/Serilog.Exceptions#serilogexceptionsrefit).


================================================
FILE: Refit/AnonymousDisposable.cs
================================================
namespace Refit
{
    sealed class AnonymousDisposable(Action block) : IDisposable
    {
        public void Dispose()
        {
            block();
        }
    }
}


================================================
FILE: Refit/AotCompatibility.cs
================================================
using System.Runtime.CompilerServices;
using System.Diagnostics.CodeAnalysis;
#if NET7_0_OR_GREATER
using System.Runtime.InteropServices;
#endif

namespace Refit
{
    internal static class AotCompatibility
    {
        // Intentionally left blank to avoid changing public API surface (e.g., assembly-level attributes)
        // while keeping a central place for any future AOT-related initializers if needed.
    }
}


================================================
FILE: Refit/ApiException.cs
================================================
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

namespace Refit
{
    /// <summary>
    /// Represents an error that occured while sending an API request.
    /// </summary>
    [Serializable]
#pragma warning disable CA1032 // Implement standard exception constructors
    public class ApiException : Exception
#pragma warning restore CA1032 // Implement standard exception constructors
    {
        /// <summary>
        /// HTTP response status code.
        /// </summary>
        public HttpStatusCode StatusCode { get; }

        /// <summary>
        /// The reason phrase which typically is sent by the server together with the status code.
        /// </summary>
        public string? ReasonPhrase { get; }

        /// <summary>
        /// HTTP response headers.
        /// </summary>
        public HttpResponseHeaders Headers { get; }

        /// <summary>
        /// The HTTP method used to send the request.
        /// </summary>
        public HttpMethod HttpMethod { get; }

        /// <summary>
        /// The <see cref="System.Uri"/> used to send the HTTP request.
        /// </summary>
        public Uri? Uri => RequestMessage.RequestUri;

        /// <summary>
        /// The HTTP Request message used to send the request.
        /// </summary>
        public HttpRequestMessage RequestMessage { get; }

        /// <summary>
        /// HTTP response content headers as defined in RFC 2616.
        /// </summary>
        public HttpContentHeaders? ContentHeaders { get; private set; }

        /// <summary>
        /// HTTP Response content as string.
        /// </summary>
        public string? Content { get; private set; }

        /// <summary>
        /// Does the response have content?
        /// </summary>
        #if NET6_0_OR_GREATER
        [MemberNotNullWhen(true, nameof(Content))]
        #endif
        public bool HasContent => !string.IsNullOrWhiteSpace(Content);

        /// <summary>
        /// Refit settings used to send the request.
        /// </summary>
        public RefitSettings RefitSettings { get; }

        /// <summary>
        /// Initializes a new instance of the <see cref="ApiException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="httpMethod">The HTTP method.</param>
        /// <param name="content">The content.</param>
        /// <param name="statusCode">The status code.</param>
        /// <param name="reasonPhrase">The reason phrase.</param>
        /// <param name="headers">The headers.</param>
        /// <param name="refitSettings">The refit settings.</param>
        /// <param name="innerException">The inner exception.</param>
        protected ApiException(
            HttpRequestMessage message,
            HttpMethod httpMethod,
            string? content,
            HttpStatusCode statusCode,
            string? reasonPhrase,
            HttpResponseHeaders headers,
            RefitSettings refitSettings,
            Exception? innerException = null
        )
            : this(
                CreateMessage(statusCode, reasonPhrase),
                message,
                httpMethod,
                content,
                statusCode,
                reasonPhrase,
                headers,
                refitSettings,
                innerException
            ) { }

        /// <summary>
        /// Initializes a new instance of the <see cref="ApiException"/> class.
        /// </summary>
        /// <param name="exceptionMessage">The exception message.</param>
        /// <param name="message">The message.</param>
        /// <param name="httpMethod">The HTTP method.</param>
        /// <param name="content">The content.</param>
        /// <param name="statusCode">The status code.</param>
        /// <param name="reasonPhrase">The reason phrase.</param>
        /// <param name="headers">The headers.</param>
        /// <param name="refitSettings">The refit settings.</param>
        /// <param name="innerException">The inner exception.</param>
        protected ApiException(
            string exceptionMessage,
            HttpRequestMessage message,
            HttpMethod httpMethod,
            string? content,
            HttpStatusCode statusCode,
            string? reasonPhrase,
            HttpResponseHeaders headers,
            RefitSettings refitSettings,
            Exception? innerException = null
        )
            : base(exceptionMessage, innerException)
        {
            RequestMessage = message;
            HttpMethod = httpMethod;
            StatusCode = statusCode;
            ReasonPhrase = reasonPhrase;
            Headers = headers;
            RefitSettings = refitSettings;
            Content = content;
        }

        /// <summary>
        /// Get the deserialized response content as nullable <typeparamref name="T"/>.
        /// </summary>
        /// <typeparam name="T">Type to deserialize the content to</typeparam>
        /// <returns>The response content deserialized as <typeparamref name="T"/></returns>
        public async Task<T?> GetContentAsAsync<T>() =>
            HasContent
                ? await RefitSettings
                    .ContentSerializer.FromHttpContentAsync<T>(new StringContent(Content!))
                    .ConfigureAwait(false)
                : default;

        /// <summary>
        /// Create an instance of <see cref="ApiException"/>.
        /// </summary>
        /// <param name="message">The HTTP Request message used to send the request.</param>
        /// <param name="httpMethod">The HTTP method used to send the request.</param>
        /// <param name="response">The HTTP Response message.</param>
        /// <param name="refitSettings">Refit settings used to sent the request.</param>
        /// <param name="innerException">Add an inner exception to the <see cref="ApiException"/>.</param>
        /// <returns>A newly created <see cref="ApiException"/>.</returns>
#pragma warning disable VSTHRD200 // Use "Async" suffix for async methods
        public static Task<ApiException> Create(
            HttpRequestMessage message,
            HttpMethod httpMethod,
            HttpResponseMessage response,
            RefitSettings refitSettings,
            Exception? innerException = null
        )
#pragma warning restore VSTHRD200 // Use "Async" suffix for async methods
        {
            if (response?.IsSuccessStatusCode == true)
            {
                throw new ArgumentException("Response is successful, cannot create an ApiException.", nameof(response));
            }

            var exceptionMessage = CreateMessage(response!.StatusCode, response.ReasonPhrase);
            return Create(
                exceptionMessage,
                message,
                httpMethod,
                response,
                refitSettings,
                innerException
            );
        }

        /// <summary>
        /// Create an instance of <see cref="ApiException"/> with a custom exception message.
        /// </summary>
        /// <param name="exceptionMessage">A custom exception message.</param>
        /// <param name="message">The HTTP Request message used to send the request.</param>
        /// <param name="httpMethod">The HTTP method used to send the request.</param>
        /// <param name="response">The HTTP Response message.</param>
        /// <param name="refitSettings">Refit settings used to sent the request.</param>
        /// <param name="innerException">Add an inner exception to the <see cref="ApiException"/>.</param>
        /// <returns>A newly created <see cref="ApiException"/>.</returns>
#pragma warning disable VSTHRD200 // Use "Async" suffix for async methods
        public static async Task<ApiException> Create(
            string exceptionMessage,
            HttpRequestMessage message,
            HttpMethod httpMethod,
            HttpResponseMessage response,
            RefitSettings refitSettings,
            Exception? innerException = null
        )
#pragma warning restore VSTHRD200 // Use "Async" suffix for async methods
        {
            if (response == null)
            {
                throw new ArgumentNullException(nameof(response));
            }

            var exception = new ApiException(
                exceptionMessage,
                message,
                httpMethod,
                null,
                response.StatusCode,
                response.ReasonPhrase,
                response.Headers,
                refitSettings,
                innerException
            );

            if (response.Content == null)
            {
                return exception;
            }

#pragma warning disable CA1031 // Do not catch general exception types
            try
            {
                exception.ContentHeaders = response.Content.Headers;
                var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
                exception.Content = content;

                if (
                    response
                        .Content.Headers?.ContentType
                        ?.MediaType
                        ?.Equals("application/problem+json") ?? false
                )
                {
                    exception = ValidationApiException.Create(exception);
                }

                response.Content.Dispose();
            }
            catch
            {
                // NB: We're already handling an exception at this point,
                // so we want to make sure we don't throw another one
                // that hides the real error.
            }
#pragma warning restore CA1031 // Do not catch general exception types

            return exception;
        }

        static string CreateMessage(HttpStatusCode statusCode, string? reasonPhrase) =>
            $"Response status code does not indicate success: {(int)statusCode} ({reasonPhrase}).";
    }
}


================================================
FILE: Refit/ApiResponse.cs
================================================
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

namespace Refit
{
    static class ApiResponse
    {
        internal static T Create<T, TBody>(
            HttpResponseMessage resp,
            object? content,
            RefitSettings settings,
            ApiException? error = null
        )
        {
            return (T)
                Activator.CreateInstance(
                    typeof(ApiResponse<TBody>),
                    resp,
                    content,
                    settings,
                    error
                )!;
        }
    }

    /// <summary>
    /// Implementation of <see cref="IApiResponse{T}"/> that provides additional functionalities.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <remarks>
    /// Create an instance of <see cref="ApiResponse{T}"/> with type <typeparamref name="T"/>.
    /// </remarks>
    /// <param name="response">Original HTTP Response message.</param>
    /// <param name="content">Response content.</param>
    /// <param name="settings">Refit settings used to send the request.</param>
    /// <param name="error">The ApiException, if the request failed.</param>
    /// <exception cref="ArgumentNullException"></exception>
    public sealed class ApiResponse<T>(
        HttpResponseMessage response,
        T? content,
        RefitSettings settings,
        ApiException? error = null
        ) : IApiResponse<T>
    {
        readonly HttpResponseMessage response = response ?? throw new ArgumentNullException(nameof(response));
        bool disposed;

        /// <summary>
        /// Deserialized request content as <typeparamref name="T"/>.
        /// </summary>
        public T? Content { get; } = content;

        /// <summary>
        /// Refit settings used to send the request.
        /// </summary>
        public RefitSettings Settings { get; } = settings;

        /// <summary>
        /// HTTP response headers.
        /// </summary>
        public HttpResponseHeaders Headers => response.Headers;

        /// <summary>
        /// HTTP response content headers as defined in RFC 2616.
        /// </summary>
        public HttpContentHeaders? ContentHeaders => response.Content?.Headers;

        /// <summary>
        /// Indicates whether the request was successful.
        /// </summary>
#if NET6_0_OR_GREATER
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
#endif
        public bool IsSuccessStatusCode => response.IsSuccessStatusCode;

        /// <summary>
        /// Indicates whether the request was successful and there wasn't any other error (for example, during content deserialization).
        /// </summary>
#if NET6_0_OR_GREATER
        [MemberNotNullWhen(true, nameof(Content))]
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
#endif
        public bool IsSuccessful => IsSuccessStatusCode && Error is null;

        /// <summary>
        /// The reason phrase which typically is sent by the server together with the status code.
        /// </summary>
        public string? ReasonPhrase => response.ReasonPhrase;

        /// <summary>
        /// The HTTP Request message which led to this response.
        /// </summary>
        public HttpRequestMessage? RequestMessage => response.RequestMessage;

        /// <summary>
        /// HTTP response status code.
        /// </summary>
        public HttpStatusCode StatusCode => response.StatusCode;

        /// <summary>
        /// HTTP Message version.
        /// </summary>
        public Version Version => response.Version;

        /// <summary>
        /// The <see cref="ApiException" /> object in case of unsuccessful response.
        /// </summary>
        public ApiException? Error { get; private set; } = error;

        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            Dispose(true);
        }

        /// <summary>
        /// Ensures the request was successful by throwing an exception in case of failure
        /// </summary>
        /// <returns>The current <see cref="ApiResponse{T}"/></returns>
        /// <exception cref="ApiException"></exception>
        public async Task<ApiResponse<T>> EnsureSuccessStatusCodeAsync()
        {
            if (!IsSuccessStatusCode)
            {
                await ThrowsApiExceptionAsync().ConfigureAwait(false);
            }

            return this;
        }

        /// <summary>
        /// Ensures the request was successful and without any other error by throwing an exception in case of failure
        /// </summary>
        /// <returns>The current <see cref="ApiResponse{T}"/></returns>
        /// <exception cref="ApiException"></exception>
        public async Task<ApiResponse<T>> EnsureSuccessfulAsync()
        {
            if (!IsSuccessful)
            {
                await ThrowsApiExceptionAsync().ConfigureAwait(false);
            }

            return this;
        }

        void Dispose(bool disposing)
        {
            if (!disposing || disposed)
                return;

            disposed = true;

            response.Dispose();
        }

        private async Task<ApiException> ThrowsApiExceptionAsync()
        {
            var exception =
                    Error
                    ?? await ApiException
                        .Create(
                            response.RequestMessage!,
                            response.RequestMessage!.Method,
                            response,
                            Settings
                        )
                        .ConfigureAwait(false);

            Dispose();

            throw exception;
        }
    }

    /// <inheritdoc/>
    public interface IApiResponse<out T> : IApiResponse
    {
#if NET6_0_OR_GREATER
        /// <summary>
        /// The <see cref="ApiException"/> object in case of unsuccessful response.
        /// </summary>
        [SuppressMessage(
            "Naming",
            "CA1716:Identifiers should not match keywords",
            Justification = "By Design"
        )]
        new ApiException? Error { get; }

        /// <summary>
        /// HTTP response content headers as defined in RFC 2616.
        /// </summary>
        new HttpContentHeaders? ContentHeaders { get; }

        /// <summary>
        /// Indicates whether the request was successful.
        /// </summary>
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
        new bool IsSuccessStatusCode { get; }

        /// <summary>
        /// Indicates whether the request was successful and there wasn't any other error (for example, during content deserialization).
        /// </summary>
        [MemberNotNullWhen(true, nameof(Content))]
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
        new bool IsSuccessful { get; }
#endif

        /// <summary>
        /// Deserialized request content as <typeparamref name="T"/>.
        /// </summary>
        T? Content { get; }
    }

    /// <summary>
    /// Base interface used to represent an API response.
    /// </summary>
    public interface IApiResponse : IDisposable
    {
        /// <summary>
        /// HTTP response headers.
        /// </summary>
        HttpResponseHeaders Headers { get; }

        /// <summary>
        /// HTTP response content headers as defined in RFC 2616.
        /// </summary>
        HttpContentHeaders? ContentHeaders { get; }

        /// <summary>
        /// Indicates whether the request was successful.
        /// </summary>
#if NET6_0_OR_GREATER
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
#endif
        bool IsSuccessStatusCode { get; }

        /// <summary>
        /// Indicates whether the request was successful and there wasn't any other error (for example, during content deserialization).
        /// </summary>
#if NET6_0_OR_GREATER        
        [MemberNotNullWhen(true, nameof(ContentHeaders))]
        [MemberNotNullWhen(false, nameof(Error))]
#endif
        bool IsSuccessful { get; }

        /// <summary>
        /// HTTP response status code.
        /// </summary>
        HttpStatusCode StatusCode { get; }

        /// <summary>
        /// The reason phrase which typically is sent by the server together with the status code.
        /// </summary>
        string? ReasonPhrase { get; }

        /// <summary>
        /// The HTTP Request message which led to this response.
        /// </summary>
        HttpRequestMessage? RequestMessage { get; }

        /// <summary>
        /// HTTP Message version.
        /// </summary>
        Version Version { get; }

        /// <summary>
        /// The <see cref="ApiException"/> object in case of unsuccessful response.
        /// </summary>
        [SuppressMessage(
           "Naming",
           "CA1716:Identifiers should not match keywords",
           Justification = "By Design"
       )]
        ApiException? Error { get; }
    }
}


================================================
FILE: Refit/Attributes.cs
================================================
using System.Net.Http;

namespace Refit
{
    /// <summary>
    /// HttpMethodAttribute.
    /// </summary>
    /// <seealso cref="System.Attribute" />
    /// <remarks>
    /// Initializes a new instance of the <see cref="HttpMethodAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    public abstract class HttpMethodAttribute(string path) : Attribute
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public abstract HttpMethod Method { get; }

        /// <summary>
        /// Gets or sets the path.
        /// </summary>
        /// <value>
        /// The path.
        /// </value>
        public virtual string Path { get; protected set; } = path;
    }

    /// <summary>
    /// Send the request with HTTP method 'GET'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="GetAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
#pragma warning disable CA1813 // Avoid unsealed attributes
    public class GetAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => HttpMethod.Get;
    }

    /// <summary>
    /// Send the request with HTTP method 'POST'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="PostAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class PostAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => HttpMethod.Post;
    }

    /// <summary>
    /// Send the request with HTTP method 'PUT'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="PutAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class PutAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => HttpMethod.Put;
    }

    /// <summary>
    /// Send the request with HTTP method 'DELETE'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="DeleteAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class DeleteAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => HttpMethod.Delete;
    }

    /// <summary>
    /// Send the request with HTTP method 'PATCH'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="PatchAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class PatchAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => new("PATCH");
    }

    /// <summary>
    /// Send the request with HTTP method 'OPTION'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="OptionsAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class OptionsAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => new("OPTIONS");
    }

    /// <summary>
    /// Send the request with HTTP method 'HEAD'.
    /// </summary>
    /// <remarks>
    /// Initializes a new instance of the <see cref="HeadAttribute"/> class.
    /// </remarks>
    /// <param name="path">The path.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class HeadAttribute(string path) : HttpMethodAttribute(path)
    {
        /// <summary>
        /// Gets the method.
        /// </summary>
        /// <value>
        /// The method.
        /// </value>
        public override HttpMethod Method => HttpMethod.Head;
    }

    /// <summary>
    /// Send the request as multipart.
    /// </summary>
    /// <remarks>
    /// Currently, multipart methods only support the following parameter types: <see cref="string"/>, <see cref="byte"/> array, <see cref="System.IO.Stream"/>, <see cref="System.IO.FileInfo"/>.
    /// </remarks>
    /// <remarks>
    /// Initializes a new instance of the <see cref="MultipartAttribute"/> class.
    /// </remarks>
    /// <param name="boundaryText">The boundary text.</param>
    [AttributeUsage(AttributeTargets.Method)]
    public class MultipartAttribute(string boundaryText = "----MyGreatBoundary") : Attribute
    {
        /// <summary>
        /// Gets the boundary text.
        /// </summary>
        /// <value>
        /// The boundary text.
        /// </value>
        public string BoundaryText { get; private set; } = boundaryText;
    }

    /// <summary>
    /// Defines methods to serialize HTTP requests' bodies.
    /// </summary>
    public enum BodySerializationMethod
    {
        /// <summary>
        /// Encodes everything using the ContentSerializer in RefitSettings except for strings. Strings are set as-is
        /// </summary>
        Default,

        /// <summary>
        /// Json encodes everything, including strings
        /// </summary>
        [Obsolete("Use BodySerializationMethod.Serialized instead", false)]
        Json,

        /// <summary>
        /// Form-UrlEncode's the values
        /// </summary>
        UrlEncoded,

        /// <summary>
        /// Encodes everything using the ContentSerializer in RefitSettings
        /// </summary>
        Serialized
    }

    /// <summary>
    /// Set a parameter to be sent as the HTTP request's body.
    /// </summary>
    /// <remarks>
    /// There are four behaviors when sending a parameter as the request body:<br/>
    /// - If the type is/implements <see cref="System.IO.Stream"/>, the content will be streamed via <see cref="StreamContent"/>.<br/>
    /// - If the type is <see cref="string"/>, it will be used directly as the content unless <c>[Body(BodySerializationMethod.Json)]</c> is set
    /// which will send it as a <see cref="StringContent"/>.<br/>
    /// - If the parameter has the attribute <c>[Body(BodySerializationMethod.UrlEncoded)]</c>, the content will be URL-encoded.<br/>
    /// - For all other types, the object will be serialized using the content serializer specified in the request's <see cref="RefitSettings"/>.
    /// </remarks>
    [AttributeUsage(AttributeTargets.Parameter)]
    public class BodyAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BodyAttribute"/> class.
        /// </summary>
        public BodyAttribute() { }

        /// <summary>
        /// Initializes a new instance of the <see cref="BodyAttribute"/> class.
        /// </summary>
        /// <param name="buffered">if set to <c>true</c> [buffered].</param>
        public BodyAttribute(bool buffered) => Buffered = buffered;

        /// <summary>
        /// Initializes a new instance of the <see cref="BodyAttribute"/> class.
        /// </summary>
        /// <param name="serializationMethod">The serialization method.</param>
        /// <param name="buffered">if set to <c>true</c> [buffered].</param>
        public BodyAttribute(BodySerializationMethod serializationMethod, bool buffered)
        {
            SerializationMethod = serializationMethod;
            Buffered = buffered;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="BodyAttribute"/> class.
        /// </summary>
        /// <param name="serializationMethod">The serialization method.</param>
        public BodyAttribute(
            BodySerializationMethod serializationMethod = BodySerializationMethod.Default
        )
        {
            SerializationMethod = serializationMethod;
        }

        /// <summary>
        /// Gets or sets the buffered.
        /// </summary>
        /// <value>
        /// The buffered.
        /// </value>
        public bool? Buffered { get; }

        /// <summary>
        /// Gets or sets the serialization method.
        /// </summary>
        /// <value>
        /// The serialization method.
        /// </value>
        public BodySerializationMethod Serializatio
Download .txt
gitextract_tnsc_ofx/

├── .devcontainers/
│   ├── Dockerfile
│   ├── devcontainer.json
│   └── post-create.sh
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.yml
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── renovate.json
│   └── workflows/
│       ├── ci-build.yml
│       ├── lock.yml
│       └── release.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── COPYING
├── CodeCoverage.runsettings
├── Directory.Build.props
├── InterfaceStubGenerator.Roslyn38/
│   └── InterfaceStubGenerator.Roslyn38.csproj
├── InterfaceStubGenerator.Roslyn41/
│   └── InterfaceStubGenerator.Roslyn41.csproj
├── InterfaceStubGenerator.Roslyn50/
│   └── InterfaceStubGenerator.Roslyn50.csproj
├── InterfaceStubGenerator.Shared/
│   ├── DiagnosticDescriptors.cs
│   ├── Emitter.cs
│   ├── ITypeSymbolExtensions.cs
│   ├── ImmutableEquatableArray.cs
│   ├── IncrementalValuesProviderExtensions.cs
│   ├── InterfaceStubGenerator.Shared.projitems
│   ├── InterfaceStubGenerator.Shared.shproj
│   ├── InterfaceStubGenerator.cs
│   ├── IsExternalInit.cs
│   ├── Models/
│   │   ├── ContextGenerationModel.cs
│   │   ├── InterfaceModel.cs
│   │   ├── MethodModel.cs
│   │   ├── ParameterModel.cs
│   │   ├── TypeConstraint.cs
│   │   └── WellKnownTypes.cs
│   ├── Parser.cs
│   ├── Polyfills/
│   │   └── IndexRange.cs
│   ├── SourceWriter.cs
│   └── UniqueNameBuilder.cs
├── LICENSE
├── NuGet.config
├── README.md
├── Refit/
│   ├── AnonymousDisposable.cs
│   ├── AotCompatibility.cs
│   ├── ApiException.cs
│   ├── ApiResponse.cs
│   ├── Attributes.cs
│   ├── AuthenticatedHttpClientHandler.cs
│   ├── Buffers/
│   │   ├── PooledBufferWriter.Stream.NETStandard21.cs
│   │   ├── PooledBufferWriter.Stream.cs
│   │   ├── PooledBufferWriter.ThrowExceptions.cs
│   │   └── PooledBufferWriter.cs
│   ├── CachedRequestBuilderImplementation.cs
│   ├── CamelCaseUrlParameterKeyFormatter.cs
│   ├── CloseGenericMethodKey.cs
│   ├── CollectionFormat.cs
│   ├── DynamicallyAccessedMembersAttribute.cs
│   ├── EnumerableExtensions.cs
│   ├── FormValueMultimap.cs
│   ├── HttpContentExtensions.cs
│   ├── HttpRequestMessageProperties.cs
│   ├── JsonContentSerializer.cs
│   ├── MultipartItem.cs
│   ├── NameValueCollection.cs
│   ├── Polyfills.Trimming.cs
│   ├── ProblemDetails.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── PushStreamContent.cs
│   ├── Refit.csproj
│   ├── RefitSettings.cs
│   ├── RequestBuilder.cs
│   ├── RequestBuilderFactory.cs
│   ├── RequestBuilderImplementation.TaskToObservable.cs
│   ├── RequestBuilderImplementation.cs
│   ├── RestMethodInfo.cs
│   ├── RestMethodParameterInfo.cs
│   ├── RestService.cs
│   ├── SystemTextJsonContentSerializer.cs
│   ├── UniqueName.cs
│   ├── ValidationApiException.cs
│   ├── ValueStringBuilder.cs
│   └── targets/
│       ├── refit.props
│       └── refit.targets
├── Refit.Benchmarks/
│   ├── Benchmarks/
│   │   ├── net5.0/
│   │   │   ├── Benchmark_AllReturnTypes.bat
│   │   │   ├── Benchmark_ObservableHttpResponseMessage.bat
│   │   │   ├── Benchmark_Task.bat
│   │   │   ├── Benchmark_TaskApiResponseT.bat
│   │   │   ├── Benchmark_TaskHttpContent.bat
│   │   │   ├── Benchmark_TaskHttpResponseMessage.bat
│   │   │   ├── Benchmark_TaskStream.bat
│   │   │   ├── Benchmark_TaskString.bat
│   │   │   └── Benchmark_TaskT.bat
│   │   ├── net6.0/
│   │   │   ├── Benchmark_AllReturnTypes.bat
│   │   │   ├── Benchmark_ObservableHttpResponseMessage.bat
│   │   │   ├── Benchmark_Task.bat
│   │   │   ├── Benchmark_TaskApiResponseT.bat
│   │   │   ├── Benchmark_TaskHttpContent.bat
│   │   │   ├── Benchmark_TaskHttpResponseMessage.bat
│   │   │   ├── Benchmark_TaskStream.bat
│   │   │   ├── Benchmark_TaskString.bat
│   │   │   └── Benchmark_TaskT.bat
│   │   └── netcoreapp3.1/
│   │       ├── Benchmark_AllReturnTypes.bat
│   │       ├── Benchmark_ObservableHttpResponseMessage.bat
│   │       ├── Benchmark_Task.bat
│   │       ├── Benchmark_TaskApiResponseT.bat
│   │       ├── Benchmark_TaskHttpContent.bat
│   │       ├── Benchmark_TaskHttpResponseMessage.bat
│   │       ├── Benchmark_TaskStream.bat
│   │       ├── Benchmark_TaskString.bat
│   │       └── Benchmark_TaskT.bat
│   ├── EndToEndBenchmark.cs
│   ├── IGitHubService.cs
│   ├── IPerformanceService.cs
│   ├── PerformanceBenchmark.cs
│   ├── Program.cs
│   ├── Refit.Benchmarks.csproj
│   ├── SourceGeneratorBenchmark.cs
│   ├── SourceGeneratorBenchmarksProjects.cs
│   ├── StartupBenchmark.cs
│   ├── StaticFileHttpResponseHandler.cs
│   ├── StaticValueHttpResponseHandler.cs
│   ├── newtonsoft-json-10-users.json
│   └── system-text-json-10-users.json
├── Refit.GeneratorTests/
│   ├── Fixture.cs
│   ├── GeneratedTest.cs
│   ├── Incremental/
│   │   ├── FunctionTest.cs
│   │   ├── GenericTest.cs
│   │   ├── IncrementalGeneratorRunReasons.cs
│   │   ├── IncrementalTest.cs
│   │   ├── InheritanceTest.cs
│   │   └── TestHelper.cs
│   ├── InterfaceTests.cs
│   ├── MethodTests.cs
│   ├── ModuleInitializer.cs
│   ├── ParameterTests.cs
│   ├── Refit.GeneratorTests.csproj
│   ├── ReturnTypeTests.cs
│   └── _snapshots/
│       ├── GeneratedTest.ShouldEmitAllFiles#Generated.g.verified.cs
│       ├── GeneratedTest.ShouldEmitAllFiles#IGeneratedClient.g.verified.cs
│       ├── GeneratedTest.ShouldEmitAllFiles#PreserveAttribute.g.verified.cs
│       ├── InterfaceTests.ContainedInterfaceTest#IContainedInterface.g.verified.cs
│       ├── InterfaceTests.DefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.DerivedDefaultInterfaceMethod#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.DerivedDefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.DisposableTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.GlobalNamespaceTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceDerivedFromRefitBaseTest#IDerivedInterface.g.verified.cs
│       ├── InterfaceTests.InterfaceWithGenericConstraint#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentCasing#IApi.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentCasing#Iapi1.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentSignature#IApi.g.verified.cs
│       ├── InterfaceTests.InterfacesWithDifferentSignature#IApi1.g.verified.cs
│       ├── InterfaceTests.NestedNamespaceTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.NonRefitMethodShouldRaiseDiagnostic#IGeneratedClient.g.verified.cs
│       ├── InterfaceTests.NonRefitMethodShouldRaiseDiagnostic.verified.txt
│       ├── InterfaceTests.RefitInterfaceDerivedFromBaseTest#IGeneratedInterface.g.verified.cs
│       ├── InterfaceTests.RefitInterfaceDerivedFromBaseTest.verified.txt
│       ├── InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
│       ├── InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IGeneratedInterface.g.verified.cs
│       ├── MethodTests.MethodsWithGenericConstraints#IGeneratedClient.g.verified.cs
│       ├── MethodTests.MethodsWithGenericConstraints.verified.txt
│       ├── ParameterTests.NullableRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.NullableValueTypeRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.RouteParameter#IGeneratedClient.g.verified.cs
│       ├── ParameterTests.ValueTypeRouteParameter#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericStructConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericTaskShouldWork#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.GenericUnmanagedConstraintReturnTask#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnIObservable#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnNullableObject#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnNullableValueType#IGeneratedClient.g.verified.cs
│       ├── ReturnTypeTests.ReturnUnsupportedType#IGeneratedClient.g.verified.cs
│       └── ReturnTypeTests.VoidTaskShouldWork#IGeneratedClient.g.verified.cs
├── Refit.HttpClientFactory/
│   ├── HttpClientFactoryCore.cs
│   ├── HttpClientFactoryExtensions.cs
│   ├── HttpClientFactoryExtensions.tt
│   ├── Refit.HttpClientFactory.csproj
│   └── SettingsFor.cs
├── Refit.Newtonsoft.Json/
│   ├── NewtonsoftJsonContentSerializer.cs
│   └── Refit.Newtonsoft.Json.csproj
├── Refit.Tests/
│   ├── API/
│   │   ├── ApiApprovalTests.Refit.DotNet8_0.verified.txt
│   │   ├── ApiApprovalTests.Refit.DotNet9_0.verified.txt
│   │   ├── ApiApprovalTests.cs
│   │   ├── ApiExtensions.cs
│   │   └── _snapshots/
│   │       ├── ApiApprovalTests.Refit.DotNet10_0.verified.txt
│   │       ├── ApiApprovalTests.Refit.DotNet8_0.verified.txt
│   │       └── ApiApprovalTests.Refit.DotNet9_0.verified.txt
│   ├── App.config
│   ├── AuthenticatedClientHandlerTests.cs
│   ├── CachedRequestBuilder.cs
│   ├── CamelCaseUrlParameterKeyFormatter.cs
│   ├── DefaultUrlParameterFormatterTest.cs
│   ├── DeliminatorSeparatedPropertyNamesContractResolver.cs
│   ├── DeserializationExceptionFactoryTests.cs
│   ├── ExceptionFactoryTests.cs
│   ├── ExplicitInterfaceRefitTests.cs
│   ├── FormValueMultimapTests.cs
│   ├── GitHubApi.cs
│   ├── GlobalSuppressions.cs
│   ├── HttpClientFactoryExtensionsTests.cs
│   ├── IDefaultInterfaceMethodTests.cs
│   ├── IFooWithOtherAttribute.cs
│   ├── IInterfaceWithoutRefit.cs
│   ├── IServiceWithoutNamespace.cs
│   ├── InheritedGenericInterfacesApi.cs
│   ├── InheritedInterfacesApi.cs
│   ├── InheritedInterfacesInSeparateFileApi.cs
│   ├── IntegrationTestHelper.cs
│   ├── InterfaceStubGenerator.cs
│   ├── MethodOverloads.cs
│   ├── ModuleInitializer.cs
│   ├── ModuleInitializerAttribute.cs
│   ├── MultipartTests.cs
│   ├── MyQueryParams.cs
│   ├── NamespaceCollisionApi.cs
│   ├── NamespaceOverlapApi.cs
│   ├── NamespaceWithGlobalAliasApi.cs
│   ├── NullableReferenceTypes.cs
│   ├── PartialInterfacesApi.First.cs
│   ├── PartialInterfacesApi.Second.cs
│   ├── ReducedUsingInsideNamespaceApi.cs
│   ├── Refit.Tests.csproj
│   ├── RefitSettings.cs
│   ├── ReflectionTests.cs
│   ├── RequestBuilder.cs
│   ├── ResponseTests.cs
│   ├── RestService.cs
│   ├── RestServiceExceptions.cs
│   ├── SerializedContentTests.cs
│   ├── TypeCollisionApiA.cs
│   ├── TypeCollisionApiB.cs
│   ├── UniqueNameTests.cs
│   ├── UseCultureAttribute.cs
│   ├── Verifiers/
│   │   ├── CSharpIncrementalSourceGeneratorVerifier`1+Test.cs
│   │   ├── CSharpIncrementalSourceGeneratorVerifier`1.cs
│   │   ├── CSharpSourceGeneratorVerifier`1+Test.cs
│   │   ├── CSharpSourceGeneratorVerifier`1.cs
│   │   └── CSharpVerifierHelper.cs
│   ├── XmlContentSerializerTests.cs
│   └── _snapshots/
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#Generated.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApi.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApiDisposable.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#INestedGitHubApi.g.verified.cs
│       ├── InterfaceStubGeneratorTests.FindInterfacesSmokeTest#PreserveAttribute.g.verified.cs
│       ├── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#Generated.g.verified.cs
│       ├── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#IServiceWithoutNamespace.g.verified.cs
│       └── InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#PreserveAttribute.g.verified.cs
├── Refit.Xml/
│   ├── Refit.Xml.csproj
│   └── XmlContentSerializer.cs
├── Refit.sln
├── _config.yml
├── buildtask.snk
├── config/
│   ├── filelist.txt
│   └── signclient.json
├── examples/
│   ├── Meow/
│   │   ├── Meow.csproj
│   │   └── Program.cs
│   ├── Meow.Common/
│   │   ├── Meow.Common.csproj
│   │   ├── Middleware/
│   │   │   └── HttpClientDiagnosticsHandler.cs
│   │   ├── Responses/
│   │   │   └── SearchResponse.cs
│   │   └── Services/
│   │       ├── CatsService.cs
│   │       ├── ITheCatsAPI.cs
│   │       └── Issue2056And2058Demo.cs
│   ├── Meow.sln
│   ├── SampleUsingLocalApi/
│   │   ├── ConsoleApplication/
│   │   │   ├── ConsoleSampleUsingLocalApi.csproj
│   │   │   └── Program.cs
│   │   ├── LibraryWithSDKandRefitService/
│   │   │   ├── IRestService.cs
│   │   │   ├── LibraryWithSDKandRefitService.csproj
│   │   │   └── ModelForTest.cs
│   │   └── RestApiforTest/
│   │       ├── Controllers/
│   │       │   └── ValuesController.cs
│   │       ├── Program.cs
│   │       ├── Properties/
│   │       │   └── launchSettings.json
│   │       ├── RestApiForTest.csproj
│   │       ├── Startup.cs
│   │       ├── appsettings.Development.json
│   │       └── appsettings.json
│   └── SampleUsingLocalApi.sln
├── stylesheets/
│   ├── pygment_trac.css
│   └── styles.css
└── version.json
Download .txt
SYMBOL INDEX (1982 symbols across 184 files)

FILE: InterfaceStubGenerator.Shared/DiagnosticDescriptors.cs
  class DiagnosticDescriptors (line 5) | internal static class DiagnosticDescriptors

FILE: InterfaceStubGenerator.Shared/Emitter.cs
  method EmitSharedCode (line 11) | public static void EmitSharedCode(
  method EmitInterface (line 72) | public static SourceText EmitInterface(InterfaceModel model)
  method WriteRefitMethod (line 172) | private static void WriteRefitMethod(
  method WriteNonRefitMethod (line 243) | private static void WriteNonRefitMethod(SourceWriter source, MethodModel...
  method WriteDisposableMethod (line 255) | private static void WriteDisposableMethod(SourceWriter source)
  method GenerateTypeParameterExpression (line 269) | private static string GenerateTypeParameterExpression(

FILE: InterfaceStubGenerator.Shared/ITypeSymbolExtensions.cs
  class ITypeSymbolExtensions (line 9) | static class ITypeSymbolExtensions
    method GetBaseTypesAndThis (line 11) | public static IEnumerable<ITypeSymbol> GetBaseTypesAndThis(this ITypeS...
    method InheritsFromOrEquals (line 23) | public static bool InheritsFromOrEquals(
    method InheritsFromOrEquals (line 41) | public static bool InheritsFromOrEquals(this ITypeSymbol type, ITypeSy...

FILE: InterfaceStubGenerator.Shared/ImmutableEquatableArray.cs
  class ImmutableEquatableArray (line 5) | internal static class ImmutableEquatableArray
    method Empty (line 7) | public static ImmutableEquatableArray<T> Empty<T>()
    method ToImmutableEquatableArray (line 10) | public static ImmutableEquatableArray<T> ToImmutableEquatableArray<T>(
    method ImmutableEquatableArray (line 30) | public ImmutableEquatableArray(T[] values) => _values = values;
    method ImmutableEquatableArray (line 32) | public ImmutableEquatableArray(IEnumerable<T> values) => _values = val...
    method AsArray (line 34) | public T[] AsArray() => _values;
    method Equals (line 36) | public bool Equals(ImmutableEquatableArray<T>? other) =>
    method Equals (line 39) | public override bool Equals(object? obj) =>
    method GetHashCode (line 42) | public override int GetHashCode()
    method GetEnumerator (line 61) | public Enumerator GetEnumerator() => new(_values);
    method GetEnumerator (line 63) | IEnumerator<T> IEnumerable<T>.GetEnumerator() => ((IEnumerable<T>)_val...
    method GetEnumerator (line 65) | IEnumerator IEnumerable.GetEnumerator() => _values.GetEnumerator();
    type Enumerator (line 67) | public record struct Enumerator
  class ImmutableEquatableArray (line 19) | internal sealed class ImmutableEquatableArray<T>
    method Empty (line 7) | public static ImmutableEquatableArray<T> Empty<T>()
    method ToImmutableEquatableArray (line 10) | public static ImmutableEquatableArray<T> ToImmutableEquatableArray<T>(
    method ImmutableEquatableArray (line 30) | public ImmutableEquatableArray(T[] values) => _values = values;
    method ImmutableEquatableArray (line 32) | public ImmutableEquatableArray(IEnumerable<T> values) => _values = val...
    method AsArray (line 34) | public T[] AsArray() => _values;
    method Equals (line 36) | public bool Equals(ImmutableEquatableArray<T>? other) =>
    method Equals (line 39) | public override bool Equals(object? obj) =>
    method GetHashCode (line 42) | public override int GetHashCode()
    method GetEnumerator (line 61) | public Enumerator GetEnumerator() => new(_values);
    method GetEnumerator (line 63) | IEnumerator<T> IEnumerable<T>.GetEnumerator() => ((IEnumerable<T>)_val...
    method GetEnumerator (line 65) | IEnumerator IEnumerable.GetEnumerator() => _values.GetEnumerator();
    type Enumerator (line 67) | public record struct Enumerator

FILE: InterfaceStubGenerator.Shared/IncrementalValuesProviderExtensions.cs
  class IncrementalValuesProviderExtensions (line 8) | internal static class IncrementalValuesProviderExtensions
    method ReportDiagnostics (line 15) | public static void ReportDiagnostics(
    method ReportDiagnostics (line 31) | public static void ReportDiagnostics(
    method EmitSource (line 53) | public static void EmitSource(

FILE: InterfaceStubGenerator.Shared/InterfaceStubGenerator.cs
  class InterfaceStubGenerator (line 20) | public class InterfaceStubGenerator : ISourceGenerator
    method Execute (line 30) | public void Execute(GeneratorExecutionContext context)
    method Initialize (line 71) | public void Initialize(IncrementalGeneratorInitializationContext context)
    method Initialize (line 156) | public void Initialize(GeneratorInitializationContext context)
    class SyntaxReceiver (line 161) | class SyntaxReceiver : ISyntaxReceiver
      method OnVisitSyntaxNode (line 167) | public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
  class RefitGeneratorStepName (line 187) | internal static class RefitGeneratorStepName

FILE: InterfaceStubGenerator.Shared/IsExternalInit.cs
  class IsExternalInit (line 16) | [EditorBrowsable(EditorBrowsableState.Never)]

FILE: InterfaceStubGenerator.Shared/Models/ContextGenerationModel.cs
  type ContextGenerationModel (line 3) | internal sealed record ContextGenerationModel(

FILE: InterfaceStubGenerator.Shared/Models/InterfaceModel.cs
  type InterfaceModel (line 3) | internal sealed record InterfaceModel(
  type Nullability (line 20) | internal enum Nullability : byte

FILE: InterfaceStubGenerator.Shared/Models/MethodModel.cs
  type MethodModel (line 5) | internal sealed record MethodModel(
  type ReturnTypeInfo (line 16) | internal enum ReturnTypeInfo : byte

FILE: InterfaceStubGenerator.Shared/Models/ParameterModel.cs
  type ParameterModel (line 3) | internal sealed record ParameterModel(

FILE: InterfaceStubGenerator.Shared/Models/TypeConstraint.cs
  type TypeConstraint (line 3) | internal readonly record struct TypeConstraint(
  type KnownTypeConstraint (line 10) | [Flags]

FILE: InterfaceStubGenerator.Shared/Models/WellKnownTypes.cs
  class WellKnownTypes (line 8) | public class WellKnownTypes(Compilation compilation)
    method Get (line 17) | public INamedTypeSymbol Get<T>() => Get(typeof(T));
    method Get (line 25) | public INamedTypeSymbol Get(Type type)
    method TryGet (line 40) | public INamedTypeSymbol? TryGet(string typeFullName)
    method Get (line 53) | INamedTypeSymbol Get(string typeFullName) =>

FILE: InterfaceStubGenerator.Shared/Parser.cs
  class Parser (line 10) | internal static class Parser
    method GenerateInterfaceStubs (line 21) | public static (
    method ProcessInterface (line 241) | static InterfaceModel ProcessInterface(
    method ParseNonRefitMethod (line 413) | private static MethodModel ParseNonRefitMethod(
    method IsRefitMethod (line 485) | private static bool IsRefitMethod(
    method GenerateConstraints (line 496) | private static ImmutableEquatableArray<TypeConstraint> GenerateConstra...
    method ParseConstraintsForTypeParameter (line 513) | private static TypeConstraint ParseConstraintsForTypeParameter(
    method ParseParameter (line 561) | private static ParameterModel ParseParameter(IParameterSymbol param)
    method ContainsTypeParameter (line 572) | private static bool ContainsTypeParameter(ITypeSymbol symbol)
    method ParseMethod (line 589) | private static MethodModel ParseMethod(IMethodSymbol methodSymbol, boo...

FILE: InterfaceStubGenerator.Shared/Polyfills/IndexRange.cs
  type Index (line 14) | public readonly record struct Index
  type Range (line 71) | public readonly record struct Range

FILE: InterfaceStubGenerator.Shared/SourceWriter.cs
  class SourceWriter (line 8) | internal sealed class SourceWriter
    method Append (line 31) | public void Append(string text) => sb.Append(text);
    method WriteLine (line 33) | public void WriteLine(char value)
    method WriteLine (line 40) | public void WriteLine(string text)
    method WriteLine (line 64) | public void WriteLine() => sb.AppendLine();
    method ToSourceText (line 66) | public SourceText ToSourceText()
    method Reset (line 72) | public void Reset()
    method AddIndentation (line 78) | private void AddIndentation() =>
    method GetNextLine (line 81) | private static ReadOnlySpan<char> GetNextLine(
    method AppendSpan (line 118) | private static unsafe void AppendSpan(StringBuilder builder, ReadOnlyS...

FILE: InterfaceStubGenerator.Shared/UniqueNameBuilder.cs
  class UniqueNameBuilder (line 6) | public class UniqueNameBuilder()
    method UniqueNameBuilder (line 11) | private UniqueNameBuilder(UniqueNameBuilder parentScope)
    method Reserve (line 21) | public void Reserve(string name) => _usedNames.Add(name);
    method NewScope (line 27) | public UniqueNameBuilder NewScope() => new(this);
    method New (line 34) | public string New(string name)
    method Reserve (line 53) | public void Reserve(IEnumerable<string> names)
    method Contains (line 66) | private bool Contains(string name)

FILE: Refit.Benchmarks/EndToEndBenchmark.cs
  class EndToEndBenchmark (line 7) | [MemoryDiagnoser]
    type SerializationStrategy (line 45) | public enum SerializationStrategy
    type HttpVerb (line 51) | public enum HttpVerb
    method SetupAsync (line 57) | [GlobalSetup]
    method Task_Async (line 133) | [Benchmark]
    method TaskString_Async (line 158) | [Benchmark]
    method TaskStream_Async (line 185) | [Benchmark]
    method TaskHttpContent_Async (line 212) | [Benchmark]
    method TaskHttpResponseMessage_Async (line 239) | [Benchmark]
    method ObservableHttpResponseMessage (line 257) | [Benchmark]
    method TaskT_Async (line 275) | [Benchmark]
    method TaskApiResponseT_Async (line 300) | [Benchmark]

FILE: Refit.Benchmarks/IGitHubService.cs
  type IGitHubService (line 3) | public interface IGitHubService
    method GetUsersTaskAsync (line 6) | [Get("/users")]
    method PostUsersTaskAsync (line 9) | [Post("/users")]
    method GetUsersTaskStringAsync (line 13) | [Get("/users")]
    method PostUsersTaskStringAsync (line 16) | [Post("/users")]
    method GetUsersTaskStreamAsync (line 20) | [Get("/users")]
    method PostUsersTaskStreamAsync (line 23) | [Post("/users")]
    method GetUsersTaskHttpContentAsync (line 27) | [Get("/users")]
    method PostUsersTaskHttpContentAsync (line 30) | [Post("/users")]
    method GetUsersTaskHttpResponseMessageAsync (line 34) | [Get("/users")]
    method PostUsersTaskHttpResponseMessageAsync (line 37) | [Post("/users")]
    method GetUsersObservableHttpResponseMessage (line 43) | [Get("/users")]
    method PostUsersObservableHttpResponseMessage (line 46) | [Post("/users")]
    method GetUsersTaskTAsync (line 52) | [Get("/users")]
    method PostUsersTaskTAsync (line 55) | [Post("/users")]
    method GetUsersTaskApiResponseTAsync (line 59) | [Get("/users")]
    method PostUsersTaskApiResponseTAsync (line 62) | [Post("/users")]
  class User (line 68) | public class User

FILE: Refit.Benchmarks/IPerformanceService.cs
  type IPerformanceService (line 3) | public interface IPerformanceService
    method ConstantRoute (line 5) | [Get("/users")]
    method DynamicRoute (line 8) | [Get("/users/{id}")]
    method ComplexDynamicRoute (line 11) | [Get("/users/{id}/{user}/{status}")]
    method ObjectRequest (line 14) | [Get("/users/{request.someProperty}")]
    method ComplexRequest (line 17) | [Post("/users/{id}/{request.someProperty}")]
  class PathBoundObject (line 22) | public class PathBoundObject

FILE: Refit.Benchmarks/PerformanceBenchmark.cs
  class PerformanceBenchmark (line 6) | [MemoryDiagnoser]
    method SetupAsync (line 14) | [GlobalSetup]
    method ConstantRouteAsync (line 34) | [Benchmark]
    method DynamicRouteAsync (line 37) | [Benchmark]
    method ComplexDynamicRouteAsync (line 40) | [Benchmark]
    method ObjectRequestAsync (line 43) | [Benchmark]
    method ComplexRequestAsync (line 46) | [Benchmark]

FILE: Refit.Benchmarks/SourceGeneratorBenchmark.cs
  class SourceGeneratorBenchmark (line 12) | [MemoryDiagnoser]
    method Setup (line 41) | private void Setup(string sourceText)
    method SetupSmall (line 65) | [GlobalSetup(Target = nameof(Compile))]
    method Compile (line 68) | [Benchmark]
    method SetupCached (line 74) | [GlobalSetup(Target = nameof(Cached))]
    method Cached (line 82) | [Benchmark]
    method SetupMany (line 88) | [GlobalSetup(Target = nameof(CompileMany))]
    method CompileMany (line 91) | [Benchmark]
    method SetupCachedMany (line 97) | [GlobalSetup(Target = nameof(CachedMany))]
    method CachedMany (line 105) | [Benchmark]

FILE: Refit.Benchmarks/SourceGeneratorBenchmarksProjects.cs
  class SourceGeneratorBenchmarksProjects (line 3) | public static class SourceGeneratorBenchmarksProjects

FILE: Refit.Benchmarks/StartupBenchmark.cs
  class StartupBenchmark (line 6) | [MemoryDiagnoser]
    method Setup (line 21) | [IterationSetup(Targets = [nameof(FirstCallConstantRouteAsync), nameof...
    method CreateService (line 27) | [Benchmark]
    method FirstCallConstantRouteAsync (line 30) | [Benchmark]
    method ConstantRouteAsync (line 33) | [Benchmark]
    method FirstCallComplexRequestAsync (line 40) | [Benchmark]
    method ComplexRequestAsync (line 43) | [Benchmark]

FILE: Refit.Benchmarks/StaticFileHttpResponseHandler.cs
  class StaticFileHttpResponseHandler (line 5) | public class StaticFileHttpResponseHandler : HttpMessageHandler
    method StaticFileHttpResponseHandler (line 10) | public StaticFileHttpResponseHandler(string fileName, HttpStatusCode r...
    method SendAsync (line 20) | protected override Task<HttpResponseMessage> SendAsync(

FILE: Refit.Benchmarks/StaticValueHttpResponseHandler.cs
  class StaticValueHttpResponseHandler (line 5) | public class StaticValueHttpResponseHandler (string response, HttpStatus...
    method SendAsync (line 7) | protected override Task<HttpResponseMessage> SendAsync(

FILE: Refit.GeneratorTests/Fixture.cs
  class Fixture (line 8) | public static class Fixture
    method VerifyForBody (line 36) | public static Task VerifyForBody(string body, bool ignoreNonInterfaces...
    method VerifyForType (line 60) | public static Task VerifyForType(string declarations)
    method VerifyForDeclaration (line 81) | public static Task VerifyForDeclaration(string declarations)
    method CreateLibrary (line 100) | public static CSharpCompilation CreateLibrary(params SyntaxTree[] source)
    method CreateLibrary (line 123) | private static CSharpCompilation CreateLibrary(params string[] source)
    method VerifyGenerator (line 128) | private static Task<VerifyResult> VerifyGenerator(string source, bool ...

FILE: Refit.GeneratorTests/GeneratedTest.cs
  class GeneratedTest (line 3) | public class GeneratedTest
    method ShouldEmitAllFiles (line 5) | [Fact]
    method ShouldNotEmitFilesWhenNoRefitInterfaces (line 15) | [Fact]

FILE: Refit.GeneratorTests/Incremental/FunctionTest.cs
  class FunctionTest (line 5) | public class FunctionTest
    method ModifyParameterNameDoesRegenerate (line 49) | [Fact]
    method ModifyParameterTypeDoesRegenerate (line 73) | [Fact]
    method ModifyParameterNullabilityDoesRegenerate (line 97) | [Fact]
    method AddParameterDoesRegenerate (line 121) | [Fact]
    method ModifyReturnTypeDoesRegenerate (line 145) | [Fact]
    method ModifyReturnObjectNullabilityDoesNotRegenerate (line 169) | [Fact]
    method ModifyReturnValueNullabilityDoesRegenerate (line 193) | [Fact]
    method AddNonRefitMethodDoesRegenerate (line 217) | [Fact]

FILE: Refit.GeneratorTests/Incremental/GenericTest.cs
  class GenericTest (line 5) | public class GenericTest
    method RenameGenericTypeDoesRegenerate (line 27) | [Fact]
    method AddGenericConstraintDoesRegenerate (line 52) | [Fact]
    method AddObjectGenericConstraintDoesRegenerate (line 94) | [Fact]
    method AddGenericTypeDoesRegenerate (line 120) | [Fact]

FILE: Refit.GeneratorTests/Incremental/IncrementalGeneratorRunReasons.cs
  type IncrementalGeneratorRunReasons (line 5) | internal record IncrementalGeneratorRunReasons(

FILE: Refit.GeneratorTests/Incremental/IncrementalTest.cs
  class IncrementalTest (line 5) | public class IncrementalTest
    method AddUnrelatedTypeDoesntRegenerate (line 28) | [Fact]
    method SmallChangeDoesntRegenerate (line 42) | [Fact]
    method AddNewMemberDoesRegenerate (line 67) | [Fact]

FILE: Refit.GeneratorTests/Incremental/InheritanceTest.cs
  class InheritanceTest (line 5) | public class InheritanceTest
    method InheritFromIDisposableDoesRegenerate (line 49) | [Fact]
    method InheritFromInterfaceDoesRegenerate (line 74) | [Fact]

FILE: Refit.GeneratorTests/Incremental/TestHelper.cs
  class TestHelper (line 9) | internal static class TestHelper
    method GenerateTracked (line 14) | internal static GeneratorDriver GenerateTracked(Compilation compilation)
    method ReplaceMemberDeclaration (line 25) | internal static CSharpCompilation ReplaceMemberDeclaration(
    method ReplaceLocalDeclaration (line 45) | internal static CSharpCompilation ReplaceLocalDeclaration(
    method AssertRunReasons (line 66) | internal static void AssertRunReasons(
    method AssertRunReason (line 83) | private static void AssertRunReason(
  class RefitGeneratorStepName (line 99) | internal static class RefitGeneratorStepName

FILE: Refit.GeneratorTests/InterfaceTests.cs
  class InterfaceTests (line 3) | public class InterfaceTests
    method ContainedInterfaceTest (line 5) | [Fact]
    method RefitInterfaceDerivedFromRefitBaseTest (line 21) | [Fact]
    method RefitInterfaceDerivedFromBaseTest (line 40) | [Fact]
    method InterfaceDerivedFromRefitBaseTest (line 58) | [Fact]
    method DefaultInterfaceMethod (line 73) | [Fact]
    method DerivedDefaultInterfaceMethod (line 88) | [Fact]
    method InterfacesWithDifferentCasing (line 109) | [Fact]
    method InterfacesWithDifferentSignature (line 128) | [Fact]
    method NestedNamespaceTest (line 147) | [Fact]
    method GlobalNamespaceTest (line 162) | [Fact]
    method DisposableTest (line 175) | [Fact]
    method NonRefitMethodShouldRaiseDiagnostic (line 188) | [Fact]
    method InterfaceWithGenericConstraint (line 200) | [Fact]

FILE: Refit.GeneratorTests/MethodTests.cs
  class MethodTests (line 3) | public class MethodTests
    method MethodsWithGenericConstraints (line 5) | [Fact]

FILE: Refit.GeneratorTests/ModuleInitializer.cs
  class ModuleInitializer (line 6) | public static class ModuleInitializer
    method Init (line 10) | [ModuleInitializer]

FILE: Refit.GeneratorTests/ParameterTests.cs
  class ParameterTests (line 3) | public class ParameterTests
    method RouteParameter (line 5) | [Fact]
    method NullableRouteParameter (line 15) | [Fact]
    method ValueTypeRouteParameter (line 25) | [Fact]
    method NullableValueTypeRouteParameter (line 35) | [Fact]

FILE: Refit.GeneratorTests/ReturnTypeTests.cs
  class ReturnTypeTests (line 3) | public class ReturnTypeTests
    method GenericTaskShouldWork (line 5) | [Fact]
    method ReturnNullableObject (line 15) | [Fact]
    method ReturnNullableValueType (line 25) | [Fact]
    method VoidTaskShouldWork (line 35) | [Fact]
    method GenericConstraintReturnTask (line 45) | [Fact]
    method GenericUnmanagedConstraintReturnTask (line 55) | [Fact]
    method GenericStructConstraintReturnTask (line 65) | [Fact]
    method ReturnIObservable (line 75) | [Fact]
    method ReturnUnsupportedType (line 85) | [Fact]

FILE: Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#Generated.g.verified.cs
  class Generated (line 8) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
    method Initialize (line 16) | [System.Runtime.CompilerServices.ModuleInitializer]

FILE: Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#PreserveAttribute.g.verified.cs
  class PreserveAttribute (line 6) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.ContainedInterfaceTest#IContainedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestContainerTypeIContainedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestContainerTypeIContainedInterface (line 24) | public RefitGeneratorTestContainerTypeIContainedInterface(global::Sy...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.DefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedInterface (line 24) | public RefitGeneratorTestIGeneratedInterface(global::System.Net.Http...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.DerivedDefaultInterfaceMethod#IBaseInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIBaseInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIBaseInterface (line 24) | public RefitGeneratorTestIBaseInterface(global::System.Net.Http.Http...
      method GetPosts (line 32) | public async global::System.Threading.Tasks.Task<string> GetPosts()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.DerivedDefaultInterfaceMethod#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedInterface (line 24) | public RefitGeneratorTestIGeneratedInterface(global::System.Net.Http...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()
      method GetPosts (line 41) | async global::System.Threading.Tasks.Task<string> global::RefitGener...

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.DisposableTest#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class IGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method IGeneratedInterface (line 24) | public IGeneratedInterface(global::System.Net.Http.HttpClient client...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()
      method Dispose (line 41) | void global::System.IDisposable.Dispose()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.GlobalNamespaceTest#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class IGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method IGeneratedInterface (line 24) | public IGeneratedInterface(global::System.Net.Http.HttpClient client...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIBaseInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIBaseInterface (line 24) | public RefitGeneratorTestIBaseInterface(global::System.Net.Http.Http...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceDerivedFromRefitBaseTest#IDerivedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIDerivedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIDerivedInterface (line 24) | public RefitGeneratorTestIDerivedInterface(global::System.Net.Http.H...
      method Get (line 32) | async global::System.Threading.Tasks.Task<string> global::RefitGener...

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceWithGenericConstraint#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class IGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method IGeneratedInterface (line 29) | public IGeneratedInterface(global::System.Net.Http.HttpClient client...
      method Get (line 37) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentCasing#IApi.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIApi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIApi (line 24) | public RefitGeneratorTestIApi(global::System.Net.Http.HttpClient cli...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentCasing#Iapi1.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIapi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIapi (line 24) | public RefitGeneratorTestIapi(global::System.Net.Http.HttpClient cli...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentSignature#IApi.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIApi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIApi (line 24) | public RefitGeneratorTestIApi(global::System.Net.Http.HttpClient cli...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentSignature#IApi1.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIApi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIApi (line 24) | public RefitGeneratorTestIApi(global::System.Net.Http.HttpClient cli...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.NestedNamespaceTest#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class NestedRefitGeneratorTestIGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method NestedRefitGeneratorTestIGeneratedInterface (line 24) | public NestedRefitGeneratorTestIGeneratedInterface(global::System.Ne...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.NonRefitMethodShouldRaiseDiagnostic#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()
      method NonRefitMethod (line 41) | public void NonRefitMethod()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromBaseTest#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedInterface (line 24) | public RefitGeneratorTestIGeneratedInterface(global::System.Net.Http...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()
      method NonRefitMethod (line 41) | void global::RefitGeneratorTest.IBaseInterface.NonRefitMethod()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIBaseInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIBaseInterface (line 24) | public RefitGeneratorTestIBaseInterface(global::System.Net.Http.Http...
      method GetPosts (line 32) | public async global::System.Threading.Tasks.Task<string> GetPosts()

FILE: Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IGeneratedInterface.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedInterface (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedInterface (line 24) | public RefitGeneratorTestIGeneratedInterface(global::System.Net.Http...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()
      method GetPosts (line 41) | async global::System.Threading.Tasks.Task<string> global::RefitGener...

FILE: Refit.GeneratorTests/_snapshots/MethodTests.MethodsWithGenericConstraints#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get<T1, T2,...
      method NonRefitMethod (line 46) | public void NonRefitMethod<T1, T2, T3, T4, T5>()

FILE: Refit.GeneratorTests/_snapshots/ParameterTests.NullableRouteParameter#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 34) | public async global::System.Threading.Tasks.Task<string> Get(string?...

FILE: Refit.GeneratorTests/_snapshots/ParameterTests.NullableValueTypeRouteParameter#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 34) | public async global::System.Threading.Tasks.Task<string> Get(int? @u...

FILE: Refit.GeneratorTests/_snapshots/ParameterTests.RouteParameter#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 34) | public async global::System.Threading.Tasks.Task<string> Get(string ...

FILE: Refit.GeneratorTests/_snapshots/ParameterTests.ValueTypeRouteParameter#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 34) | public async global::System.Threading.Tasks.Task<string> Get(int @user)

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericConstraintReturnTask#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get<T>()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericStructConstraintReturnTask#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get<T>()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericTaskShouldWork#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericUnmanagedConstraintReturnTask#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get<T>()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnIObservable#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method GetUser (line 34) | public global::System.IObservable<global::System.Net.Http.HttpRespon...

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnNullableObject#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<string> Get()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnNullableValueType#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Get (line 32) | public async global::System.Threading.Tasks.Task<int?> Get()

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnUnsupportedType#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method GetUser (line 34) | public string GetUser(string @user)

FILE: Refit.GeneratorTests/_snapshots/ReturnTypeTests.VoidTaskShouldWork#IGeneratedClient.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitGeneratorTestIGeneratedClient (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitGeneratorTestIGeneratedClient (line 24) | public RefitGeneratorTestIGeneratedClient(global::System.Net.Http.Ht...
      method Post (line 32) | public async global::System.Threading.Tasks.Task Post()

FILE: Refit.HttpClientFactory/HttpClientFactoryCore.cs
  class HttpClientFactoryCore (line 16) | internal static class HttpClientFactoryCore
    method AddRefitClientCore (line 19) | internal static IHttpClientBuilder AddRefitClientCore(
    method AddKeyedRefitClientCore (line 84) | internal static IHttpClientBuilder AddKeyedRefitClientCore(
    method AddRefitClientCore (line 159) | internal static IHttpClientBuilder AddRefitClientCore<T>(
    method AddKeyedRefitClientCore (line 200) | internal static IHttpClientBuilder AddKeyedRefitClientCore<T>(
    method CreateInnerHandlerIfProvided (line 264) | private static HttpMessageHandler? CreateInnerHandlerIfProvided(RefitS...

FILE: Refit.HttpClientFactory/HttpClientFactoryExtensions.cs
  method AddRefitClient (line 23) | public static IHttpClientBuilder AddRefitClient(
  method AddKeyedRefitClient (line 45) | public static IHttpClientBuilder AddKeyedRefitClient(
  method AddRefitClient (line 68) | public static IHttpClientBuilder AddRefitClient<T>(
  method AddKeyedRefitClient (line 89) | public static IHttpClientBuilder AddKeyedRefitClient<T>(
  method AddRefitClient (line 110) | public static IHttpClientBuilder AddRefitClient(
  method AddKeyedRefitClient (line 130) | public static IHttpClientBuilder AddKeyedRefitClient(
  method AddRefitClient (line 151) | public static IHttpClientBuilder AddRefitClient<T>(
  method AddKeyedRefitClient (line 170) | public static IHttpClientBuilder AddKeyedRefitClient<T>(
  method AddRefitClient (line 192) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddKeyedRefitClient (line 217) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddRefitClient (line 243) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddKeyedRefitClient (line 267) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddRefitClient (line 291) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddKeyedRefitClient (line 314) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddRefitClient (line 338) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]
  method AddKeyedRefitClient (line 360) | [System.Runtime.CompilerServices.OverloadResolutionPriority(1)]

FILE: Refit.HttpClientFactory/SettingsFor.cs
  type ISettingsFor (line 6) | public interface ISettingsFor
  class SettingsFor (line 26) | public class SettingsFor<T>(RefitSettings? settings) : ISettingsFor

FILE: Refit.Newtonsoft.Json/NewtonsoftJsonContentSerializer.cs
  class NewtonsoftJsonContentSerializer (line 15) | public sealed class NewtonsoftJsonContentSerializer(
    method NewtonsoftJsonContentSerializer (line 33) | public NewtonsoftJsonContentSerializer()
    method ToHttpContent (line 37) | public HttpContent ToHttpContent<T>(T item)
    method FromHttpContentAsync (line 49) | public async Task<T?> FromHttpContentAsync<T>(
    method GetFieldNameForProperty (line 76) | public string? GetFieldNameForProperty(PropertyInfo propertyInfo)

FILE: Refit.Tests/API/ApiApprovalTests.cs
  class ApiApprovalTests (line 14) | [ExcludeFromCodeCoverage]
    method Refit (line 21) | [Fact]

FILE: Refit.Tests/API/ApiExtensions.cs
  class ApiExtensions (line 20) | [ExcludeFromCodeCoverage]
    method CheckApproval (line 32) | public static async Task CheckApproval(this Assembly assembly, string[...

FILE: Refit.Tests/AuthenticatedClientHandlerTests.cs
  class AuthenticatedClientHandlerTests (line 16) | public class AuthenticatedClientHandlerTests
    type IMyAuthenticatedService (line 18) | public interface IMyAuthenticatedService
      method GetUnauthenticated (line 20) | [Get("/unauth")]
      method GetAuthenticated (line 23) | [Get("/auth")]
      method GetAuthenticatedWithTokenInMethod (line 27) | [Get("/auth")]
      method GetAuthenticatedWithAuthorizeAttributeAndHeaderCollection (line 30) | [Get("/auth")]
      method GetAuthenticatedWithTokenInHeaderCollection (line 36) | [Get("/auth")]
      method PostAuthenticatedWithTokenInHeaderCollection (line 41) | [Post("/auth/{id}")]
    type IInheritedAuthenticatedServiceWithHeaders (line 49) | public interface IInheritedAuthenticatedServiceWithHeaders : IAuthenti...
      method GetInheritedThing (line 51) | [Get("/get-inherited-thing")]
    type IInheritedAuthenticatedServiceWithHeadersCRLF (line 55) | public interface IInheritedAuthenticatedServiceWithHeadersCRLF : IAuth...
      method GetInheritedThing (line 57) | [Get("/get-inherited-thing\r\n\r\nGET /smuggled")]
    type IAuthenticatedServiceWithHeaders (line 61) | [Headers("Authorization: Bearer")]
      method GetThingFromBase (line 64) | [Get("/get-base-thing")]
    method DefaultHandlerIsHttpClientHandler (line 68) | [Fact]
    method DefaultHandlerIsNull (line 76) | [Fact]
    method NullTokenGetterThrows (line 84) | [Fact]
    method AuthenticatedHandlerIgnoresUnAuth (line 90) | [Fact]
    method AuthenticatedHandlerUsesAuth (line 114) | [Fact]
    method AuthenticatedHandlerWithParamUsesAuth (line 138) | [Fact]
    method AuthenticatedHandlerWithTokenInParameterUsesAuth (line 162) | [Fact]
    method AuthenticatedHandlerWithTokenInHeaderCollectionUsesAuth (line 182) | [Fact]
    method AuthenticatedHandlerWithAuthorizeAttributeAndHeaderCollectionUsesAuth (line 208) | [Fact]
    method AuthenticatedHandlerWithDuplicatedAuthorizationHeaderUsesAuth (line 244) | [Fact]
    method AuthenticatedHandlerPostTokenInHeaderCollectionUsesAuth (line 281) | [Fact]
    method AuthentictedMethodFromBaseClassWithHeadersAttributeUsesAuth (line 314) | [Fact]
    method AuthentictedMethodFromInheritedClassWithHeadersAttributeUsesAuth (line 341) | [Fact]
    method AuthentictedMethodFromInheritedClassWithHeadersAttributeUsesAuth_WithCRLFCheck (line 368) | [Fact]
    method AuthorizationHeaderValueGetterIsUsedWhenSupplyingHttpClient (line 394) | [Fact]
    method AuthorizationHeaderValueGetterDoesNotOverrideExplicitTokenWhenSupplyingHttpClient (line 418) | [Fact]

FILE: Refit.Tests/CachedRequestBuilder.cs
  type IGeneralRequests (line 11) | public interface IGeneralRequests
    method Empty (line 13) | [Post("/foo")]
    method SingleParameter (line 16) | [Post("/foo")]
    method MultiParameter (line 19) | [Post("/foo")]
    method SingleGenericMultiParameter (line 22) | [Post("/foo")]
  type IDuplicateNames (line 26) | public interface IDuplicateNames
    method SingleParameter (line 28) | [Post("/foo")]
    method SingleParameter (line 31) | [Post("/foo")]
  class CachedRequestBuilderTests (line 35) | public class CachedRequestBuilderTests
    method CacheHasCorrectNumberOfElementsTest (line 37) | [Fact]
    method NoDuplicateEntriesTest (line 82) | [Fact]
    method SameNameDuplicateEntriesTest (line 119) | [Fact]

FILE: Refit.Tests/CamelCaseUrlParameterKeyFormatter.cs
  class CamelCaselTestsRequest (line 5) | public class CamelCaselTestsRequest
  class CamelCaseUrlParameterKeyFormatterTests (line 11) | public class CamelCaseUrlParameterKeyFormatterTests
    method Format_EmptyKey_ReturnsEmptyKey (line 13) | [Fact]
    method FormatKey_Returns_ExpectedValue (line 22) | [Fact]

FILE: Refit.Tests/DefaultUrlParameterFormatterTest.cs
  class DefaultUrlParameterFormatterTests (line 7) | public class DefaultUrlParameterFormatterTests
    class DefaultUrlParameterFormatterTestRequest (line 9) | class DefaultUrlParameterFormatterTestRequest
    method NullParameterValue_ReturnsNull (line 22) | [Fact]
    method NoFormatters_UseDefaultFormat (line 40) | [Fact]
    method QueryAttributeFormatOnly_UseQueryAttributeFormat (line 58) | [Fact]
    method QueryAttributeAndGeneralFormat_UseQueryAttributeFormat (line 76) | [Fact]
    method QueryAttributeAndSpecificFormat_UseQueryAttributeFormat (line 95) | [Fact]
    method AllFormats_UseQueryAttributeFormat (line 114) | [Fact]
    method GeneralFormatOnly_UseGeneralFormat (line 134) | [Fact]
    method SpecificFormatOnly_UseSpecificFormat (line 153) | [Fact]
    method GeneralAndSpecificFormats_UseSpecificFormat (line 172) | [Fact]
    method RequestWithPlainDateTimeQueryParameter_ProducesCorrectQueryString (line 192) | [Fact]
    method RequestWithDateTimeCollectionQueryParameter_ProducesCorrectQueryString (line 218) | [Fact]
    method RequestWithDateTimeDictionaryQueryParameter_ProducesCorrectQueryString (line 244) | [Fact]
    method RequestWithDateTimeKeyedDictionaryQueryParameter_ProducesCorrectQueryString (line 274) | [Fact]

FILE: Refit.Tests/DeliminatorSeparatedPropertyNamesContractResolver.cs
  class DeliminatorSeparatedPropertyNamesContractResolver (line 9) | public class DeliminatorSeparatedPropertyNamesContractResolver : Default...
    method DeliminatorSeparatedPropertyNamesContractResolver (line 13) | protected DeliminatorSeparatedPropertyNamesContractResolver(char separ...
    method ResolvePropertyName (line 18) | protected override string ResolvePropertyName(string propertyName)
  class SnakeCasePropertyNamesContractResolver (line 43) | public class SnakeCasePropertyNamesContractResolver
    method SnakeCasePropertyNamesContractResolver (line 46) | public SnakeCasePropertyNamesContractResolver()

FILE: Refit.Tests/DeserializationExceptionFactoryTests.cs
  class DeserializationExceptionFactoryTests (line 8) | public class DeserializationExceptionFactoryTests
    type IMyService (line 10) | public interface IMyService
      method GetWithResult (line 12) | [Get("/get-with-result")]
    method NoDeserializationExceptionFactory_WithSuccessfulDeserialization (line 16) | [Fact]
    method NoDeserializationExceptionFactory_WithUnsuccessfulDeserialization (line 39) | [Fact]
    method ProvideFactoryWhichReturnsNull_WithSuccessfulDeserialization (line 60) | [Fact]
    method ProvideFactoryWhichReturnsNull_WithUnsuccessfulDeserialization (line 84) | [Fact]
    method ProvideFactoryWhichReturnsException_WithUnsuccessfulDeserialization (line 107) | [Fact]
    method ProvideFactoryWhichReturnsException_WithSuccessfulDeserialization (line 130) | [Fact]

FILE: Refit.Tests/ExceptionFactoryTests.cs
  class ExceptionFactoryTests (line 11) | public class ExceptionFactoryTests
    type IMyService (line 13) | public interface IMyService
      method GetWithResult (line 15) | [Get("/get-with-result")]
      method PutWithoutResult (line 18) | [Put("/put-without-result")]
    method ProvideFactoryWhichAlwaysReturnsNull_WithResult (line 22) | [Fact]
    method ProvideFactoryWhichAlwaysReturnsNull_WithoutResult (line 45) | [Fact]
    method ProvideFactoryWhichAlwaysReturnsException_WithResult (line 66) | [Fact]
    method ProvideFactoryWhichAlwaysReturnsException_WithoutResult (line 89) | [Fact]

FILE: Refit.Tests/ExplicitInterfaceRefitTests.cs
  class ExplicitInterfaceRefitTests (line 9) | public class ExplicitInterfaceRefitTests
    type IFoo (line 11) | public interface IFoo
      method Bar (line 13) | int Bar();
    type IInternalFoo (line 17) | internal interface IInternalFoo : IFoo
      method Bar (line 19) | int IFoo.Bar() => InternalBar() + 1;
      method InternalBar (line 21) | [Get("/bar")]
    type IRemoteFoo2 (line 26) | public interface IRemoteFoo2 : IFoo
      method Bar (line 28) | [Get("/bar")]
    method DefaultInterfaceImplementation_calls_internal_refit_method (line 32) | [Fact]
    method Explicit_interface_member_with_refit_attribute_is_invoked (line 50) | [Fact]

FILE: Refit.Tests/FormValueMultimapTests.cs
  class FormValueMultimapTests (line 10) | public class FormValueMultimapTests
    method EmptyIfNullPassedIn (line 14) | [Fact]
    method LoadsFromDictionary (line 21) | [Fact]
    method LoadsFromObject (line 31) | [Fact]
    method LoadFromObjectWithCollections (line 42) | [Fact]
    method DefaultCollectionFormatCanBeSpecifiedInSettings_Multi (line 69) | [Fact]
    method DefaultCollectionFormatCanBeSpecifiedInSettings (line 105) | [Theory]
    class ObjectTestClass (line 143) | public class ObjectTestClass
    class ObjectWithRepeatedFieldsTestClass (line 150) | public class ObjectWithRepeatedFieldsTestClass
    method ExcludesPropertiesWithInaccessibleGetters (line 171) | [Fact]
    class ClassWithInaccessibleGetters (line 182) | public class ClassWithInaccessibleGetters
    method LoadsFromAnonymousType (line 189) | [Fact]
    method UsesAliasAsAttribute (line 201) | [Fact]
    method UsesJsonPropertyAttribute (line 213) | [Fact]
    method UsesQueryPropertyAttribute (line 225) | [Fact]
    method GivesPrecedenceToAliasAs (line 237) | [Fact]
    method SkipsNullValuesFromDictionary (line 250) | [Fact]
    method SerializesEnumWithEnumMemberAttribute (line 261) | [Fact]
    class AliasingTestClass (line 277) | public class AliasingTestClass
    type EnumWithEnumMember (line 296) | public enum EnumWithEnumMember

FILE: Refit.Tests/GitHubApi.cs
  type User (line 13) | public record User
  class UserSearchResult (line 46) | public class UserSearchResult
  type IGitHubApi (line 53) | [Headers("User-Agent: Refit Integration Tests")]
    method GetUser (line 56) | [Get("/users/{username}")]
    method GetUserObservable (line 59) | [Get("/users/{username}")]
    method GetUserCamelCase (line 62) | [Get("/users/{userName}")]
    method GetOrgMembers (line 65) | [Get("/orgs/{orgname}/members")]
    method FindUsers (line 68) | [Get("/search/users")]
    method GetIndex (line 71) | [Get("/")]
    method GetIndexObservable (line 74) | [Get("/")]
    method NothingToSeeHere (line 77) | [Get("/give-me-some-404-action")]
    method NothingToSeeHereWithMetadata (line 80) | [Get("/give-me-some-404-action")]
    method GetUserWithMetadata (line 83) | [Get("/users/{username}")]
    method GetUserObservableWithMetadata (line 86) | [Get("/users/{username}")]
    method GetUserIApiResponseObservableWithMetadata (line 89) | [Get("/users/{username}")]
    method CreateUser (line 92) | [Post("/users")]
    method CreateUserWithMetadata (line 95) | [Post("/users")]
  type IGitHubApiDisposable (line 99) | public interface IGitHubApiDisposable : IDisposable
    method RefitMethod (line 101) | [Get("whatever")]
  class TestNested (line 105) | public class TestNested
    type INestedGitHubApi (line 107) | [Headers("User-Agent: Refit Integration Tests")]
      method GetUser (line 110) | [Get("/users/{username}")]
      method GetUserObservable (line 113) | [Get("/users/{username}")]
      method GetUserCamelCase (line 116) | [Get("/users/{userName}")]
      method GetOrgMembers (line 119) | [Get("/orgs/{orgname}/members")]
      method FindUsers (line 122) | [Get("/search/users")]
      method GetIndex (line 125) | [Get("/")]
      method GetIndexObservable (line 128) | [Get("/")]
      method NothingToSeeHere (line 131) | [Get("/give-me-some-404-action")]

FILE: Refit.Tests/HttpClientFactoryExtensionsTests.cs
  class HttpClientFactoryExtensionsTests (line 15) | public class HttpClientFactoryExtensionsTests
    class User (line 17) | class User { }
    class Role (line 19) | class Role { }
    method GenericHttpClientsAreAssignedUniqueNames (line 21) | [Fact]
    method HttpClientServicesAreDifferentThanKeyedServices (line 32) | [Fact]
    method HttpClientServicesAreAddedCorrectlyGivenGenericArgument (line 56) | [Fact]
    method HttpClientServicesAreAddedCorrectlyGivenTypeArgument (line 71) | [Fact]
    method HttpClientReturnsClientGivenGenericArgument (line 86) | [Fact]
    method HttpClientReturnsClientGivenTypeArgument (line 95) | [Fact]
    method HttpClientSettingsAreInjectableGivenGenericArgument (line 104) | [Fact]
    method HttpClientSettingsAreInjectableGivenTypeArgument (line 128) | [Fact]
    method HttpClientSettingsCanBeProvidedStaticallyGivenGenericArgument (line 153) | [Fact]
    method HttpClientSettingsCanBeProvidedStaticallyGivenTypeArgument (line 170) | [Fact]
    method ProvidedHttpClientIsUsedAsNamedClient (line 187) | [Fact]
    class ClientOptions (line 219) | class ClientOptions

FILE: Refit.Tests/IDefaultInterfaceMethodTests.cs
  type IHaveDims (line 13) | public interface IHaveDims
    method GetInternal (line 15) | [Get("")]
    method GetPrivate (line 20) | private Task<string> GetPrivate()
    method GetDim (line 25) | Task<string> GetDim()
    method GetStatic (line 30) | static string GetStatic()
  class DefaultInterfaceMethodTests (line 39) | public class DefaultInterfaceMethodTests
    method InternalInterfaceMemberTest (line 41) | [Fact]
    method DimTest (line 58) | [Fact]
    method InternalDimTest (line 75) | [Fact]
    method StaticInterfaceMethodTest (line 92) | [Fact]

FILE: Refit.Tests/IFooWithOtherAttribute.cs
  type IFooWithOtherAttribute (line 5) | interface IFooWithOtherAttribute
    method GetRoot (line 7) | [Get("/")]
    method PostRoot (line 10) | [DisplayName("/")]

FILE: Refit.Tests/IInterfaceWithoutRefit.cs
  type IInterfaceWithoutRefit (line 9) | public interface IInterfaceWithoutRefit
    method DoSomething (line 11) | Task DoSomething();

FILE: Refit.Tests/IServiceWithoutNamespace.cs
  type IServiceWithoutNamespace (line 7) | interface IServiceWithoutNamespace
    method GetRoot (line 9) | [Get("/")]
    method PostRoot (line 12) | [Post("/")]

FILE: Refit.Tests/InheritedGenericInterfacesApi.cs
  class DataEntity (line 9) | public class DataEntity { }
  type IDataApiA (line 11) | public interface IDataApiA : IDataCrudApi<DataEntity>
    method PingA (line 13) | [Get("")]
  type IDataApiB (line 17) | public interface IDataApiB : IDataCrudApi<DataEntity, int>
    method PingB (line 19) | [Get("")]
  type IDataCrudApi (line 23) | public interface IDataCrudApi<T> : IDataCrudApi<T, long>
    method Copy (line 26) | [Post("")]
    method Create (line 33) | [Post("")]
    method ReadAll (line 36) | [Get("")]
    method ReadAll (line 40) | [Get("")]
    method ReadOne (line 45) | [Get("/{key}")]
    method Update (line 48) | [Put("/{key}")]
    method Delete (line 51) | [Delete("/{key}")]
    method ReadAllClasses (line 54) | [Get("")]
  type IDataCrudApi (line 30) | public interface IDataCrudApi<T, TKey>
    method Copy (line 26) | [Post("")]
    method Create (line 33) | [Post("")]
    method ReadAll (line 36) | [Get("")]
    method ReadAll (line 40) | [Get("")]
    method ReadOne (line 45) | [Get("/{key}")]
    method Update (line 48) | [Put("/{key}")]
    method Delete (line 51) | [Delete("/{key}")]
    method ReadAllClasses (line 54) | [Get("")]
  class DatasetQueryItem (line 59) | public class DatasetQueryItem<TResultRow>
  type IDataMosApi (line 71) | public interface IDataMosApi
    method GetDataSetItems (line 73) | [Get("/datasets/{dataSet}/rows")]

FILE: Refit.Tests/InheritedInterfacesApi.cs
  type IAmInterface (line 10) | [Headers("User-Agent: Refit Integration Tests")]
    method Pang (line 13) | [Get("/get?result=Pang")]
  type IAmInterfaceA (line 17) | [Headers("User-Agent: Refit Integration Tests")]
    method Ping (line 20) | [Get("/get?result=Ping")]
  type IAmInterfaceB (line 24) | [Headers("User-Agent: Refit Integration Tests")]
    method Pong (line 27) | [Get("/get?result=Pong")]
  type IAmInterfaceC (line 31) | [Headers("User-Agent: Refit Integration Tests")]
    method Pang (line 34) | [Get("/get?result=Pang")]
  type IAmInterfaceD (line 38) | public interface IAmInterfaceD
    method Test (line 40) | [Get("/get?result=Test")]
  type IAmInterfaceF_RequireUsing (line 44) | public interface IAmInterfaceF_RequireUsing
    method Get (line 46) | [Get("/get-requiring-using")]
  type IContainAandB (line 50) | public interface IContainAandB : IAmInterfaceB, IAmInterfaceA { }
  type IAmInterfaceEWithNoRefit (line 52) | public interface IAmInterfaceEWithNoRefit<T>
    method DoSomething (line 54) | public Task DoSomething(T parameter);
    method DoSomethingElse (line 56) | public Task DoSomethingElse();
  type IImplementTheInterfaceAndUseRefit (line 59) | public interface IImplementTheInterfaceAndUseRefit : IAmInterfaceEWithNo...
    method DoSomething (line 62) | [Get("/doSomething")]
    method DoSomethingElse (line 66) | [Get("/DoSomethingElse")]
  type IImplementTheInterfaceAndDontUseRefit (line 70) | public interface IImplementTheInterfaceAndDontUseRefit : IAmInterfaceD
    method Test (line 73) | Task<string> Test();
  type IMyClient (line 77) | public interface IMyClient
    method MyMethodAsync (line 79) | [Get("/")]
  class ResponseModel (line 86) | public class ResponseModel { }

FILE: Refit.Tests/InheritedInterfacesInSeparateFileApi.cs
  type InheritedInterfacesInSeparateFileApi (line 6) | public interface InheritedInterfacesInSeparateFileApi : IAmInterfaceF_Re...
    method Get (line 8) | [Get("/get")]

FILE: Refit.Tests/IntegrationTestHelper.cs
  class IntegrationTestHelper (line 14) | public static class IntegrationTestHelper
    method GetPath (line 16) | public static string GetPath(params string[] paths)
    method GetIntegrationTestRootDirectory (line 22) | public static string GetIntegrationTestRootDirectory([CallerFilePath] ...

FILE: Refit.Tests/InterfaceStubGenerator.cs
  class InterfaceStubGeneratorTests (line 16) | public class InterfaceStubGeneratorTests
    method InterfaceStubGeneratorTests (line 27) | static InterfaceStubGeneratorTests()
    method VerifyGenerator (line 48) | public static async Task<VerifyResult> VerifyGenerator(string input)
    method GenerateInterfaceStubsSmokeTest (line 71) | [Fact(Skip = "Generator in test issue")]
    method CreateCompilation (line 106) | static CSharpCompilation CreateCompilation(params string[] sourceFiles)
    method NoRefitInterfacesSmokeTest (line 130) | [Fact]
    method FindInterfacesSmokeTest (line 137) | [Fact]
    method GenerateInterfaceStubsWithoutNamespaceSmokeTest (line 144) | [Fact]
  class ThisIsDumbButMightHappen (line 152) | public static class ThisIsDumbButMightHappen
  type IAmARefitInterfaceButNobodyUsesMe (line 157) | public interface IAmARefitInterfaceButNobodyUsesMe
    method RefitMethod (line 159) | [Get("whatever")]
    method AnotherRefitMethod (line 162) | [Refit.GetAttribute("something-else")]
    method NoConstantsAllowed (line 165) | [Get(ThisIsDumbButMightHappen.PeopleDoWeirdStuff)]
    method SpacesShouldntBreakMe (line 168) | [Get("spaces-shouldnt-break-me")]
    method ReservedWordsForParameterNames (line 172) | [Get("anything")]
  type IAmNotARefitInterface (line 176) | public interface IAmNotARefitInterface
    method NotARefitMethod (line 178) | Task NotARefitMethod();
  type IBoringCrudApi (line 181) | public interface IBoringCrudApi<T, in TKey>
    method Create (line 184) | [Post("")]
    method ReadAll (line 187) | [Get("")]
    method ReadOne (line 190) | [Get("/{key}")]
    method Update (line 193) | [Put("/{key}")]
    method Delete (line 196) | [Delete("/{key}")]
  type INonGenericInterfaceWithGenericMethod (line 200) | public interface INonGenericInterfaceWithGenericMethod
    method PostMessage (line 202) | [Post("")]
    method PostMessage (line 206) | [Post("")]

FILE: Refit.Tests/MethodOverloads.cs
  type IUseOverloadedMethods (line 12) | public interface IUseOverloadedMethods
    method Get (line 14) | [Get("")]
    method Get (line 17) | [Get("/status/{httpstatuscode}")]
  type IUseOverloadedGenericMethods (line 21) | public interface IUseOverloadedGenericMethods<TResponse, in TParam, in T...
    method Get (line 25) | [Get("")]
    method Get (line 28) | [Get("/get")]
    method Get (line 31) | [Get("/get")]
    method Get (line 34) | [Get("/status/{httpstatuscode}")]
    method Get (line 37) | [Get("/get")]
    method Get (line 40) | [Get("/get")]
    method Get (line 43) | [Get("/get")]
  class MethodOverladTests (line 47) | public class MethodOverladTests
    method BasicMethodOverloadTest (line 49) | [Fact]
    method GenericMethodOverloadTest1 (line 73) | [Fact]
    method GenericMethodOverloadTest2 (line 93) | [Fact]
    method GenericMethodOverloadTest3 (line 114) | [Fact]
    method GenericMethodOverloadTest4 (line 136) | [Fact]
    method GenericMethodOverloadTest5 (line 162) | [Fact]
    method GenericMethodOverloadTest6 (line 188) | [Fact]
    method GenericMethodOverloadTest7 (line 210) | [Fact]

FILE: Refit.Tests/ModuleInitializer.cs
  class ModuleInitializer (line 6) | static class ModuleInitializer
    method Init (line 10) | [ModuleInitializer]

FILE: Refit.Tests/MultipartTests.cs
  type IRunscopeApi (line 18) | public interface IRunscopeApi
    method UploadStream (line 20) | [Multipart]
    method UploadStreamWithCustomBoundary (line 24) | [Multipart("-----SomeCustomBoundary")]
    method UploadStreamPart (line 28) | [Multipart]
    method UploadStreamPart (line 32) | [Multipart]
    method UploadBytes (line 39) | [Multipart]
    method UploadBytesPart (line 43) | [Multipart]
    method UploadString (line 49) | [Multipart]
    method UploadStringWithHeaderAndRequestProperty (line 53) | [Multipart]
    method UploadFileInfo (line 61) | [Multipart]
    method UploadFileInfoPart (line 65) | [Multipart]
    method UploadJsonObject (line 72) | [Multipart]
    method UploadJsonObjects (line 76) | [Multipart]
    method UploadMixedObjects (line 80) | [Multipart]
    method UploadHttpContent (line 91) | [Multipart]
  class ModelObject (line 96) | public class ModelObject
  class AnotherModel (line 102) | public class AnotherModel
  type AnEnum (line 107) | public enum AnEnum
  class MultipartTests (line 113) | public class MultipartTests
    method MultipartUploadShouldWorkWithStream (line 117) | [Fact]
    method MultipartUploadShouldWorkWithStreamAndCustomBoundary (line 144) | [Fact]
    method MultipartUploadShouldWorkWithByteArray (line 180) | [Fact]
    method MultipartUploadShouldWorkWithFileInfo (line 210) | [Fact]
    method MultipartUploadShouldWorkWithString (line 275) | [Fact]
    method MultipartUploadShouldWorkWithHeaderAndRequestProperty (line 303) | [Fact]
    method MultipartUploadShouldWorkWithStreamPart (line 354) | [Fact]
    method MultipartUploadShouldWorkWithStreamPartWithNamedMultipart (line 384) | [Fact]
    method MultipartUploadShouldWorkWithStreamPartAndQuery (line 414) | [Fact]
    method MultipartUploadShouldWorkWithByteArrayPart (line 449) | [Fact]
    method MultipartUploadShouldWorkWithFileInfoPart (line 485) | [Fact]
    method MultipartUploadShouldWorkWithAnObject (line 568) | [Theory]
    method MultipartUploadShouldWorkWithObjects (line 617) | [Theory]
    method MultipartUploadShouldWorkWithMixedTypes (line 677) | [Fact]
    method MultipartUploadShouldWorkWithHttpContent (line 784) | [Fact]
    method MultiPartConstructorShouldThrowArgumentNullExceptionWhenNoFileName (line 816) | [Fact]
    method FileInfoPartConstructorShouldThrowArgumentNullExceptionWhenNoFileInfo (line 825) | [Fact]
    method GetTestFileStream (line 834) | internal static Stream GetTestFileStream(string relativeFilePath)
    method StreamsEqual (line 871) | static bool StreamsEqual(Stream a, Stream b)
    class MockHttpMessageHandler (line 896) | class MockHttpMessageHandler : HttpMessageHandler
      method SendAsync (line 901) | protected override async Task<HttpResponseMessage> SendAsync(

FILE: Refit.Tests/MyQueryParams.cs
  type MySimpleQueryParams (line 7) | public record MySimpleQueryParams
  class MyComplexQueryParams (line 15) | public class MyComplexQueryParams
  type Address (line 29) | public record Address

FILE: Refit.Tests/NamespaceCollisionApi.cs
  type INamespaceCollisionApi (line 8) | public interface INamespaceCollisionApi
    method SomeRequest (line 10) | [Get("/")]
    method SomeRequest (line 29) | [Get("/")]
    method SomeRequest (line 40) | [Get("/")]
  class NamespaceCollisionApi (line 14) | public static class NamespaceCollisionApi
    method Create (line 16) | public static INamespaceCollisionApi Create()
  class SomeType (line 25) | public class SomeType { }
  type INamespaceCollisionApi (line 27) | public interface INamespaceCollisionApi
    method SomeRequest (line 10) | [Get("/")]
    method SomeRequest (line 29) | [Get("/")]
    method SomeRequest (line 40) | [Get("/")]
  class SomeType (line 36) | public class SomeType { }
  type INamespaceCollisionApi (line 38) | public interface INamespaceCollisionApi
    method SomeRequest (line 10) | [Get("/")]
    method SomeRequest (line 29) | [Get("/")]
    method SomeRequest (line 40) | [Get("/")]

FILE: Refit.Tests/NamespaceOverlapApi.cs
  type INamespaceOverlapApi (line 10) | [SomeHelper]
    method SomeRequest (line 13) | [Get("/")]
  class NamespaceOverlapApi (line 17) | public static class NamespaceOverlapApi
    method Create (line 19) | public static INamespaceOverlapApi Create()
  class SomeHelperAttribute (line 28) | public class SomeHelperAttribute : Attribute { }
  class SomeOtherType (line 33) | public class SomeOtherType { }

FILE: Refit.Tests/NamespaceWithGlobalAliasApi.cs
  type NamespaceWithGlobalAliasApi (line 8) | public interface NamespaceWithGlobalAliasApi
    method SomeRequest (line 10) | [Get("/")]
  class SomeType (line 17) | public class SomeType { }

FILE: Refit.Tests/NullableReferenceTypes.cs
  type IGenericWithResultService (line 8) | interface IGenericWithResultService
    method Get (line 10) | [Get("/")]
  type IGenericWithNullableValueService (line 14) | interface IGenericWithNullableValueService
    method Get (line 16) | [Get("/")]
  type IGenericNullableReferenceService (line 20) | interface IGenericNullableReferenceService
    method Get (line 22) | [Get("/")]
  type IGenericNullableValueService (line 26) | interface IGenericNullableValueService
    method Get (line 28) | [Get("/")]
  type IGenericNullableWithNullableReferenceService (line 32) | interface IGenericNullableWithNullableReferenceService
    method Get (line 34) | [Get("/")]
  type IGenericNullableWithNullableValueService (line 38) | interface IGenericNullableWithNullableValueService
    method Get (line 40) | [Get("/")]
  type INullableReferenceService (line 44) | interface INullableReferenceService
    method Get (line 46) | [Get("/")]
  type INullableValueService (line 50) | interface INullableValueService
    method Get (line 52) | [Get("/")]
  type IReferenceAndValueParametersService (line 56) | interface IReferenceAndValueParametersService
    method Get (line 58) | [Get("/")]
  type IGenericNullableReferenceParameterService (line 62) | interface IGenericNullableReferenceParameterService
    method Get (line 64) | [Get("/")]
  type IGenericWithNullableReferenceParameterService (line 68) | interface IGenericWithNullableReferenceParameterService
    method Get (line 70) | [Get("/")]
  type IGenericNullableWithNullableReferenceParameterService (line 74) | interface IGenericNullableWithNullableReferenceParameterService
    method Get (line 76) | [Get("/")]
  type ICustomNullableReferenceService (line 80) | interface ICustomNullableReferenceService
    method Get (line 82) | [Get("/")]
  type ICustomNullableValueService (line 86) | interface ICustomNullableValueService
    method Get (line 88) | [Get("/")]
  type ICustomReferenceAndValueParametersService (line 92) | interface ICustomReferenceAndValueParametersService
    method Get (line 94) | [Get("/")]
  class CustomReferenceType (line 98) | class CustomReferenceType { }
  class CustomValueType (line 100) | class CustomValueType { }

FILE: Refit.Tests/PartialInterfacesApi.First.cs
  type PartialInterfacesApi (line 6) | public partial interface PartialInterfacesApi
    method First (line 8) | [Get("/get?result=First")]

FILE: Refit.Tests/PartialInterfacesApi.Second.cs
  type PartialInterfacesApi (line 6) | public partial interface PartialInterfacesApi
    method Second (line 8) | [Get("/get?result=Second")]

FILE: Refit.Tests/ReducedUsingInsideNamespaceApi.cs
  type IReducedUsingInsideNamespaceApi (line 8) | public interface IReducedUsingInsideNamespaceApi
    method SomeRequest (line 10) | [Get("/")]
  class SomeType (line 17) | public class SomeType { }

FILE: Refit.Tests/RefitSettings.cs
  class RefitSettingsTests (line 5) | public class RefitSettingsTests
    method Can_CreateRefitSettings_WithoutException (line 7) | [Fact]

FILE: Refit.Tests/ReflectionTests.cs
  type IBasicApi (line 8) | public interface IBasicApi
    method GetParam (line 10) | [Get("/{value}")]
    method GetDerivedParam (line 13) | [Get("/{value}")]
    method GetPropertyParam (line 16) | [Get("/{value.PropValue}")]
    method GetGenericParam (line 19) | [Get("/{value}")]
    method GetQuery (line 22) | [Get("/")]
    method GetGenericQuery (line 25) | [Get("/")]
    method GetPropertyQuery (line 28) | [Get("/")]
    method GetEnumerableQuery (line 31) | [Get("/")]
    method GetEnumerablePropertyQuery (line 34) | [Get("/")]
    method GetDictionaryQuery (line 37) | [Get("/")]
  type DerivedRecordWithProperty (line 41) | public record DerivedRecordWithProperty(string Name) : BaseRecord("value");
  type DerivedRecord (line 43) | public record DerivedRecord(string Value) : BaseRecord(Value);
  type BaseRecord (line 45) | public record BaseRecord(string Value);
  type MyParams (line 47) | public record MyParams(string PropValue);
  type MyEnumerableParams (line 49) | public record MyEnumerableParams(int[] Enumerable);
  class TestUrlFormatter (line 51) | public class TestUrlFormatter : IUrlParameterFormatter
    method TestUrlFormatter (line 57) | public TestUrlFormatter(ICustomAttributeProvider expectedAttributeProv...
    method TestUrlFormatter (line 63) | public TestUrlFormatter(
    method Format (line 72) | public string Format(object value, ICustomAttributeProvider attributeP...
    method AssertNoOutstandingAssertions (line 80) | public void AssertNoOutstandingAssertions()
  class ReflectionTests (line 87) | public sealed class ReflectionTests : IDisposable
    method UrlParameterShouldBeExpectedReflection (line 91) | [Fact]
    method DerivedUrlParameterShouldBeExpectedReflection (line 113) | [Fact]
    method PropertyParameterShouldBeExpectedReflection (line 135) | [Fact]
    method GenericParameterShouldBeExpectedReflection (line 156) | [Fact]
    method QueryParameterShouldBeExpectedReflection (line 179) | [Fact]
    method QueryPropertyParameterShouldBeExpectedReflection (line 204) | [Fact]
    method DerivedQueryPropertyParameterShouldBeExpectedReflection (line 227) | [Fact]
    method GenericQueryParameterShouldBeExpectedReflection (line 259) | [Fact]
    method EnumerableQueryParameterShouldBeExpectedReflection (line 285) | [Fact]
    method EnumerablePropertyQueryParameterShouldBeExpectedReflection (line 311) | [Fact]
    method QueryDictionaryParameterShouldBeExpectedReflection (line 338) | [Fact]
    method Dispose (line 376) | public void Dispose()

FILE: Refit.Tests/RequestBuilder.cs
  type IRestMethodInfoTests (line 17) | [Headers("User-Agent: RefitTestClient", "Api-Version: 1")]
    method GarbagePath (line 20) | [Get("@)!@_!($_!@($\\\\|||::::")]
    method FetchSomeStuffMissingParameters (line 23) | [Get("/foo/bar/{id}")]
    method FetchSomeStuff (line 26) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithTheSameId (line 29) | [Get("/foo/bar/{id}?param1={id}&param2={id}")]
    method FetchSomeStuffWithTheIdInAParameterMultipleTimes (line 32) | [Get("/foo/bar?param=first {id} and second {id}")]
    method FetchSomeStuffWithRoundTrippingParam (line 35) | [Get("/foo/bar/{**path}/{id}")]
    method FetchSomeStuffWithNonStringRoundTrippingParam (line 38) | [Get("/foo/bar/{**path}/{id}")]
    method FetchSomeStuffWithHardcodedQueryParam (line 41) | [Get("/foo/bar/{id}?baz=bamf")]
    method FetchSomeStuffWithQueryParam (line 44) | [Get("/foo/bar/{id}?baz=bamf")]
    method FetchSomeStuffWithAlias (line 47) | [Get("/foo/bar/{id}")]
    method FetchAnImage (line 50) | [Get("/foo/bar/{width}x{height}")]
    method FetchSomeStuffWithBody (line 53) | [Get("/foo/bar/{id}")]
    method PostSomeUrlEncodedStuff (line 59) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithAuthorizationSchemeSpecified (line 65) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithHardcodedHeaders (line 71) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeader (line 75) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderQueryParamAndArrayQueryParam (line 81) | [Get("/foo")]
    method FetchSomeStuffWithDynamicHeaderCollection (line 91) | [Get("/foo/bar/{id}")]
    method PutSomeStuffWithCustomHeaderCollection (line 101) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithCustomHeaderCollection (line 108) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithCustomHeaderCollection (line 115) | [Patch("/foo/bar/{id}")]
    method PutSomeStuffWithoutBodyAndCustomHeaderCollection (line 122) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithoutBodyAndCustomHeaderCollection (line 128) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithoutBodyAndCustomHeaderCollection (line 134) | [Patch("/foo/bar/{id}")]
    method PutSomeStuffWithInferredBodyAndWithDynamicHeaderCollection (line 140) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithInferredBodyAndWithDynamicHeaderCollection (line 147) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithInferredBodyAndWithDynamicHeaderCollection (line 154) | [Patch("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollectionAndAuthorize (line 161) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicHeaderCollectionAndAuthorize (line 168) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollectionAndDynamicHeader (line 175) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicHeaderCollectionAndDynamicHeader (line 182) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollectionAndDynamicHeaderOrderFlipped (line 189) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithPathMemberInCustomHeaderAndDynamicHeaderCollection (line 196) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithPathMemberInCustomHeaderAndDynamicHeaderCollection (line 202) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithHeaderCollection (line 208) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithHeaderCollection (line 215) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithDuplicateHeaderCollection (line 222) | [Get("/foo/bar")]
    method PostSomeStuffWithDuplicateHeaderCollection (line 228) | [Post("/foo/bar")]
    method FetchSomeStuffWithHeaderCollectionQueryParamAndArrayQueryParam (line 234) | [Get("/foo")]
    method PostSomeStuffWithHeaderCollectionQueryParamAndArrayQueryParam (line 242) | [Post("/foo")]
    method FetchSomeStuffWithHeaderCollectionOfUnsupportedType (line 250) | [Get("/foo")]
    method PostSomeStuffWithHeaderCollectionOfUnsupportedType (line 255) | [Post("/foo")]
    method FetchSomeStuffWithDynamicRequestProperty (line 264) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicRequestProperty (line 270) | [Post("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicRequestProperties (line 277) | [Post("/foo/bar/{id}")]
    method PutSomeStuffWithoutBodyAndWithDynamicRequestProperty (line 285) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithoutBodyAndWithDynamicRequestProperty (line 291) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithoutBodyAndWithDynamicRequestProperty (line 297) | [Patch("/foo/bar/{id}")]
    method PutSomeStuffWithInferredBodyAndWithDynamicRequestProperty (line 303) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithInferredBodyAndWithDynamicRequestProperty (line 310) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithInferredBodyAndWithDynamicRequestProperty (line 317) | [Patch("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicRequestPropertyWithDuplicateKey (line 324) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicRequestPropertyWithoutKey (line 331) | [Get("/foo/bar/{id}")]
    method OhYeahValueTypes (line 340) | [Post("/foo/{id}")]
    method OhYeahValueTypesUnbuffered (line 343) | [Post("/foo/{id}")]
    method PullStreamMethod (line 346) | [Post("/foo/{id}")]
    method VoidPost (line 349) | [Post("/foo/{id}")]
    method AsyncOnlyBuddy (line 352) | [Post("/foo/{id}")]
    method PatchSomething (line 355) | [Patch("/foo/{id}")]
    method SendOptions (line 358) | [Options("/foo/{id}")]
    method PostReturnsApiResponse (line 361) | [Post("/foo/{id}")]
    method PostReturnsNonApiResponse (line 364) | [Post("/foo/{id}")]
    method PostWithBodyDetected (line 367) | [Post("/foo")]
    method GetWithBodyDetected (line 370) | [Get("/foo")]
    method PutWithBodyDetected (line 373) | [Put("/foo")]
    method PatchWithBodyDetected (line 376) | [Patch("/foo")]
    method TooManyComplexTypes (line 379) | [Post("/foo")]
    method ManyComplexTypes (line 382) | [Post("/foo")]
    method PostWithDictionaryQuery (line 388) | [Post("/foo")]
    method PostWithComplexTypeQuery (line 391) | [Post("/foo")]
    method ImpliedComplexQueryType (line 394) | [Post("/foo")]
    method MultipleQueryAttributes (line 400) | [Get("/api/{id}")]
    method NullableValues (line 408) | [Get("/api/{id}")]
    method IEnumerableThrowingError (line 416) | [Get("/api/{id}")]
    method InvalidGenericReturnType (line 419) | [Get("/foo")]
  type TestEnum (line 423) | public enum TestEnum
  class ComplexQueryObject (line 430) | public class ComplexQueryObject
  class RestMethodInfoTests (line 465) | public class RestMethodInfoTests
    method TooManyComplexTypesThrows (line 467) | [Fact]
    method ManyComplexTypes (line 483) | [Fact]
    method DefaultBodyParameterDetected (line 499) | [Theory]
    method DefaultBodyParameterNotDetectedForGet (line 515) | [Fact]
    method PostWithDictionaryQueryParameter (line 530) | [Fact]
    method PostWithObjectQueryParameterHasSingleQueryParameterValue (line 545) | [Fact]
    method PostWithObjectQueryParameterHasCorrectQuerystring (line 561) | [Fact]
    method PostWithObjectQueryParameterSkipsIgnoredProperties (line 579) | [Fact]
    method PostWithObjectQueryParameterWithEnumList_Multi (line 600) | [Fact]
    method PostWithObjectQueryParameterWithObjectListWithProvidedEnumValues_Multi (line 622) | [Fact]
    method PostWithObjectQueryParameterWithEnumList_Csv (line 644) | [Fact]
    method PostWithObjectQueryParameterWithObjectListWithProvidedEnumValues_Csv (line 663) | [Fact]
    method ObjectQueryParameterWithInnerCollectionHasCorrectQuerystring (line 682) | [Fact]
    method MultipleQueryAttributesWithNulls (line 697) | [Fact]
    method GarbagePathsShouldThrow (line 711) | [Fact]
    method MissingParametersShouldBlowUp (line 734) | [Fact]
    method ParameterMappingSmokeTest (line 761) | [Fact]
    method ParameterMappingWithTheSameIdInAFewPlaces (line 775) | [Fact]
    method ParameterMappingWithTheSameIdInTheQueryParameter (line 791) | [Fact]
    method ParameterMappingWithRoundTrippingSmokeTest (line 813) | [Fact]
    method ParameterMappingWithNonStringRoundTrippingShouldThrow (line 835) | [Fact]
    method ParameterMappingWithQuerySmokeTest (line 856) | [Fact]
    method ParameterMappingWithHardcodedQuerySmokeTest (line 872) | [Fact]
    method AliasMappingShouldWork (line 892) | [Fact]
    method MultipleParametersPerSegmentShouldWork (line 908) | [Fact]
    method FindTheBodyParameter (line 924) | [Fact]
    method FindTheAuthorizeParameter (line 942) | [Fact]
    method AllowUrlEncodedContent (line 966) | [Fact]
    method HardcodedHeadersShouldWork (line 984) | [Fact]
    method DynamicHeadersShouldWork (line 1018) | [Fact]
    method DynamicHeaderCollectionShouldWork (line 1047) | [Fact]
    method DynamicHeaderCollectionShouldWorkWithBody (line 1096) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithoutBody (line 1119) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithInferredBody (line 1144) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithAuthorize (line 1176) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithDynamicHeader (line 1202) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithPathMemberDynamicHeader (line 1254) | [Theory]
    method DynamicHeaderCollectionInMiddleOfParamsShouldWork (line 1287) | [Theory]
    method DynamicHeaderCollectionShouldOnlyAllowOne (line 1308) | [Theory]
    method DynamicHeaderCollectionShouldWorkWithProperty (line 1324) | [Theory]
    method DynamicHeaderCollectionShouldOnlyWorkWithSupportedSemantics (line 1355) | [Theory]
    method DynamicRequestPropertiesShouldWork (line 1380) | [Fact]
    method DynamicRequestPropertyShouldWorkWithBody (line 1403) | [Fact]
    method DynamicRequestPropertiesShouldWorkWithBody (line 1428) | [Fact]
    method DynamicRequestPropertyShouldWorkWithoutBody (line 1456) | [Theory]
    method DynamicRequestPropertyShouldWorkWithInferredBody (line 1484) | [Theory]
    method DynamicRequestPropertiesWithoutKeysShouldDefaultKeyToParameterName (line 1513) | [Fact]
    method DynamicRequestPropertiesWithDuplicateKeysDontBlowUp (line 1539) | [Fact]
    method ValueTypesDontBlowUpBuffered (line 1567) | [Fact]
    method ValueTypesDontBlowUpUnBuffered (line 1587) | [Fact]
    method StreamMethodPullWorks (line 1607) | [Fact]
    method ReturningTaskShouldWork (line 1627) | [Fact]
    method SyncMethodsShouldThrow (line 1642) | [Fact]
    method UsingThePatchAttributeSetsTheCorrectMethod (line 1665) | [Fact]
    method UsingOptionsAttribute (line 1677) | [Fact]
    method ApiResponseShouldBeSet (line 1689) | [Fact]
    method ApiResponseShouldNotBeSet (line 1703) | [Fact]
    method ParameterMappingWithHeaderQueryParamAndQueryArrayParam (line 1717) | [Fact]
    method GenericReturnTypeIsNotTaskOrObservableShouldThrow (line 1740) | [Fact]
  type IDummyHttpApi (line 1758) | [Headers("User-Agent: RefitTestClient", "Api-Version: 1")]
    method FetchSomeStringWithMetadata (line 1761) | [Get("/foo/bar/{id}")]
    method FetchSomeStuff (line 1764) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithRoundTrippingParam (line 1767) | [Get("/foo/bar/{**path}/{id}")]
    method FetchSomeStuffWithHardcodedQueryParameter (line 1770) | [Get("/foo/bar/{id}?baz=bamf")]
    method FetchSomeStuffWithHardcodedAndOtherQueryParameters (line 1773) | [Get("/foo/bar/{id}?baz=bamf")]
    method FetchSomethingWithMultipleParametersPerSegment (line 1779) | [Get("/{id}/{width}x{height}/foo")]
    method FetchSomeStuffWithHardcodedHeaders (line 1782) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithNullHardcodedHeader (line 1786) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithEmptyHardcodedHeader (line 1790) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithTheSameId (line 1794) | [Get("/foo/bar/{id}?param1={id}&param2={id}")]
    method FetchSomeStuffWithTheIdInAParameterMultipleTimes (line 1797) | [Get("/foo/bar?param=first {id} and second {id}")]
    method FetchSomeStuffWithDoubleQuotesInUrl (line 1800) | [Get("/foo?q=app_metadata.id:\"{id}\"")]
    method GetWithTrainingParenthesis (line 1803) | [Get("/foo/bar/({id})")]
    method GetWithTrailingSlash (line 1806) | [Get("/foo/bar/{id}/")]
    method PostSomeStuffWithHardCodedContentTypeHeader (line 1809) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeader (line 1813) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithCustomHeader (line 1820) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithPathMemberInCustomHeader (line 1823) | [Get("/foo/bar/{id}")]
    method PostSomeStuffWithCustomHeader (line 1829) | [Post("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollection (line 1836) | [Get("/foo/bar/{id}")]
    method DeleteSomeStuffWithDynamicHeaderCollection (line 1846) | [Delete("/foo/bar/{id}")]
    method PutSomeStuffWithDynamicHeaderCollection (line 1856) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicHeaderCollection (line 1866) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithDynamicHeaderCollection (line 1876) | [Patch("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollectionAndDynamicHeader (line 1886) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicHeaderCollectionAndDynamicHeaderOrderFlipped (line 1894) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicRequestProperty (line 1902) | [Get("/foo/bar/{id}")]
    method DeleteSomeStuffWithDynamicRequestProperty (line 1908) | [Delete("/foo/bar/{id}")]
    method PutSomeStuffWithDynamicRequestProperty (line 1914) | [Put("/foo/bar/{id}")]
    method PostSomeStuffWithDynamicRequestProperty (line 1920) | [Post("/foo/bar/{id}")]
    method PatchSomeStuffWithDynamicRequestProperty (line 1926) | [Patch("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicRequestPropertyWithDuplicateKey (line 1932) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithDynamicRequestPropertyWithoutKey (line 1939) | [Get("/foo/bar/{id}")]
    method FetchSomeStuffWithoutFullPath (line 1946) | [Get("/string")]
    method FetchSomeStuffWithVoid (line 1949) | [Get("/void")]
    method FetchSomeStuffWithVoidAndQueryAlias (line 1952) | [Get("/void/{id}/path")]
    method FetchSomeStuffWithNonFormattableQueryParams (line 1959) | [Get("/foo")]
    method PostSomeUrlEncodedStuff (line 1962) | [Post("/foo/bar/{id}")]
    method PostSomeAliasedUrlEncodedStuff (line 1968) | [Post("/foo/bar/{id}")]
    method SomeOtherMethod (line 1974) | string SomeOtherMethod();
    method PutSomeContentWithAuthorization (line 1976) | [Put("/foo/bar/{id}")]
    method PutSomeStuffWithDynamicContentType (line 1983) | [Put("/foo/bar/{id}")]
    method PostAValueType (line 1990) | [Post("/foo/bar/{id}")]
    method PatchSomething (line 1993) | [Patch("/foo/bar/{id}")]
    method SendOptions (line 1996) | [Options("/foo/bar/{id}")]
    method FetchSomeStuffWithQueryFormat (line 1999) | [Get("/foo/bar/{id}")]
    method QueryWithEnumerable (line 2002) | [Get("/query")]
    method QueryWithArray (line 2005) | [Get("/query")]
    method QueryWithExplicitParameters (line 2008) | [Get("/query?q1={param1}&q2={param2}")]
    method QueryWithArrayFormattedAsMulti (line 2011) | [Get("/query")]
    method QueryWithArrayFormattedAsCsv (line 2014) | [Get("/query")]
    method QueryWithArrayFormattedAsSsv (line 2017) | [Get("/query")]
    method QueryWithArrayFormattedAsTsv (line 2020) | [Get("/query")]
    method QueryWithArrayFormattedAsPipes (line 2023) | [Get("/query")]
    method ComplexQueryObjectWithDictionary (line 2026) | [Get("/foo")]
    method QueryWithDictionaryWithEnumKey (line 2029) | [Get("/foo")]
    method QueryWithDictionaryWithPrefix (line 2032) | [Get("/foo")]
    method QueryWithDictionaryWithNumericKey (line 2037) | [Get("/foo")]
    method QueryWithEnumerableFormattedAsMulti (line 2040) | [Get("/query")]
    method QueryWithEnumerableFormattedAsCsv (line 2045) | [Get("/query")]
    method QueryWithEnumerableFormattedAsSsv (line 2050) | [Get("/query")]
    method QueryWithEnumerableFormattedAsTsv (line 2055) | [Get("/query")]
    method QueryWithEnumerableFormattedAsPipes (line 2060) | [Get("/query")]
    method QueryWithObjectWithPrivateGetters (line 2065) | [Get("/query")]
    method PostWithQueryStringParameters (line 2068) | [Multipart]
    method QueryWithEnum (line 2072) | [Get("/query")]
    method QueryWithTypeWithEnum (line 2075) | [Get("/query")]
    method QueryWithOptionalParameters (line 2078) | [Get("/api/{id}")]
    method ClearWithEnumMember (line 2087) | [Delete("/api/bar")]
    method Clear (line 2090) | [Delete("/api/v1/video")]
    method Blob_Post_Byte (line 2093) | [Multipart]
    method UploadFile (line 2097) | [Multipart]
    method PostWithComplexTypeQuery (line 2108) | [Post("/foo")]
    method ComplexTypeQueryWithInnerCollection (line 2111) | [Get("/foo")]
    method QueryWithOptionalParametersPathBoundObject (line 2114) | [Get("/api/{obj.someProperty}")]
    method QueryWithHeadersBeforeData (line 2122) | [Headers("Accept:application/json", "X-API-V: 125")]
    method UnescapedQueryParams (line 2132) | [Get("/query")]
    method UnescapedQueryParamsWithFilter (line 2136) | [Get("/query")]
    method SomeApiThatUsesParameterMoreThanOnceInTheUrl (line 2140) | [Get("/api/foo/{id}/file_{id}?query={id}")]
  type ICancellableMethods (line 2144) | interface ICancellableMethods
    method GetWithCancellation (line 2146) | [Get("/foo")]
    method GetWithCancellationAndReturn (line 2149) | [Get("/foo")]
  type IAuthenticatedCancellableMethods (line 2153) | interface IAuthenticatedCancellableMethods
    method GetWithAuthorizationAndCancellation (line 2155) | [Headers("Authorization: Bearer")]
  type FooWithEnumMember (line 2160) | public enum FooWithEnumMember
  class TypeFooWithEnumMember (line 2168) | public class TypeFooWithEnumMember
  class SomeRequestData (line 2174) | public class SomeRequestData
  class Person (line 2180) | public class Person
  class TestHttpMessageHandler (line 2187) | public class TestHttpMessageHandler : HttpMessageHandler
    method TestHttpMessageHandler (line 2196) | public TestHttpMessageHandler(string content = "test")
    method SendAsync (line 2202) | protected override async Task<HttpResponseMessage> SendAsync(
  class TestUrlParameterFormatter (line 2222) | public class TestUrlParameterFormatter : IUrlParameterFormatter
    method TestUrlParameterFormatter (line 2226) | public TestUrlParameterFormatter(string constantOutput)
    method Format (line 2231) | public string Format(object value, ICustomAttributeProvider attributeP...
  class TestEnumUrlParameterFormatter (line 2238) | public class TestEnumUrlParameterFormatter : DefaultUrlParameterFormatter
    method Format (line 2240) | public override string Format(
  class TestEnumerableUrlParameterFormatter (line 2263) | public class TestEnumerableUrlParameterFormatter : DefaultUrlParameterFo...
    method Format (line 2265) | public override string Format(
  class RequestBuilderTests (line 2287) | public class RequestBuilderTests
    method MethodsShouldBeCancellableDefault (line 2289) | [Fact]
    method MethodsShouldBeCancellableWithToken (line 2301) | [Fact]
    method MethodsShouldBeCancellableWithTokenDoesCancel (line 2316) | [Fact]
    method AuthorizationHeaderValueGetterReceivesMethodCancellationToken (line 2329) | [Fact]
    method HttpContentAsApiResponseTest (line 2352) | [Fact]
    method HttpContentTest (line 2384) | [Fact]
    method StreamResponseAsApiResponseTest (line 2410) | [Fact]
    method StreamResponseTest (line 2446) | [Fact]
    method MethodsThatDontHaveAnHttpMethodShouldFail (line 2476) | [Fact]
    method HardcodedQueryParamShouldBeInUrl (line 2517) | [Fact]
    method ParameterizedQueryParamsShouldBeInUrl (line 2530) | [Fact]
    method ParameterizedValuesShouldBeInUrlMoreThanOnce (line 2543) | [Fact]
    method RoundTrippingParameterizedQueryParamsShouldBeInUrl (line 2556) | [Theory]
    method ParameterizedNullQueryParamsShouldBeBlankInUrl (line 2577) | [Fact]
    method ParametersShouldBePutAsExplicitQueryString (line 2590) | [Fact]
    method QueryParamShouldFormat (line 2604) | [Fact]
    method ParameterizedQueryParamsShouldBeInUrlAndValuesEncoded (line 2615) | [Fact]
    method ParameterizedQueryParamsShouldBeInUrlAndValuesEncodedWhenMixedReplacementAndQuery (line 2629) | [Fact]
    method QueryParamWithPathDelimiterShouldBeEncoded (line 2646) | [Fact]
    method QueryParamWhichEndsInDoubleQuotesShouldNotBeTruncated (line 2663) | [Fact]
    method ShouldCaptureLastCharacterWhenRouteEndsWithConstant (line 2677) | [Theory]
    method ParameterizedQueryParamsShouldBeInUrlAndValuesEncodedWhenMixedReplacementAndQueryBadId (line 2694) | [Fact]
    method NonFormattableQueryParamsShouldBeIncluded (line 2708) | [Fact]
    method MultipleParametersInTheSameSegmentAreGeneratedProperly (line 2722) | [Fact]
    method HardcodedHeadersShouldBeInHeaders (line 2735) | [Fact]
    method EmptyHardcodedHeadersShouldBeInHeaders (line 2756) | [Fact]
    method NullHardcodedHeadersShouldNotBeInHeaders (line 2774) | [Fact]
    method ReadStringContentWithMetadata (line 2791) | [Fact]
    method ContentHeadersCanBeHardcoded (line 2818) | [Fact]
    method DynamicHeaderShouldBeInHeaders (line 2834) | [Fact]
    method CustomDynamicHeaderShouldBeInHeaders (line 2845) | [Fact]
    method EmptyDynamicHeaderShouldBeInHeaders (line 2856) | [Fact]
    method NullDynamicHeaderShouldNotBeInHeaders (line 2867) | [Fact]
    method PathMemberAsCustomDynamicHeaderShouldBeInHeaders (line 2877) | [Fact]
    method AddCustomHeadersToRequestHeadersOnly (line 2893) | [Fact]
    method HeaderCollectionShouldBeInHeaders (line 2915) | [Theory]
    method LastWriteWinsWhenHeaderCollectionAndDynamicHeader (line 2958) | [Fact]
    method NullHeaderCollectionDoesntBlowUp (line 2994) | [Theory]
    method HeaderCollectionCanUnsetHeaders (line 3026) | [Fact]
    method DynamicRequestPropertiesShouldBeInProperties (line 3053) | [Theory]
    method OptionsFromSettingsShouldBeInProperties (line 3080) | [Fact]
    method InterfaceTypeShouldBeInProperties (line 3129) | [Fact]
    method RestMethodInfoShouldBeInProperties (line 3145) | [Fact]
    method DynamicRequestPropertiesWithDefaultKeysShouldBeInProperties (line 3177) | [Fact]
    method DynamicRequestPropertiesWithDuplicateKeyShouldOverwritePreviousProperty (line 3204) | [Fact]
    method HttpClientShouldPrefixedAbsolutePathToTheRequestUri (line 3229) | [Fact]
    method HttpClientForVoidMethodShouldPrefixedAbsolutePathToTheRequestUri (line 3251) | [Fact]
    method HttpClientShouldNotPrefixEmptyAbsolutePathToTheRequestUri (line 3273) | [Fact]
    method DontBlowUpWithDynamicAuthorizationHeaderAndContent (line 3292) | [Fact]
    method SuchFlexibleContentTypeWow (line 3305) | [Fact]
    method BodyContentGetsUrlEncoded (line 3321) | [Fact]
    method BodyContentGetsUrlEncodedWithCollectionFormat (line 3342) | [Fact]
    method FormFieldGetsAliased (line 3365) | [Fact]
    method CustomParmeterFormatter (line 3381) | [Fact]
    method QueryStringWithEnumerablesCanBeFormatted (line 3397) | [Fact]
    method QueryStringWithArrayCanBeFormatted (line 3413) | [Fact]
    method QueryStringWithArrayCanBeFormattedByAttribute (line 3429) | [Fact]
    method QueryStringWithArrayCanBeFormattedByAttributeWithMultiple (line 3441) | [Fact]
    method QueryStringWithArrayCanBeFormattedByDefaultSetting (line 3453) | [Fact]
    method DefaultCollectionFormatCanBeOverridenByQueryAttribute (line 3466) | [Fact]
    method RequestWithParameterInMultiplePlaces (line 3479) | [Fact]
    method RequestWithParameterInAQueryParameterMultipleTimes (line 3498) | [Fact]
    method QueryStringWithArrayFormatted (line 3512) | [Theory]
    method QueryStringWithArrayFormattedAsSsvAndItemsFormattedIndividually (line 3529) | [Fact]
    method QueryStringWithEnumerablesCanBeFormattedEnumerable (line 3548) | [Fact]
    method QueryStringWithEnumerableFormatted (line 3567) | [Theory]
    method QueryStringExcludesPropertiesWithPrivateGetters (line 3590) | [Fact]
    method QueryStringUsesEnumMemberAttribute (line 3605) | [Theory]
    method QueryStringUsesEnumMemberAttributeInTypeWithEnum (line 3622) | [Theory]
    method TestNullableQueryStringParams (line 3641) | [Theory]
    method TestNullableQueryStringParamsWithANull (line 3653) | [Theory]
    method TestNullableQueryStringParamsWithANullAndPathBoundObject (line 3665) | [Theory]
    method DefaultParameterFormatterIsInvariant (line 3687) | [Fact]
    method ICanPostAValueTypeIfIWantYoureNotTheBossOfMe (line 3701) | [Fact]
    method DeleteWithQuery (line 3713) | [Fact]
    method ClearWithQuery (line 3726) | [Fact]
    method MultipartPostWithAliasAndHeader (line 3739) | [Fact]
    method PostBlobByteWithAlias (line 3757) | [Fact]
    method QueryWithAliasAndHeadersWorks (line 3776) | [Fact]
    class RequestBuilderMock (line 3804) | class RequestBuilderMock : IRequestBuilder
      method BuildRestResultFuncForMethod (line 3808) | public Func<HttpClient, object[], object> BuildRestResultFuncForMethod(
    method CachedRequestBuilderCallInternalBuilderForParametersWithSameNamesButDifferentNamespaces (line 3819) | [Fact]
    method DictionaryQueryWithEnumKeyProducesCorrectQueryString (line 3847) | [Fact]
    method DictionaryQueryWithPrefix (line 3867) | [Fact]
    method DictionaryQueryWithNumericKeyProducesCorrectQueryString (line 3887) | [Fact]
    method DictionaryQueryWithCustomFormatterProducesCorrectQueryString (line 3903) | [Fact]
    method ComplexQueryObjectWithDefaultKeyFormatterProducesCorrectQueryString (line 3929) | [Fact]
    method ComplexQueryObjectWithCustomKeyFormatterProducesCorrectQueryString (line 3945) | [Fact]
    method ComplexQueryObjectWithAliasedDictionaryProducesCorrectQueryString (line 3967) | [Fact]
    method ComplexQueryObjectWithDictionaryProducesCorrectQueryString (line 3993) | [Fact]
    method ComplexQueryObjectWithDictionaryAndCustomFormatterProducesCorrectQueryString (line 4016) | [Fact]
  type Foo (line 4045) | public record Foo
  class RequestBuilderTestExtensions (line 4053) | static class RequestBuilderTestExtensions
    method BuildRequestFactoryForMethod (line 4055) | public static Func<object[], HttpRequestMessage> BuildRequestFactoryFo...
    method RunRequest (line 4075) | public static Func<object[], TestHttpMessageHandler> RunRequest(

FILE: Refit.Tests/ResponseTests.cs
  class TestAliasObject (line 21) | public class TestAliasObject
  class ResponseTests (line 31) | public class ResponseTests
    method ResponseTests (line 36) | public ResponseTests()
    type IMyAliasService (line 45) | public interface IMyAliasService
      method GetTestObject (line 47) | [Get("/aliasTest")]
      method GetApiResponseTestObject (line 50) | [Get("/GetApiResponseTestObject")]
      method GetIApiResponse (line 53) | [Get("/GetIApiResponse")]
    method JsonPropertyCanBeUsedToAliasFieldNamesInResponses (line 57) | [Fact]
    method AliasAsCannotBeUsedToAliasFieldNamesInResponses (line 76) | [Fact]
    method ThrowsValidationException (line 94) | [Fact]
    method When_BadRequest_EnsureSuccessStatusCodeAsync_ThrowsValidationException (line 134) | [Fact]
    method When_SerializationErrorOnSuccessStatusCode_IsSuccessful_ShouldReturnFalse (line 180) | [Fact]
    method When_SerializationErrorOnSuccessStatusCode_EnsureSuccesStatusCodeAsync_DoNotThrowApiException (line 202) | [Fact]
    method When_SerializationErrorOnSuccessStatusCode_EnsureSuccessfulAsync_ThrowsApiException (line 225) | [Fact]
    method WhenProblemDetailsResponseContainsExtensions_ShouldHydrateExtensions (line 248) | [Fact]
    method WithNonSeekableStream_UsingSystemTextJsonContentSerializer (line 304) | [Fact]
    method BadRequestWithEmptyContent_ShouldReturnApiException (line 368) | [Fact]
    method BadRequestWithEmptyContent_ShouldReturnApiResponse (line 385) | [Fact]
    method BadRequestWithStringContent_ShouldReturnIApiResponse (line 406) | [Fact]
    method ValidationApiException_HydratesBaseContent (line 427) | [Fact]
    method WithHtmlResponse_ShouldReturnApiException (line 455) | [Fact]
    method WithHtmlResponse_ShouldReturnApiResponse (line 474) | [Fact]
    method WithNonJsonResponseUsingNewtonsoftJsonContentSerializer_ShouldReturnApiException (line 496) | [Fact]
    method WithNonJsonResponseUsingNewtonsoftJsonContentSerializer_ShouldReturnApiResponse (line 525) | [Fact]
  class ThrowOnGetLengthMemoryStream (line 556) | public sealed class ThrowOnGetLengthMemoryStream : MemoryStream

FILE: Refit.Tests/RestService.cs
  class RootObject (line 20) | public class RootObject
  class BigObject (line 28) | public class BigObject
  type INpmJs (line 33) | [Headers("User-Agent: Refit Integration Tests")]
    method GetCongruence (line 36) | [Get("/congruence")]
  type IRequestBin (line 40) | public interface IRequestBin
    method Post (line 42) | [Post("/1h3a5jm1")]
    method PostRawStringDefault (line 45) | [Post("/foo")]
    method PostRawStringJson (line 48) | [Post("/foo")]
    method PostRawStringUrlEncoded (line 51) | [Post("/foo")]
    method PostGeneric (line 54) | [Post("/1h3a5jm1")]
    method PostVoidReturnBodyBuffered (line 57) | [Post("/foo")]
    method PostNonVoidReturnBodyBuffered (line 60) | [Post("/foo")]
    method PostBig (line 63) | [Post("/big")]
    method SomeApiThatUsesVariableNameFromCodeGen (line 66) | [Get("/foo/{arguments}")]
  type IApiBindPathToObject (line 70) | public interface IApiBindPathToObject
    method GetFooBars (line 72) | [Get("/foos/{request.someProperty}/bar/{request.someProperty2}")]
    method GetFooBarsWithDifferentCasing (line 75) | [Get("/foos/{Requestparams.SomeProperty}/bar/{requestParams.SoMeProPer...
    method GetBarsByFoo (line 78) | [Get("/foos/{id}/{request.someProperty}/bar/{request.someProperty2}")]
    method GetFooBars (line 81) | [Get("/foos/{someProperty}/bar/{request.someProperty2}")]
    method GetBarsByFoo (line 84) | [Get("/foos/{request.someProperty}/bar")]
    method GetBarsWithCustomQueryFormat (line 87) | [Get("/foo")]
    method GetFooBarsDerived (line 90) | [Get("/foos/{request.someProperty}/bar/{request.someProperty3}")]
    method GetFoos (line 93) | [Get("/foos/{request.values}")]
    method GetFoos2 (line 96) | [Get("/foos2/{values}")]
    method PostFooBar (line 99) | [Post("/foos/{request.someProperty}/bar/{request.someProperty2}")]
    method GetFooBars (line 102) | [Get("/foos/{request.someProperty}/bar/{request.someProperty2}")]
    method PostFooBar (line 105) | [Post("/foos/{request.someProperty}/bar/{request.someProperty2}")]
    method PostFooBarStreamPart (line 111) | [Multipart]
    method PostFooBarStreamPart (line 119) | [Multipart]
    method PostFooBarStreamPart (line 123) | [Multipart]
  class PathBoundList (line 131) | public class PathBoundList
  class PathBoundDerivedObject (line 136) | public class PathBoundDerivedObject : PathBoundObject
  class PathBoundObject (line 141) | public class PathBoundObject
  class PathBoundObjectWithQuery (line 148) | public class PathBoundObjectWithQuery
  class PathBoundObjectWithQueryFormat (line 158) | public class PathBoundObjectWithQueryFormat
  type INoRefitHereBuddy (line 164) | public interface INoRefitHereBuddy
    method Post (line 166) | Task Post();
  type IAmHalfRefit (line 169) | public interface IAmHalfRefit
    method Post (line 171) | [Post("/anything")]
    method Get (line 174) | Task Get();
  type IRefitInterfaceWithStaticMethod (line 177) | public interface IRefitInterfaceWithStaticMethod
    method Get (line 179) | [Get("")]
    method Create (line 183) | public static IRefitInterfaceWithStaticMethod Create()
  class ErrorResponse (line 192) | public class ErrorResponse
  type IHttpBinApi (line 197) | public interface IHttpBinApi<TResponse, in TParam, in THeader>
    method Get (line 201) | [Get("")]
    method GetQuery (line 204) | [Get("/get?hardcoded=true")]
    method PostQuery (line 207) | [Post("/post?hardcoded=true")]
    method GetQueryWithIncludeParameterName (line 210) | [Get("")]
    method GetQuery1 (line 213) | [Get("/get?hardcoded=true")]
  type IBrokenWebApi (line 217) | public interface IBrokenWebApi
    method PostAValue (line 219) | [Post("/what-spec")]
  type IHttpContentApi (line 223) | public interface IHttpContentApi
    method PostFileUpload (line 225) | [Post("/blah")]
    method PostFileUploadWithMetadata (line 228) | [Post("/blah")]
  type IStreamApi (line 232) | public interface IStreamApi
    method GetRemoteFile (line 234) | [Post("/{filename}")]
    method GetRemoteFileWithMetadata (line 237) | [Post("/{filename}")]
  type IApiWithDecimal (line 241) | public interface IApiWithDecimal
    method GetWithDecimal (line 243) | [Get("/withDecimal")]
  type IBodylessApi (line 247) | public interface IBodylessApi
    method Post (line 249) | [Post("/nobody")]
    method Get (line 253) | [Get("/nobody")]
    method Head (line 257) | [Head("/nobody")]
  type ITrimTrailingForwardSlashApi (line 262) | public interface ITrimTrailingForwardSlashApi
    method Get (line 266) | [Get("/someendpoint")]
  type IValidApi (line 270) | public interface IValidApi
    method Get (line 272) | [Get("/someendpoint")]
  type IQueryApi (line 276) | public interface IQueryApi
    method EmptyQuery (line 278) | [Get("/foo?")]
    method WhiteSpaceQuery (line 281) | [Get("/foo?     ")]
    method EmptyQueryKey (line 284) | [Get("/foo?=value")]
    method EmptyQueryValue (line 287) | [Get("/foo?key=")]
    method EmptyQueryKeyAndValue (line 290) | [Get("/foo?=")]
    method UnescapedQuery (line 293) | [Get("/foo?key,=value,&key1(=value1(")]
    method EscapedQuery (line 296) | [Get("/foo?key%2C=value%2C&key1%28=value1%28")]
    method ParameterMappedQuery (line 299) | [Get("/foo?{key}={value}")]
    method NullableIntCollectionQuery (line 302) | [Get("/foo")]
  type IFragmentApi (line 306) | public interface IFragmentApi
    method Fragment (line 308) | [Get("/foo#name")]
    method EmptyFragment (line 311) | [Get("/foo#")]
    method ManyFragments (line 314) | [Get("/foo#first#second")]
    method ParameterFragment (line 317) | [Get("/foo#{frag}")]
    method FragmentAfterQuery (line 320) | [Get("/foo?key=value#name")]
    method QueryAfterFragment (line 323) | [Get("/foo#?key=value")]
  type ICancellableApi (line 327) | public interface ICancellableApi
    method GetWithCancellation (line 329) | [Get("/foo")]
    method GetWithCancellationAndReturn (line 332) | [Get("/foo")]
    method GetWithNullableCancellation (line 335) | [Get("/foo")]
  class HttpBinGet (line 339) | public class HttpBinGet
  class RestServiceIntegrationTests (line 347) | public class RestServiceIntegrationTests
    method CanCreateInstanceUsingStaticMethod (line 350) | [Fact]
    method CanAddContentHeadersToPostWithoutBody (line 359) | [Fact]
    method GetWithNoParametersTest (line 382) | [Fact]
    method BaseAddressFromHttpClientMatchesTest (line 398) | [Fact]
    method BaseAddressWithTrailingSlashFromHttpClientMatchesTest (line 415) | [Fact]
    method BaseAddressWithTrailingSlashCalledBeforeFromHttpClientMatchesTest (line 432) | [Fact]
    method GetWithNoParametersTestTrailingSlashInBase (line 451) | [Fact]
    method GetWithPathBoundObject (line 467) | [Fact]
    method GetWithLongPathBoundObject (line 485) | [Fact]
    method GetWithPathBoundObjectDifferentCasing (line 504) | [Fact]
    method GetWithPathBoundObjectAndParameter (line 522) | [Fact]
    method GetWithPathBoundObjectAndParameterParameterPrecedence (line 541) | [Fact]
    method GetWithPathBoundDerivedObject (line 560) | [Fact]
    method GetWithDerivedObjectAsBaseType (line 585) | [Fact]
    method GetWithPathBoundObjectAndQueryParameter (line 616) | [Fact]
    method PostFooBarPathBoundObject (line 636) | [Fact]
    method PathBoundObjectsRespectFormatter (line 654) | [Fact]
    method GetWithPathBoundObjectAndQuery (line 678) | [Fact]
    method GetWithPathBoundObjectAndQueryWithFormat (line 701) | [Fact]
    method GetWithPathBoundObjectAndQueryObject (line 723) | [Fact]
    method PostFooBarPathMultipart (line 742) | [Fact]
    method PostFooBarPathQueryMultipart (line 762) | [Fact]
    method PostFooBarPathQueryObjectMultipart (line 787) | [Fact]
    method DoesntAddAutoAddContentToGetRequest (line 808) | [Fact]
    method DoesntAddAutoAddContentToHeadRequest (line 829) | [Fact]
    method GetWithDecimal (line 850) | [Fact]
    method HitTheGitHubUserApiAsApiResponse (line 870) | [Fact]
    method HitTheNonExistentApiAsApiResponse (line 917) | [Fact]
    method HitTheNonExistentApi (line 950) | [Fact]
    method HitTheGitHubUserApiAsObservableApiResponse (line 984) | [Fact]
    method HitTheGitHubUserApiAsObservableIApiResponse (line 1033) | [Fact]
    method HitTheGitHubUserApi (line 1082) | [Fact]
    method HitWithCamelCaseParameter (line 1112) | [Fact]
    method HitTheGitHubOrgMembersApi (line 1142) | [Fact]
    method HitTheGitHubOrgMembersApiInParallel (line 1175) | [Fact]
    method RequestCanceledBeforeResponseRead (line 1220) | [Fact]
    method HitTheGitHubUserSearchApi (line 1264) | [Fact]
    method HitTheGitHubUserApiAsObservable (line 1297) | [Fact]
    method HitTheGitHubUserApiAsObservableAndSubscribeAfterTheFact (line 1327) | [Fact]
    method TwoSubscriptionsResultInTwoRequests (line 1359) | [Fact]
    method ShouldRetHttpResponseMessage (line 1386) | [Fact]
    method ShouldRetHttpResponseMessageWithNestedInterface (line 1411) | [Fact]
    method HitTheNpmJs (line 1439) | [Fact]
    method PostToRequestBin (line 1461) | [Fact]
    method PostStringDefaultToRequestBin (line 1477) | [Fact]
    method PostStringJsonToRequestBin (line 1496) | [Fact]
    method PostStringUrlToRequestBin (line 1516) | [Fact]
    method PostToRequestBinWithGenerics (line 1536) | [Fact]
    method PostWithVoidReturnBufferedBodyExpectContentLengthHeader (line 1560) | [Fact]
    method PostWithNonVoidReturnBufferedBodyExpectContentLengthHeader (line 1581) | [Fact]
    method UseMethodWithArgumentsParameter (line 1605) | [Fact]
    method CanGetDataOutOfErrorResponses (line 1623) | [Fact]
    method CanSerializeBigData (line 1663) | [Fact]
    method ErrorsFromApiReturnErrorContent (line 1707) | [Fact]
    method ErrorsFromApiReturnErrorContentWhenApiResponse (line 1747) | [Fact]
    method NonRefitInterfacesThrowMeaningfulExceptions (line 1785) | [Fact]
    method NonRefitMethodsThrowMeaningfulExceptions (line 1800) | [Fact]
    method GenericsWork (line 1814) | [Fact]
    method ValueTypesArentValidButTheyWorkAnyway (line 1844) | [Fact]
    method MissingBaseUrlThrowsArgumentException (line 1858) | [Fact]
    method SimpleDynamicQueryparametersTest (line 1873) | [Fact]
    method ComplexDynamicQueryparametersTest (line 1901) | [Fact]
    method ComplexPostDynamicQueryparametersTest (line 1939) | [Fact]
    method GenericMethodTest (line 1977) | [Fact]
    method InheritedMethodTest (line 2028) | [Fact]
    method InheritedInterfaceWithOnlyBaseMethodsTest (line 2059) | [Fact]
    method InheritedInterfaceWithoutRefitInBaseMethodsTest (line 2083) | [Fact]
    method InheritedInterfaceWithoutRefitMethodsOverrideBaseTest (line 2116) | [Fact]
    method DictionaryDynamicQueryParametersTest (line 2144) | [Fact]
    method ComplexDynamicQueryparametersTestWithIncludeParameterName (line 2177) | [Fact]
    method ServiceOutsideNamespaceGetRequest (line 2207) | [Fact]
    method ServiceOutsideNamespacePostRequest (line 2228) | [Fact]
    method CanSerializeContentAsXml (line 2243) | [Fact]
    method ShouldTrimTrailingForwardSlashFromBaseUrl (line 2278) | [Fact]
    method ShouldThrowArgumentExceptionIfHostUrlIsNull (line 2289) | [Fact]
    method ShouldThrowArgumentExceptionIfHostUrlIsEmpty (line 2305) | [Fact]
    method ShouldThrowArgumentExceptionIfHostUrlIsWhitespace (line 2321) | [Fact]
    method NonGenericCreate (line 2337) | [Fact]
    method EmptyQueryShouldBeEmpty (line 2350) | [Fact]
    method WhiteSpaceQueryShouldBeEmpty (line 2368) | [Fact]
    method EmptyQueryKeyShouldBeEmpty (line 2386) | [Fact]
    method EmptyQueryValueShouldNotBeEmpty (line 2404) | [Fact]
    method EmptyQueryKeyAndValueShouldBeEmpty (line 2422) | [Fact]
    method UnescapedQueryShouldBeEscaped (line 2440) | [Fact]
    method EscapedQueryShouldStillBeEscaped (line 2458) | [Fact]
    method ParameterMappedQueryShouldWork (line 2476) | [Fact]
    method ParameterMappedQueryShouldEscape (line 2494) | [Fact]
    method NullableIntCollectionQuery (line 2512) | [Fact]
    method ShouldStripFragment (line 2530) | [Fact]
    method ShouldStripEmptyFragment (line 2547) | [Fact]
    method ShouldStripManyFragments (line 2564) | [Fact]
    method ShouldStripParameterFragment (line 2581) | [Fact]
    method ShouldStripFragmentAfterQuery (line 2598) | [Fact]
    method ShouldStripQueryAfterFragment (line 2616) | [Fact]
    method TaskShouldCancelWhenRequested (line 2633) | [Fact]
    method TaskResultShouldCancelWhenRequested (line 2646) | [Fact]
    method NullableCancellationTokenShouldBeIgnored (line 2660) | [Fact]
    method TypeCollisionTest (line 2677) | [Fact]
    method GetTestFileStream (line 2702) | internal static Stream GetTestFileStream(string relativeFilePath)
    method SameTypeNameInMultipleNamespacesTest (line 2739) | [Fact]
    method AssertStackTraceContains (line 2771) | private static void AssertStackTraceContains(string expectedSubstring,...

FILE: Refit.Tests/RestServiceExceptions.cs
  type IManyCancellationTokens (line 6) | public interface IManyCancellationTokens
    method GetValue (line 8) | [Get("/")]
  type IManyHeaderCollections (line 12) | public interface IManyHeaderCollections
    method GetValue (line 14) | [Get("/")]
  type IHeaderCollectionWrongType (line 18) | public interface IHeaderCollectionWrongType
    method GetValue (line 20) | [Get("/")]
  type IDoesNotStartSlash (line 24) | public interface IDoesNotStartSlash
    method GetValue (line 26) | [Get("users")]
  type IUrlContainsCRLF (line 30) | public interface IUrlContainsCRLF
    method GetValue (line 32) | [Get("/\r")]
  type IRoundTripNotString (line 36) | public interface IRoundTripNotString
    method GetValue (line 38) | [Get("/{**value}")]
  type IRoundTrippingLeadingWhitespace (line 42) | public interface IRoundTrippingLeadingWhitespace
    method GetValue (line 44) | [Get("/{ **path}")]
  type IRoundTrippingTrailingWhitespace (line 48) | public interface IRoundTrippingTrailingWhitespace
    method GetValue (line 50) | [Get("/{** path}")]
  type IInvalidParamSubstitution (line 54) | public interface IInvalidParamSubstitution
    method GetValue (line 56) | [Get("/{/path}")]
  type IInvalidFragmentParamSubstitution (line 60) | public interface IInvalidFragmentParamSubstitution
    method GetValue (line 62) | [Get("/{#path}")]
  type IUrlNoMatchingParameters (line 66) | public interface IUrlNoMatchingParameters
    method GetValue (line 68) | [Get("/{value}")]
  type IMultipartAndBody (line 72) | public interface IMultipartAndBody
    method GetValue (line 74) | [Get("/}")]
  type IManyBody (line 79) | public interface IManyBody
    method GetValue (line 81) | [Get("/")]
  class UserBody (line 85) | public class UserBody
  type IManyComplexTypes (line 90) | public interface IManyComplexTypes
    method PostValue (line 92) | [Post("/")]
  type IManyAuthorize (line 96) | public interface IManyAuthorize
    method GetValue (line 98) | [Get("/")]
  type IInvalidReturnType (line 102) | public interface IInvalidReturnType
    method GetValue (line 104) | [Get("/")]
  class RestServiceExceptionTests (line 108) | public class RestServiceExceptionTests
    method ManyCancellationTokensShouldThrow (line 110) | [Fact]
    method ManyHeaderCollectionShouldThrow (line 117) | [Fact]
    method InvalidHeaderCollectionTypeShouldThrow (line 124) | [Fact]
    method UrlDoesntStartWithSlashShouldThrow (line 131) | [Fact]
    method UrlContainsCRLFShouldThrow (line 138) | [Fact]
    method RoundTripParameterNotStringShouldThrow (line 145) | [Fact]
    method RoundTripWithLeadingWhitespaceShouldThrow (line 152) | [Fact]
    method RoundTripWithTrailingWhitespaceShouldThrow (line 159) | [Fact]
    method InvalidParamSubstitutionShouldThrow (line 166) | [Fact]
    method InvalidFragmentParamSubstitutionShouldThrow (line 175) | [Fact]
    method UrlNoMatchingParameterShouldThrow (line 182) | [Fact]
    method MultipartAndBodyShouldThrow (line 189) | [Fact]
    method ManyBodyShouldThrow (line 196) | [Fact]
    method ManyComplexTypesShouldThrow (line 203) | [Fact]
    method ManyAuthorizeAttributesShouldThrow (line 210) | [Fact]
    method InvalidReturnTypeShouldThrow (line 217) | [Fact]
    method AssertExceptionContains (line 224) | private static void AssertExceptionContains(string expectedSubstring, ...

FILE: Refit.Tests/SerializedContentTests.cs
  class SerializedContentTests (line 18) | public partial class SerializedContentTests
    method WhenARequestRequiresABodyThenItDoesNotDeadlock (line 22) | [Theory]
    method WhenARequestRequiresABodyThenItIsSerialized (line 53) | [Theory]
    method VerityDefaultSerializer (line 105) | [Fact]
    method RunTaskWithATimeLimit (line 122) | static async Task<Task<User>> RunTaskWithATimeLimit(Task<User> fixture...
    class MockPushStreamContentHttpMessageHandler (line 129) | class MockPushStreamContentHttpMessageHandler : HttpMessageHandler
      method SendAsync (line 133) | protected override async Task<HttpResponseMessage> SendAsync(
    method StreamDeserialization_UsingSystemTextJsonContentSerializer (line 148) | [Fact]
    method StreamDeserialization_UsingSystemTextJsonContentSerializer_SetsCorrectHeaders (line 168) | [Fact]
    method StreamDeserialization_UsingNewtonsoftJsonContentSerializer_DoesNotUseSynchronousReads (line 186) | [Fact]
    method StreamDeserialization_UsingNewtonsoftJsonContentSerializer_ReturnsDefaultForNullContent (line 198) | [Fact]
    method NewtonsoftJsonContentSerializer_GetFieldNameForProperty_ReturnsJsonPropertyName (line 208) | [Fact]
    method NewtonsoftJsonContentSerializer_GetFieldNameForProperty_ReturnsNullWithoutJsonPropertyAttribute (line 221) | [Fact]
    method NewtonsoftJsonContentSerializer_GetFieldNameForProperty_ThrowsForNullProperty (line 234) | [Fact]
    method SystemTextJsonContentSerializer_GetFieldNameForProperty_ReturnsJsonPropertyName (line 244) | [Fact]
    method SystemTextJsonContentSerializer_GetFieldNameForProperty_ReturnsNullWithoutJsonPropertyNameAttribute (line 257) | [Fact]
    method SystemTextJsonContentSerializer_GetFieldNameForProperty_ThrowsForNullProperty (line 270) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_InferBooleanObjectValues (line 280) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_InferIntegralObjectValues (line 291) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_InferFloatingPointObjectValues (line 302) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_InferDateObjectValues (line 313) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_InferStringObjectValues (line 327) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeObjectValuesAsJsonElements (line 338) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_SerializeObjectEnumValuesAsCamelCase (line 349) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_SerializeNullObjectValuesAsJsonNull (line 360) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_UseResolverWhenSerializingObjectValues (line 371) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeCamelCaseEnumValues (line 391) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeCaseInsensitiveEnumValues (line 402) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeLowercaseEnumValues (line 413) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeNumericEnumValues (line 424) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeNullNullableEnumValues (line 435) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_DeserializeEmptyNullableEnumValues (line 446) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_ThrowForNullNonNullableEnumValues (line 457) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_ThrowForEmptyNonNullableEnumValues (line 468) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_ThrowForInvalidEnumValues (line 479) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_ThrowForUnexpectedTokensWhenParsingEnums (line 490) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_SerializeUndefinedEnumValuesAsNumbers (line 501) | [Fact]
    method SystemTextJsonContentSerializer_DefaultOptions_SerializeLowercaseEnumNamesUnchanged (line 512) | [Fact]
    method SystemTextJsonContentSerializer_UsesSourceGeneratedMetadataWhenProvided (line 523) | [Fact]
    method RestService_CanUseSourceGeneratedSystemTextJsonMetadata (line 549) | [Fact]
    class SerializedContentJsonSerializerContext (line 584) | [JsonSerializable(typeof(User))]
    class ObjectValueContainerJsonSerializerContext (line 587) | [JsonSerializable(typeof(ObjectValueContainer))]
    class TrackingTypeInfoResolver (line 591) | sealed class TrackingTypeInfoResolver(IJsonTypeInfoResolver innerResol...
      method GetTypeInfo (line 595) | public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions op...
    class StubHttpMessageHandler (line 602) | sealed class StubHttpMessageHandler(Func<HttpRequestMessage, HttpRespo...
      method SendAsync (line 605) | protected override Task<HttpResponseMessage> SendAsync(
    class NewtonsoftFieldNameModel (line 611) | sealed class NewtonsoftFieldNameModel
    class SystemTextFieldNameModel (line 619) | sealed class SystemTextFieldNameModel
    class ObjectValueContainer (line 627) | public sealed class ObjectValueContainer
    type CamelCaseEnum (line 632) | enum CamelCaseEnum
    class AsyncOnlyJsonContent (line 638) | sealed class AsyncOnlyJsonContent(string json) : HttpContent
      method SerializeToStreamAsync (line 642) | protected override Task SerializeToStreamAsync(Stream stream, Transp...
      method TryComputeLength (line 645) | protected override bool TryComputeLength(out long length)
      method CreateContentReadStreamAsync (line 651) | protected override Task<Stream> CreateContentReadStreamAsync() =>
    class AsyncOnlyReadStream (line 655) | sealed class AsyncOnlyReadStream(byte[] bytes) : Stream
      method Flush (line 670) | public override void Flush() => _inner.Flush();
      method Read (line 672) | public override int Read(byte[] buffer, int offset, int count) =>
      method ReadAsync (line 675) | public override ValueTask<int> ReadAsync(
      method ReadAsync (line 680) | public override Task<int> ReadAsync(
      method Seek (line 687) | public override long Seek(long offset, SeekOrigin origin) => _inner....
      method SetLength (line 689) | public override void SetLength(long value) => throw new NotSupported...
      method Write (line 691) | public override void Write(byte[] buffer, int offset, int count) =>

FILE: Refit.Tests/TypeCollisionApiA.cs
  type ITypeCollisionApiA (line 7) | public interface ITypeCollisionApiA
    method SomeARequest (line 9) | [Get("")]
  class TypeCollisionApiA (line 13) | public static class TypeCollisionApiA
    method Create (line 15) | public static ITypeCollisionApiA Create()

FILE: Refit.Tests/TypeCollisionApiB.cs
  type ITypeCollisionApiB (line 7) | public interface ITypeCollisionApiB
    method SomeBRequest (line 9) | [Get("")]
  class TypeCollisionApiB (line 13) | public static class TypeCollisionApiB
    method Create (line 15) | public static ITypeCollisionApiB Create()

FILE: Refit.Tests/UniqueNameTests.cs
  class Client (line 8) | class Client
    class Request (line 10) | public class Request { }
    class Response (line 12) | public class Response { }
  class Client (line 18) | class Client { }
    class Request (line 10) | public class Request { }
    class Response (line 12) | public class Response { }
  class UniqueNameTests (line 21) | public class UniqueNameTests
    method SystemTypeAndLanguageTypeHaveSameNames (line 23) | [Fact]
    method GenericClassWithDifferentTypesHaveUniqueNames (line 32) | [Fact]
    method SameClassNameInDifferentNamespacesHaveUniqueNames (line 41) | [Fact]
    method ClassesWithNestedClassesHaveUniqueNames (line 50) | [Fact]
    method NestedClassesHaveUniqueNames (line 59) | [Fact]

FILE: Refit.Tests/UseCultureAttribute.cs
  class UseCultureAttribute (line 16) | [AttributeUsage(
    method UseCultureAttribute (line 40) | public UseCultureAttribute(string culture)
    method UseCultureAttribute (line 49) | public UseCultureAttribute(string culture, string uiCulture)
    method Before (line 77) | public override void Before(MethodInfo methodUnderTest)
    method After (line 91) | public override void After(MethodInfo methodUnderTest)

FILE: Refit.Tests/Verifiers/CSharpIncrementalSourceGeneratorVerifier`1+Test.cs
  class CSharpIncrementalSourceGeneratorVerifier (line 9) | public static partial class CSharpIncrementalSourceGeneratorVerifier<TIn...
    class Test (line 12) | public class Test : CSharpSourceGeneratorTest<EmptySourceGeneratorProv...
      method Test (line 14) | public Test()
      method GetSourceGenerators (line 39) | protected override IEnumerable<Type> GetSourceGenerators()
      method CreateParseOptions (line 48) | protected override ParseOptions CreateParseOptions()

FILE: Refit.Tests/Verifiers/CSharpSourceGeneratorVerifier`1+Test.cs
  class CSharpSourceGeneratorVerifier (line 8) | public static partial class CSharpSourceGeneratorVerifier<TSourceGenerator>
    class Test (line 11) | public class Test : CSharpSourceGeneratorTest<TSourceGenerator, Defaul...
      method Test (line 13) | public Test()

FILE: Refit.Tests/Verifiers/CSharpVerifierHelper.cs
  class CSharpVerifierHelper (line 8) | static class CSharpVerifierHelper
    method GetNullableWarningsFromCompiler (line 20) | static ImmutableDictionary<string, ReportDiagnostic> GetNullableWarnin...

FILE: Refit.Tests/XmlContentSerializerTests.cs
  class XmlContentSerializerTests (line 12) | public class XmlContentSerializerTests
    class Dto (line 14) | public class Dto
    method MediaTypeShouldBeApplicationXmlAsync (line 24) | [Fact]
    method ShouldSerializeToXml (line 35) | [Fact]
    method ShouldSerializeToXmlUsingAttributeOverrides (line 58) | [Fact]
    method ShouldSerializeToXmlUsingNamespaceOverrides (line 79) | [Fact]
    method ShouldDeserializeFromXmlAsync (line 99) | [Fact]
    method XmlEncodingShouldMatchWriterSettingAsync (line 115) | [Fact]
    method BuildDto (line 135) | static Dto BuildDto()

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.FindInterfacesSmokeTest#Generated.g.verified.cs
  class Generated (line 8) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
    method Initialize (line 16) | [System.Runtime.CompilerServices.ModuleInitializer]

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApi.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitTestsIGitHubApi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitTestsIGitHubApi (line 24) | public RefitTestsIGitHubApi(global::System.Net.Http.HttpClient clien...
      method GetUser (line 34) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method GetUserObservable (line 45) | public global::System.IObservable<global::Refit.Tests.User> GetUserO...
      method GetUserCamelCase (line 56) | public global::System.IObservable<global::Refit.Tests.User> GetUserC...
      method GetOrgMembers (line 67) | public async global::System.Threading.Tasks.Task<global::System.Coll...
      method FindUsers (line 78) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method GetIndex (line 87) | public async global::System.Threading.Tasks.Task<global::System.Net....
      method GetIndexObservable (line 96) | public global::System.IObservable<string> GetIndexObservable()
      method NothingToSeeHere (line 105) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method NothingToSeeHereWithMetadata (line 114) | public async global::System.Threading.Tasks.Task<global::Refit.ApiRe...
      method GetUserWithMetadata (line 125) | public async global::System.Threading.Tasks.Task<global::Refit.ApiRe...
      method GetUserObservableWithMetadata (line 136) | public global::System.IObservable<global::Refit.ApiResponse<global::...
      method GetUserIApiResponseObservableWithMetadata (line 147) | public global::System.IObservable<global::Refit.IApiResponse<global:...
      method CreateUser (line 158) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method CreateUserWithMetadata (line 169) | public async global::System.Threading.Tasks.Task<global::Refit.ApiRe...

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.FindInterfacesSmokeTest#IGitHubApiDisposable.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitTestsIGitHubApiDisposable (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitTestsIGitHubApiDisposable (line 24) | public RefitTestsIGitHubApiDisposable(global::System.Net.Http.HttpCl...
      method RefitMethod (line 32) | public async global::System.Threading.Tasks.Task RefitMethod()
      method Dispose (line 41) | void global::System.IDisposable.Dispose()

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.FindInterfacesSmokeTest#INestedGitHubApi.g.verified.cs
  class Generated (line 7) | partial class Generated
    class RefitTestsTestNestedINestedGitHubApi (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method RefitTestsTestNestedINestedGitHubApi (line 24) | public RefitTestsTestNestedINestedGitHubApi(global::System.Net.Http....
      method GetUser (line 34) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method GetUserObservable (line 45) | public global::System.IObservable<global::Refit.Tests.User> GetUserO...
      method GetUserCamelCase (line 56) | public global::System.IObservable<global::Refit.Tests.User> GetUserC...
      method GetOrgMembers (line 67) | public async global::System.Threading.Tasks.Task<global::System.Coll...
      method FindUsers (line 78) | public async global::System.Threading.Tasks.Task<global::Refit.Tests...
      method GetIndex (line 87) | public async global::System.Threading.Tasks.Task<global::System.Net....
      method GetIndexObservable (line 96) | public global::System.IObservable<string> GetIndexObservable()
      method NothingToSeeHere (line 105) | public async global::System.Threading.Tasks.Task NothingToSeeHere()

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.FindInterfacesSmokeTest#PreserveAttribute.g.verified.cs
  class PreserveAttribute (line 6) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#Generated.g.verified.cs
  class Generated (line 8) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
    method Initialize (line 16) | [System.Runtime.CompilerServices.ModuleInitializer]

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#IServiceWithoutNamespace.g.verified.cs
  class Generated (line 7) | partial class Generated
    class IServiceWithoutNamespace (line 11) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
      method IServiceWithoutNamespace (line 24) | public IServiceWithoutNamespace(global::System.Net.Http.HttpClient c...
      method GetRoot (line 32) | public async global::System.Threading.Tasks.Task GetRoot()
      method PostRoot (line 41) | public async global::System.Threading.Tasks.Task PostRoot()

FILE: Refit.Tests/_snapshots/InterfaceStubGeneratorTests.GenerateInterfaceStubsWithoutNamespaceSmokeTest#PreserveAttribute.g.verified.cs
  class PreserveAttribute (line 6) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]

FILE: Refit.Xml/XmlContentSerializer.cs
  class XmlContentSerializer (line 23) | public class XmlContentSerializer(XmlContentSerializerSettings settings)...
    method XmlContentSerializer (line 31) | public XmlContentSerializer()
    method ToHttpContent (line 41) | public HttpContent ToHttpContent<T>(T item)
    method FromHttpContentAsync (line 71) | public async Task<T?> FromHttpContentAsync<T>(
    method GetFieldNameForProperty (line 100) | public string? GetFieldNameForProperty(PropertyInfo propertyInfo)
  class XmlReaderWriterSettings (line 119) | public class XmlReaderWriterSettings
    method XmlReaderWriterSettings (line 127) | public XmlReaderWriterSettings()
    method XmlReaderWriterSettings (line 134) | public XmlReaderWriterSettings(XmlReaderSettings readerSettings)
    method XmlReaderWriterSettings (line 141) | public XmlReaderWriterSettings(XmlWriterSettings writerSettings)
    method XmlReaderWriterSettings (line 150) | public XmlReaderWriterSettings(
    method ApplyOverrideSettings (line 199) | void ApplyOverrideSettings()
  class XmlContentSerializerSettings (line 209) | public class XmlContentSerializerSettings
    method XmlContentSerializerSettings (line 214) | public XmlContentSerializerSettings()

FILE: Refit/AnonymousDisposable.cs
  class AnonymousDisposable (line 3) | sealed class AnonymousDisposable(Action block) : IDisposable
    method Dispose (line 5) | public void Dispose()

FILE: Refit/AotCompatibility.cs
  class AotCompatibility (line 9) | internal static class AotCompatibility

FILE: Refit/ApiException.cs
  class ApiException (line 11) | [Serializable]
    method ApiException (line 80) | protected ApiException(
    method ApiException (line 114) | protected ApiException(
    method GetContentAsAsync (line 141) | public async Task<T?> GetContentAsAsync<T>() =>
    method Create (line 158) | public static Task<ApiException> Create(
    method Create (line 194) | public static async Task<ApiException> Create(
    method CreateMessage (line 256) | static string CreateMessage(HttpStatusCode statusCode, string? reasonP...

FILE: Refit/ApiResponse.cs
  class ApiResponse (line 8) | static class ApiResponse
    method Create (line 10) | internal static T Create<T, TBody>(
  method Dispose (line 117) | public void Dispose()
  method EnsureSuccessStatusCodeAsync (line 127) | public async Task<ApiResponse<T>> EnsureSuccessStatusCodeAsync()
  method EnsureSuccessfulAsync (line 142) | public async Task<ApiResponse<T>> EnsureSuccessfulAsync()
  method Dispose (line 152) | void Dispose(bool disposing)
  method ThrowsApiExceptionAsync (line 162) | private async Task<ApiException> ThrowsApiExceptionAsync()
  type IApiResponse (line 182) | public interface IApiResponse<out T> : IApiResponse

FILE: Refit/Attributes.cs
  class HttpMethodAttribute (line 13) | public abstract class HttpMethodAttribute(string path) : Attribute
  class GetAttribute (line 39) | [AttributeUsage(AttributeTargets.Method)]
  class PostAttribute (line 59) | [AttributeUsage(AttributeTargets.Method)]
  class PutAttribute (line 78) | [AttributeUsage(AttributeTargets.Method)]
  class DeleteAttribute (line 97) | [AttributeUsage(AttributeTargets.Method)]
  class PatchAttribute (line 116) | [AttributeUsage(AttributeTargets.Method)]
  class OptionsAttribute (line 135) | [AttributeUsage(AttributeTargets.Method)]
  class HeadAttribute (line 154) | [AttributeUsage(AttributeTargets.Method)]
  class MultipartAttribute (line 176) | [AttributeUsage(AttributeTargets.Method)]
  type BodySerializationMethod (line 191) | public enum BodySerializationMethod
  class BodyAttribute (line 226) | [AttributeUsage(AttributeTargets.Parameter)]
    method BodyAttribute (line 232) | public BodyAttribute() { }
    method BodyAttribute (line 238) | public BodyAttribute(bool buffered) => Buffered = buffered;
    method BodyAttribute (line 245) | public BodyAttribute(BodySerializationMethod serializationMethod, bool...
    method BodyAttribute (line 255) | public BodyAttribute(
  class AliasAsAttribute (line 287) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
  class AttachmentNameAttribute (line 303) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
  class HeaderCollectionAttribute (line 322) | [AttributeUsage(AttributeTargets.Parameter)]
  class HeadersAttribute (line 332) | [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method)]
  class HeaderAttribute (line 351) | [AttributeUsage(AttributeTargets.Parameter)]
  class PropertyAttribute (line 368) | [AttributeUsage(AttributeTargets.Parameter)]
    method PropertyAttribute (line 374) | public PropertyAttribute() { }
    method PropertyAttribute (line 380) | public PropertyAttribute(string key)
  class AuthorizeAttribute (line 401) | [AttributeUsage(AttributeTargets.Parameter)]
  class QueryAttribute (line 416) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]...
    method QueryAttribute (line 424) | public QueryAttribute() { }
    method QueryAttribute (line 430) | public QueryAttribute(string delimiter)
    method QueryAttribute (line 440) | public QueryAttribute(string delimiter, string prefix)
    method QueryAttribute (line 452) | public QueryAttribute(string delimiter, string prefix, string format)
    method QueryAttribute (line 463) | public QueryAttribute(CollectionFormat collectionFormat)
  class QueryUriFormatAttribute (line 545) | [AttributeUsage(AttributeTargets.Method)]

FILE: Refit/AuthenticatedHttpClientHandler.cs
  class AuthenticatedHttpClientHandler (line 6) | class AuthenticatedHttpClientHandler : DelegatingHandler
    method AuthenticatedHttpClientHandler (line 21) | public AuthenticatedHttpClientHandler(
    method AuthenticatedHttpClientHandler (line 42) | public AuthenticatedHttpClientHandler(
    method SendAsync (line 52) | protected override async Task<HttpResponseMessage> SendAsync(

FILE: Refit/Buffers/PooledBufferWriter.Stream.NETStandard21.cs
  class PooledBufferWriter (line 12) | internal sealed partial class PooledBufferWriter
    class PooledMemoryStream (line 14) | private sealed partial class PooledMemoryStream : Stream
      method CopyToInternalAsync (line 17) | public Task CopyToInternalAsync(Stream destination, CancellationToke...
      method ReadAsync (line 32) | public override ValueTask<int> ReadAsync(
      method Read (line 59) | public override int Read(Span<byte> buffer)

FILE: Refit/Buffers/PooledBufferWriter.Stream.cs
  class PooledBufferWriter (line 7) | internal sealed partial class PooledBufferWriter
    class PooledMemoryStream (line 12) | private sealed partial class PooledMemoryStream : Stream
      method PooledMemoryStream (line 32) | public PooledMemoryStream(PooledBufferWriter writer)
      method Flush (line 66) | public override void Flush() { }
      method FlushAsync (line 69) | public override Task FlushAsync(CancellationToken cancellationToken)
      method CopyToAsync (line 80) | public override Task CopyToAsync(
      method Read (line 111) | public override int Read(byte[] buffer, int offset, int count)
      method ReadAsync (line 144) | public override Task<int> ReadAsync(
      method ReadByte (line 173) | public override int ReadByte()
      method Seek (line 187) | public override long Seek(long offset, SeekOrigin origin)
      method SetLength (line 195) | public override void SetLength(long value)
      method Write (line 201) | public override void Write(byte[] buffer, int offset, int count)
      method Dispose (line 207) | protected override void Dispose(bool disposing)

FILE: Refit/Buffers/PooledBufferWriter.ThrowExceptions.cs
  class PooledBufferWriter (line 5) | internal sealed partial class PooledBufferWriter
    method ThrowArgumentOutOfRangeExceptionForNegativeCount (line 10) | [MethodImpl(MethodImplOptions.NoInlining)]
    method ThrowArgumentOutOfRangeExceptionForNegativeOffset (line 19) | [MethodImpl(MethodImplOptions.NoInlining)]
    method ThrowArgumentOutOfRangeExceptionForAdvancedTooFar (line 28) | [MethodImpl(MethodImplOptions.NoInlining)]
    method ThrowArgumentOutOfRangeExceptionForEndOfStreamReached (line 37) | [MethodImpl(MethodImplOptions.NoInlining)]
    method ThrowObjectDisposedException (line 46) | [MethodImpl(MethodImplOptions.NoInlining)]
    method ThrowNotSupportedException (line 55) | [MethodImpl(MethodImplOptions.NoInlining)]

FILE: Refit/Buffers/PooledBufferWriter.cs
  class PooledBufferWriter (line 9) | sealed partial class PooledBufferWriter : IBufferWriter<byte>, IDisposable
    method PooledBufferWriter (line 29) | public PooledBufferWriter()
    method Advance (line 36) | public void Advance(int count)
    method GetMemory (line 47) | public Memory<byte> GetMemory(int sizeHint = 0)
    method GetSpan (line 55) | public Span<byte> GetSpan(int sizeHint = 0)
    method EnsureFreeCapacity (line 66) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
    method Dispose (line 94) | public void Dispose()
    method DetachStream (line 106) | public Stream DetachStream()

FILE: Refit/CachedRequestBuilderImplementation.cs
  class CachedRequestBuilderImplementation (line 9) | class CachedRequestBuilderImplementation<T>
    method CachedRequestBuilderImplementation (line 13) | public CachedRequestBuilderImplementation(IRequestBuilder<T> innerBuil...
    method CachedRequestBuilderImplementation (line 19) | public CachedRequestBuilderImplementation(IRequestBuilder innerBuilder)
    method BuildRestResultFuncForMethod (line 32) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
  class CachedRequestBuilderImplementation (line 17) | class CachedRequestBuilderImplementation : IRequestBuilder
    method CachedRequestBuilderImplementation (line 13) | public CachedRequestBuilderImplementation(IRequestBuilder<T> innerBuil...
    method CachedRequestBuilderImplementation (line 19) | public CachedRequestBuilderImplementation(IRequestBuilder innerBuilder)
    method BuildRestResultFuncForMethod (line 32) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
  type MethodTableKey (line 71) | internal readonly struct MethodTableKey : IEquatable<MethodTableKey>
    method MethodTableKey (line 79) | public MethodTableKey (string methodName, Type[] parameters, Type[] ge...
    method GetHashCode (line 101) | public override int GetHashCode()
    method Equals (line 120) | public bool Equals(MethodTableKey other)
    method Equals (line 148) | public override bool Equals(object? obj) => obj is MethodTableKey othe...

FILE: Refit/CamelCaseUrlParameterKeyFormatter.cs
  class CamelCaseUrlParameterKeyFormatter (line 6) | public class CamelCaseUrlParameterKeyFormatter : IUrlParameterKeyFormatter
    method Format (line 13) | public string Format(string key)
    method FixCasing (line 37) | private static void FixCasing(Span<char> chars)

FILE: Refit/CloseGenericMethodKey.cs
  type CloseGenericMethodKey (line 5) | readonly struct CloseGenericMethodKey : IEquatable<CloseGenericMethodKey>
    method CloseGenericMethodKey (line 7) | internal CloseGenericMethodKey(MethodInfo openMethodInfo, Type[] types)
    method Equals (line 16) | public bool Equals(CloseGenericMethodKey other) =>
    method Equals (line 19) | public override bool Equals(object? obj)
    method GetHashCode (line 28) | public override int GetHashCode()

FILE: Refit/CollectionFormat.cs
  type CollectionFormat (line 6) | public enum CollectionFormat

FILE: Refit/DynamicallyAccessedMembersAttribute.cs
  class DynamicallyAccessedMembersAttribute (line 26) | internal sealed class DynamicallyAccessedMembersAttribute : Attribute
    method DynamicallyAccessedMembersAttribute (line 33) | public DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTy...
  type DynamicallyAccessedMemberTypes (line 45) | [Flags]

FILE: Refit/EnumerableExtensions.cs
  class EnumerableExtensions (line 3) | internal static class EnumerableExtensions
    method TryGetSingle (line 5) | internal static EnumerablePeek TryGetSingle<T>(this IEnumerable<T> enu...
  class EmptyDictionary (line 22) | internal static class EmptyDictionary<TKey, TValue> where TKey : notnull
    method Get (line 26) | internal static Dictionary<TKey, TValue> Get() => Value;
  type EnumerablePeek (line 29) | internal enum EnumerablePeek

FILE: Refit/FormValueMultimap.cs
  class FormValueMultimap (line 12) | class FormValueMultimap : IEnumerable<KeyValuePair<string?, string?>>
    method FormValueMultimap (line 20) | public FormValueMultimap(object source, RefitSettings settings)
    method Add (line 139) | void Add(string? key, string? value)
    method GetFieldNameForProperty (line 144) | string GetFieldNameForProperty(PropertyInfo propertyInfo)
    method GetProperties (line 167) | static PropertyInfo[] GetProperties(Type type)
    method GetEnumerator (line 172) | public IEnumerator<KeyValuePair<string?, string?>> GetEnumerator()
    method GetEnumerator (line 177) | IEnumerator IEnumerable.GetEnumerator()

FILE: Refit/HttpContentExtensions.cs
  class HttpContentExtensions (line 6) | static class HttpContentExtensions
    method ReadAsStreamAsync (line 10) | public static Task<Stream> ReadAsStreamAsync(
    method ReadAsStringAsync (line 18) | public static Task<string> ReadAsStringAsync(

FILE: Refit/HttpRequestMessageProperties.cs
  class HttpRequestMessageOptions (line 6) | public static class HttpRequestMessageOptions

FILE: Refit/JsonContentSerializer.cs
  class JsonContentSerializer (line 10) | [Obsolete(
    method ToHttpContent (line 25) | public HttpContent ToHttpContent<T>(T item) => throw new NotImplemente...
    method FromHttpContentAsync (line 37) | public Task<T?> FromHttpContentAsync<T>(
    method GetFieldNameForProperty (line 50) | public string GetFieldNameForProperty(PropertyInfo propertyInfo) =>

FILE: Refit/MultipartItem.cs
  class MultipartItem (line 12) | public abstract class MultipartItem(string fileName, string? contentType)
    method MultipartItem (line 20) | public MultipartItem(string fileName, string? contentType, string? name)
    method ToContent (line 55) | public HttpContent ToContent()
    method CreateContent (line 70) | protected abstract HttpContent CreateContent();
  class StreamPart (line 84) | public class StreamPart(
    method CreateContent (line 103) | protected override HttpContent CreateContent()
  class ByteArrayPart (line 120) | public class ByteArrayPart(
    method CreateContent (line 139) | protected override HttpContent CreateContent()
  class FileInfoPart (line 156) | public class FileInfoPart(
    method CreateContent (line 175) | protected override HttpContent CreateContent()

FILE: Refit/NameValueCollection.cs
  class NameValueCollection (line 3) | class NameValueCollection : Dictionary<string, string>

FILE: Refit/Polyfills.Trimming.cs
  class RequiresUnreferencedCodeAttribute (line 4) | [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeT...
    method RequiresUnreferencedCodeAttribute (line 7) | public RequiresUnreferencedCodeAttribute(string message) => Message = ...
  class DynamicDependencyAttribute (line 12) | [System.AttributeUsage(System.AttributeTargets.Constructor | System.Attr...
    method DynamicDependencyAttribute (line 15) | public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes membe...
    method DynamicDependencyAttribute (line 16) | public DynamicDependencyAttribute(string memberSignature, System.Type ...

FILE: Refit/ProblemDetails.cs
  class ProblemDetails (line 8) | public class ProblemDetails

FILE: Refit/PushStreamContent.cs
  class PushStreamContent (line 34) | [ExcludeFromCodeCoverage]
    method PushStreamContent (line 47) | public PushStreamContent(Action<Stream, HttpContent, TransportContext?...
    method PushStreamContent (line 55) | public PushStreamContent(
    method PushStreamContent (line 63) | public PushStreamContent(
    method PushStreamContent (line 72) | public PushStreamContent(
    method PushStreamContent (line 81) | public PushStreamContent(
    method PushStreamContent (line 90) | public PushStreamContent(
    method Taskify (line 100) | static Func<Stream, HttpContent, TransportContext?, Task> Taskify(
    type AsyncVoid (line 121) | struct AsyncVoid { }
    method SerializeToStreamAsync (line 131) | protected override async Task SerializeToStreamAsync(
    method TryComputeLength (line 150) | protected override bool TryComputeLength(out long length)
    class CompleteTaskOnCloseStream (line 157) | internal class CompleteTaskOnCloseStream : DelegatingStream
      method CompleteTaskOnCloseStream (line 161) | public CompleteTaskOnCloseStream(
      method Dispose (line 173) | [SuppressMessage("Usage", "CA2215:Dispose methods should call base c...
  class DelegatingStream (line 188) | [ExcludeFromCodeCoverage]
    method Dispose (line 237) | protected override void Dispose(bool disposing)
    method Seek (line 246) | public override long Seek(long offset, SeekOrigin origin)
    method Read (line 251) | public override int Read(byte[] buffer, int offset, int count)
    method ReadAsync (line 256) | public override Task<int> ReadAsync(
    method ReadByte (line 266) | public override int ReadByte()
    method Flush (line 271) | public override void Flush()
    method CopyToAsync (line 276) | public override Task CopyToAsync(
    method FlushAsync (line 285) | public override Task FlushAsync(CancellationToken cancellationToken)
    method SetLength (line 290) | public override void SetLength(long value)
    method Write (line 295) | public override void Write(byte[] buffer, int offset, int count)
    method WriteAsync (line 300) | public override Task WriteAsync(
    method WriteByte (line 310) | public override void WriteByte(byte value)

FILE: Refit/RefitSettings.cs
  class RefitSettings (line 18) | public class RefitSettings
    method RefitSettings (line 23) | public RefitSettings()
    method RefitSettings (line 38) | public RefitSettings(
    method RefitSettings (line 54) | public RefitSettings(
  type IHttpContentSerializer (line 161) | public interface IHttpContentSerializer
    method ToHttpContent (line 169) | HttpContent ToHttpContent<T>(T item);
    method FromHttpContentAsync (line 178) | Task<T?> FromHttpContentAsync<T>(
    method GetFieldNameForProperty (line 188) | string? GetFieldNameForProperty(PropertyInfo propertyInfo);
  type IUrlParameterKeyFormatter (line 194) | public interface IUrlParameterKeyFormatter
    method Format (line 201) | string Format(string key);
  type IUrlParameterFormatter (line 207) | public interface IUrlParameterFormatter
    method Format (line 216) | string? Format(object? value, ICustomAttributeProvider attributeProvid...
  type IFormUrlEncodedParameterFormatter (line 222) | public interface IFormUrlEncodedParameterFormatter
    method Format (line 230) | string? Format(object? value, string? formatString);
  class DefaultUrlParameterKeyFormatter (line 236) | public class DefaultUrlParameterKeyFormatter : IUrlParameterKeyFormatter
    method Format (line 243) | public virtual string Format(string key) => key;
  class DefaultUrlParameterFormatter (line 249) | public class DefaultUrlParameterFormatter : IUrlParameterFormatter
    method AddFormat (line 267) | public void AddFormat<TContainer, TParameter>(string format)
    method AddFormat (line 278) | public void AddFormat<TParameter>(string format)
    method Format (line 291) | public virtual string? Format(
  class DefaultFormUrlEncodedParameterFormatter (line 355) | public class DefaultFormUrlEncodedParameterFormatter : IFormUrlEncodedPa...
    method Format (line 368) | public virtual string? Format(object? parameterValue, string? formatSt...
  class DefaultApiExceptionFactory (line 405) | public class DefaultApiExceptionFactory(RefitSettings refitSettings)
    method CreateAsync (line 414) | public Task<Exception?> CreateAsync(HttpResponseMessage responseMessage)
    method CreateExceptionAsync (line 426) | static async Task<Exception> CreateExceptionAsync(

FILE: Refit/RequestBuilder.cs
  type IRequestBuilder (line 16) | public interface IRequestBuilder
    method BuildRestResultFuncForMethod (line 33) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
  type IRequestBuilder (line 46) | public interface IRequestBuilder<T> : IRequestBuilder { }
    method BuildRestResultFuncForMethod (line 33) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
  class RequestBuilder (line 56) | public static class RequestBuilder
    method ForType (line 72) | public static IRequestBuilder<T> ForType< [
    method ForType (line 79) | public static IRequestBuilder<T> ForType<T>(RefitSettings? settings) =>
    method ForType (line 91) | public static IRequestBuilder<T> ForType< [
    method ForType (line 98) | public static IRequestBuilder<T> ForType<T>() =>
    method ForType (line 114) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
    method ForType (line 123) | public static IRequestBuilder ForType(
    method ForType (line 144) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...

FILE: Refit/RequestBuilderFactory.cs
  type IRequestBuilderFactory (line 7) | interface IRequestBuilderFactory
    method Create (line 10) | IRequestBuilder<T> Create<
    method Create (line 15) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
    method Create (line 24) | IRequestBuilder<T> Create<T>(RefitSettings? settings);
    method Create (line 25) | IRequestBuilder Create(Type refitInterfaceType, RefitSettings? settings);
  class RequestBuilderFactory (line 29) | class RequestBuilderFactory : IRequestBuilderFactory
    method Create (line 32) | public IRequestBuilder<T> Create<
    method Create (line 38) | public IRequestBuilder<T> Create<T>(RefitSettings? settings = null)
    method Create (line 47) | [RequiresUnreferencedCode("Refit uses reflection to analyze interface ...
    method Create (line 56) | public IRequestBuilder Create(Type refitInterfaceType, RefitSettings? ...

FILE: Refit/RequestBuilderImplementation.TaskToObservable.cs
  class RequestBuilderImplementation (line 3) | partial class RequestBuilderImplementation
    class TaskToObservable (line 5) | sealed class TaskToObservable<T> : IObservable<T?>
      method TaskToObservable (line 9) | public TaskToObservable(Func<CancellationToken, Task<T?>> taskFactory)
      method Subscribe (line 14) | public IDisposable Subscribe(IObserver<T?> observer)
      method ToObservableDone (line 35) | static void ToObservableDone<TResult>(Task<TResult?> task, IObserver...

FILE: Refit/RequestBuilderImplementation.cs
  class RequestBuilderImplementation (line 16) | class RequestBuilderImplementation<
    method RequestBuilderImplementation (line 25) | public RequestBuilderImplementation(RefitSettings? refitSettings = null)
    method RequestBuilderImplementation (line 46) | [RequiresUnreferencedCode("RequestBuilder uses reflection on the provi...
    method GetLookupKeyForMethod (line 83) | static string GetLookupKeyForMethod(MethodInfo methodInfo)
    method foreach (line 102) | foreach (var methodInfo in methodInfos)
  class RequestBuilderImplementation (line 31) | partial class RequestBuilderImplementation : IRequestBuilder
    method RequestBuilderImplementation (line 25) | public RequestBuilderImplementation(RefitSettings? refitSettings = null)
    method RequestBuilderImplementation (line 46) | [RequiresUnreferencedCode("RequestBuilder uses reflection on the provi...
    method GetLookupKeyForMethod (line 83) | static string GetLookupKeyForMethod(MethodInfo methodInfo)
    method foreach (line 102) | foreach (var methodInfo in methodInfos)
  method FindMatchingRestMethodInfo (line 121) | RestMethodInfoInternal FindMatchingRestMethodInfo(
  method CloseGenericMethodIfNeeded (line 184) | RestMethodInfoInternal CloseGenericMethodIfNeeded(
  method BuildRestResultFuncForMethod (line 205) | [RequiresUnreferencedCode("Building rest result delegates uses reflectio...
  method BuildSyncFuncForMethod (line 284) | private Func<HttpClient, object[], object?> BuildSyncFuncForMethod<T, TB...
  method AddMultipartItem (line 294) | void AddMultipartItem(
  method BuildCancellableTaskFuncForMethod (line 367) | Func<HttpClient, CancellationToken, object[], Task<T?>> BuildCancellable...
  method DeserializeContentAsync (line 494) | async Task<T?> DeserializeContentAsync<T>(
  method BuildQueryMap (line 536) | List<KeyValuePair<string, object?>> BuildQueryMap(
  method BuildQueryMap (line 647) | List<KeyValuePair<string, object?>> BuildQueryMap(
  method ShouldIgnorePropertyInQueryMap (line 689) | static bool ShouldIgnorePropertyInQueryMap(PropertyInfo propertyInfo)
  method BuildRequestFactoryForMethod (line 707) | Func<object[], HttpRequestMessage> BuildRequestFactoryForMethod(
  method BuildRelativePath (line 869) | string BuildRelativePath(string basePath, RestMethodInfoInternal restMet...
  method AppendPathFragmentValue (line 896) | void AppendPathFragmentValue(ref ValueStringBuilder vsb, RestMethodInfoI...
  method AddBodyToRequest (line 967) | void AddBodyToRequest(RestMethodInfoInternal restMethod, object param, H...
  method AddQueryParameters (line 1035) | void AddQueryParameters(RestMethodInfoInternal restMethod, QueryAttribut...
  method AddMultiPart (line 1080) | void AddMultiPart(RestMethodInfoInternal restMethod, int i, object param,
  method AddHeadersToRequest (line 1113) | static void AddHeadersToRequest(Dictionary<string, string?>? headersToAd...
  method AddAuthorizationHeadersFromGetterAsync (line 1132) | async Task AddAuthorizationHeadersFromGetterAsync(HttpRequestMessage req...
  method AddPropertiesToRequest (line 1146) | void AddPropertiesToRequest(RestMethodInfoInternal restMethod, HttpReque...
  method AddVersionToRequest (line 1196) | void AddVersionToRequest(HttpRequestMessage ret)
  method ParseQueryParameter (line 1203) | IEnumerable<KeyValuePair<string, string?>> ParseQueryParameter(
  method ParseEnumerableQueryParameterValue (line 1237) | IEnumerable<string?> ParseEnumerableQueryParameterValue(
  method ParseExistingQueryString (line 1291) | static void ParseExistingQueryString(UriBuilder uri, ref List<KeyValuePa...
  method CreateQueryString (line 1311) | static string CreateQueryString(List<KeyValuePair<string, string?>> quer...
  method BuildRxFuncForMethod (line 1346) | Func<HttpClient, object[], IObservable<T?>> BuildRxFuncForMethod<T, TBody>(
  method BuildTaskFuncForMethod (line 1370) | Func<HttpClient, object[], Task<T?>> BuildTaskFuncForMethod<T, TBody>(
  method BuildVoidTaskFuncForMethod (line 1391) | Func<HttpClient, object[], Task> BuildVoidTaskFuncForMethod(
  method IsBodyBuffered (line 1431) | private static bool IsBodyBuffered(
  method DoNotConvertToQueryMap (line 1439) | static bool DoNotConvertToQueryMap(object? value)
  method SetHeader (line 1478) | static void SetHeader(HttpRequestMessage request, string name, string? v...
  method EnsureSafe (line 1514) | static string EnsureSafe(string value)
  method IsBodyless (line 1522) | static bool IsBodyless(HttpMethod method) => method == HttpMethod.Get ||...

FILE: Refit/RestMethodInfo.cs
  class IsExternalInit (line 10) | internal static class IsExternalInit { }
  type RestMethodInfo (line 19) | public record RestMethodInfo(
  class RestMethodInfoInternal (line 27) | [DebuggerDisplay("{MethodInfo}")]
    method RestMethodInfoInternal (line 62) | public RestMethodInfoInternal(
    method HeaderCollectionAt (line 184) | public bool HeaderCollectionAt(int index) => HeaderCollectionParameter...
    method GetHeaderCollectionParameterIndex (line 186) | static int GetHeaderCollectionParameterIndex(ParameterInfo[] parameter...
    method BuildRequestPropertyMap (line 220) | static Dictionary<int, string> BuildRequestPropertyMap(ParameterInfo[]...
    method GetParameterProperties (line 245) | static IEnumerable<PropertyInfo> GetParameterProperties(ParameterInfo ...
    method VerifyUrlPathIsSane (line 252) | static void VerifyUrlPathIsSane(string relativePath)
    method BuildParameterMap (line 269) | static (Dictionary<int, RestMethodParameterInfo> ret, List<ParameterFr...
    method GetUrlNameForParameter (line 413) | static string GetUrlNameForParameter(ParameterInfo paramInfo)
    method GetUrlNameForProperty (line 422) | static string GetUrlNameForProperty(PropertyInfo propInfo)
    method GetAttachmentNameForParameter (line 431) | static string GetAttachmentNameForParameter(ParameterInfo paramInfo)
    method FindBodyParameter (line 444) | Tuple<BodySerializationMethod, bool, int>? FindBodyParameter(
    method FindAuthorizationParameter (line 538) | static Tuple<string, int>? FindAuthorizationParameter(ParameterInfo[] ...
    method ParseHeaders (line 569) | static Dictionary<string, string?> ParseHeaders(MethodInfo methodInfo)
    method BuildHeaderParameterMap (line 614) | static Dictionary<int, string> BuildHeaderParameterMap(ParameterInfo[]...
    method DetermineReturnTypeInfo (line 636) | void DetermineReturnTypeInfo(MethodInfo methodInfo)
    method DetermineIfResponseMustBeDisposed (line 695) | void DetermineIfResponseMustBeDisposed()
  type ParameterFragment (line 705) | internal record struct ParameterFragment(string? Value, int ArgumentInde...

FILE: Refit/RestMethodParameterInfo.cs
  class RestMethodParameterInfo (line 8) | public class RestMethodParameterInfo
    method RestMethodParameterInfo (line 15) | public RestMethodParameterInfo(string name, ParameterInfo parameterInfo)
    method RestMethodParameterInfo (line 26) | public RestMethodParameterInfo(bool isObjectPropertyParameter, Paramet...
  class RestMethodParameterProperty (line 81) | public class RestMethodParameterProperty(string name, PropertyInfo prope...
  type ParameterType (line 103) | public enum ParameterType

FILE: Refit/RestService.cs
  method For (line 24) | public static T For<
  method For (line 30) | public static T For<T>(HttpClient client, IRequestBuilder<T> builder) =>...
  method For (line 41) | public static T For<
  method For (line 47) | public static T For<T>(HttpClient client, RefitSettings? settings)
  method For (line 62) | public static T For<
  method For (line 68) | public static T For<T>(HttpClient client) => For<T>(client, (RefitSettin...
  method For (line 79) | public static T For<
  method For (line 85) | public static T For<T>(string hostUrl, RefitSettings? settings)
  method For (line 100) | public static T For<
  method For (line 106) | public static T For<T>(string hostUrl) => For<T>(hostUrl, null);
  method For (line 117) | public static object For(
  method For (line 126) | public static object For(
  method For (line 146) | public static object For(
  method For (line 155) | public static object For(
  method For (line 174) | public static object For(
  method For (line 182) | public static object For(Type refitInterfaceType, HttpClient client) =>
  method For (line 194) | public static object For(
  method For (line 203) | public static object For(Type refitInterfaceType, string hostUrl, RefitS...
  method For (line 218) | public static object For(
  method For (line 226) | public static object For(Type refitInterfaceType, string hostUrl) =>
  method CreateHttpClient (line 237) | public static HttpClient CreateHttpClient(string hostUrl, RefitSettings?...
  method GetGeneratedType (line 272) | [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Publi...
  method GetGeneratedType (line 280) | static Type GetGeneratedType(Type refitInterfaceType)

FILE: Refit/SystemTextJsonContentSerializer.cs
  class SystemTextJsonContentSerializer (line 19) | public sealed class SystemTextJsonContentSerializer(JsonSerializerOption...
    method SystemTextJsonContentSerializer (line 24) | public SystemTextJsonContentSerializer()
    method ToHttpContent (line 28) | public HttpContent ToHttpContent<T>(T item)
    method FromHttpContentAsync (line 40) | public async Task<T?> FromHttpContentAsync<T>(
    method GetFieldNameForProperty (line 64) | public string? GetFieldNameForProperty(PropertyInfo propertyInfo) => p...
    method GetDefaultJsonSerializerOptions (line 76) | public static JsonSerializerOptions GetDefaultJsonSerializerOptions()
    method TryGetJsonTypeInfo (line 91) | bool TryGetJsonTypeInfo<T>(out JsonTypeInfo<T> jsonTypeInfo)
  class ObjectToInferredTypesConverter (line 113) | public class ObjectToInferredTypesConverter : JsonConverter<object>
    method Read (line 124) | public override object? Read(
    method Write (line 146) | public override void Write(
  class CamelCaseStringEnumConverter (line 163) | sealed class CamelCaseStringEnumConverter : JsonConverterFactory
    method CanConvert (line 165) | public override bool CanConvert(Type typeToConvert) =>
    method CreateConverter (line 168) | public override JsonConverter CreateConverter(Type typeToConvert, Json...
    class NonGenericEnumConverter (line 176) | sealed class NonGenericEnumConverter(Type targetType, Type enumType, b...
      method CanConvert (line 179) | public override bool CanConvert(Type typeToConvert) => typeToConvert...
      method Read (line 181) | public override object? Read(
      method Write (line 231) | public override void Write(
      method ToCamelCase (line 253) | static string ToCamelCase(string value) =>

FILE: Refit/UniqueName.cs
  class UniqueName (line 3) | class UniqueName
    method ForType (line 5) | public static string ForType<T>()
    method ForType (line 10) | public static string ForType<T>(object? serviceKey)
    method ForType (line 15) | public static string ForType(Type refitInterfaceType, object? serviceKey)
    method ForType (line 20) | public static string ForType(Type refitInterfaceType)
    method GetServiceKeySuffix (line 71) | static string GetServiceKeySuffix(object? serviceKey)

FILE: Refit/ValidationApiException.cs
  class ValidationApiException (line 8) | [Serializable]
    method ValidationApiException (line 13) | static ValidationApiException()
    method ValidationApiException (line 20) | ValidationApiException(ApiException apiException)
    method Create (line 36) | public static ValidationApiException Create(ApiException exception)

FILE: Refit/ValueStringBuilder.cs
  type ValueStringBuilder (line 9) | internal ref struct ValueStringBuilder
    method ValueStringBuilder (line 15) | public ValueStringBuilder(Span<char> initialBuffer)
    method ValueStringBuilder (line 22) | public ValueStringBuilder(int initialCapacity)
    method EnsureCapacity (line 42) | public void EnsureCapacity(int capacity)
    method GetPinnableReference (line 58) | public ref char GetPinnableReference() => ref MemoryMarshal.GetReferen...
    method GetPinnableReference (line 64) | public ref char GetPinnableReference(bool terminate)
    method ToString (line 83) | public override string ToString()
    method AsSpan (line 97) | public ReadOnlySpan<char> AsSpan(bool terminate)
    method AsSpan (line 107) | public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
    method AsSpan (line 108) | public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _po...
    method AsSpan (line 109) | public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slic...
    method TryCopyTo (line 111) | public bool TryCopyTo(Span<char> destination, out int charsWritten)
    method Insert (line 127) | public void Insert(int index, char value, int count)
    method Insert (line 140) | public void Insert(int index, string? s)
    method Append (line 164) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
    method Append (line 180) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
    method AppendSlow (line 200) | private void AppendSlow(string s)
    method Append (line 216) | public void Append(char c, int count)
    method Append (line 231) | public void Append(ReadOnlySpan<char> value)
    method AppendSpan (line 243) | [MethodImpl(MethodImplOptions.AggressiveInlining)]
    method GrowAndAppend (line 256) | [MethodImpl(MethodImplOptions.NoInlining)]
    method Grow (line 271) | [MethodImpl(MethodImplOptions.NoInlining)]
    method Dispose (line 299) | [MethodImpl(MethodImplOptions.AggressiveInlining)]

FILE: examples/Meow.Common/Middleware/HttpClientDiagnosticsHandler.cs
  class HttpClientDiagnosticsHandler (line 7) | [DebuggerStepThrough]
    method HttpClientDiagnosticsHandler (line 10) | public HttpClientDiagnosticsHandler(HttpMessageHandler innerHandler)
    method HttpClientDiagnosticsHandler (line 13) | public HttpClientDiagnosticsHandler() { }
    method SendAsync (line 15) | protected override async Task<HttpResponseMessage> SendAsync(

FILE: examples/Meow.Common/Responses/SearchResponse.cs
  class SearchResult (line 3) | public class SearchResult
  class Breed (line 12) | public class Breed
  class Weight (line 52) | public class Weight

FILE: examples/Meow.Common/Services/CatsService.cs
  class CatsService (line 9) | public class CatsService
    method CatsService (line 14) | public CatsService(Uri baseUrl)
    method Search (line 23) | public async Task<IEnumerable<SearchResult>> Search(string breed)

FILE: examples/Meow.Common/Services/ITheCatsAPI.cs
  type ITheCatsAPI (line 7) | [Headers("x-api-key: b95bfb30-55bc-4327-bb8b-35d740f70051")]
    method Search (line 10) | [Get("/v1/images/search")]

FILE: examples/Meow.Common/Services/Issue2056And2058Demo.cs
  class Issue2056And2058Demo (line 10) | public static class Issue2056And2058Demo
    method RunAsync (line 12) | public static async Task RunAsync()
    method ValidateIssue2056Async (line 33) | static async Task ValidateIssue2056Async(IIssueDemoApi api)
    method ValidateIssue2058Async (line 54) | static async Task ValidateIssue2058Async(IIssueDemoApi api)
  type IIssueDemoApi (line 66) | public interface IIssueDemoApi
    method EchoCustomerAsync (line 68) | [Get("/echo-customer")]
    method GetLargePayloadAsync (line 71) | [Get("/large-payload")]
  class CustomerEchoResponse (line 75) | public sealed class CustomerEchoResponse
  class LargePayloadResponse (line 81) | public sealed class LargePayloadResponse
  class CustomerIdHeaderHandler (line 87) | public sealed class CustomerIdHeaderHandler(HttpMessageHandler innerHand...
    method SendAsync (line 91) | protected override Task<HttpResponseMessage> SendAsync(
  class DemoBackendHandler (line 106) | public sealed class DemoBackendHandler : HttpMessageHandler
    method SendAsync (line 108) | protected override Task<HttpResponseMessage> SendAsync(
  class AsyncOnlyJsonHttpContent (line 164) | public sealed class AsyncOnlyJsonHttpContent(string json) : HttpContent
    method SerializeToStreamAsync (line 168) | protected override Task SerializeToStreamAsync(Stream stream, Transpor...
    method TryComputeLength (line 171) | protected override bool TryComputeLength(out long length)
    method CreateContentReadStreamAsync (line 177) | protected override Task<Stream> CreateContentReadStreamAsync() =>
  class AsyncOnlyReadStream (line 181) | public sealed class AsyncOnlyReadStream(byte[] data) : Stream
    method Flush (line 195) | public override void Flush() => _inner.Flush();
    method Read (line 197) | public override int Read(byte[] buffer, int offset, int count) =>
    method ReadAsync (line 200) | public override async ValueTask<int> ReadAsync(
    method ReadAsync (line 205) | public override Task<int> ReadAsync(
    method Seek (line 212) | public override long Seek(long offset, SeekOrigin origin) => _inner.Se...
    method SetLength (line 214) | public override void SetLength(long value) => throw new NotSupportedEx...
    method Write (line 216) | public override void Write(byte[] buffer, int offset, int count) =>

FILE: examples/Meow/Program.cs
  class Program (line 5) | public static class Program
    method Main (line 7) | public static async Task Main(string[] args)

FILE: examples/SampleUsingLocalApi/ConsoleApplication/Program.cs
  class Program (line 10) | class Program
    method Main (line 12) | static void Main(string[] args)

FILE: examples/SampleUsingLocalApi/LibraryWithSDKandRefitService/IRestService.cs
  type IRestService (line 7) | public interface IRestService
    method GetWithNoParameter (line 9) | [Get("/api/values")]
    method GetWithParameter (line 12) | [Get("/api/values/{id}")]
    method PostWithTestObject (line 15) | [Post("/api/values")]
    method PutWithParameters (line 18) | [Put("/api/values/{id}")]
    method DeleteWithParameters (line 21) | [Delete("/api/values/{id}")]

FILE: examples/SampleUsingLocalApi/LibraryWithSDKandRefitService/ModelForTest.cs
  class ModelForTest (line 3) | public class ModelForTest

FILE: examples/SampleUsingLocalApi/RestApiforTest/Controllers/ValuesController.cs
  class ValuesController (line 14) | [Route("api/[controller]")]
    method Get (line 23) | [HttpGet]
    method Get (line 34) | [HttpGet("{id}")]
    method Post (line 45) | [HttpPost]
    method Put (line 57) | [HttpPut("{id}")]
    method Delete (line 68) | [HttpDelete("{id}")]

FILE: examples/SampleUsingLocalApi/RestApiforTest/Program.cs
  class Program (line 6) | internal static class Program
    method Main (line 14) | public static void Main(string[] args)
    method CreateWebHostBuilder (line 28) | public static IHostBuilder CreateWebHostBuilder(string[] args) =>

FILE: examples/SampleUsingLocalApi/RestApiforTest/Startup.cs
  class Startup (line 10) | internal class Startup
    method Startup (line 17) | public Startup(IConfiguration configuration)
    method ConfigureServices (line 39) | public void ConfigureServices(IServiceCollection services)
    method Configure (line 51) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Condensed preview — 281 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,416K chars).
[
  {
    "path": ".devcontainers/Dockerfile",
    "chars": 386,
    "preview": "# [Choice] .NET version: 7.0, 7.0-bullseye-slim, 7.0-jammy, 6.0, 6.0-bullseye-slim, 6.0-jammy, 6.0-focal\nARG VARIANT=\"7."
  },
  {
    "path": ".devcontainers/devcontainer.json",
    "chars": 1443,
    "preview": "{\n  \"name\": \"DevContainer for .NET\",\n\n  \"build\": {\n    \"dockerfile\": \"./Dockerfile\",\n    \"context\": \".\",\n    \"args\": {\n "
  },
  {
    "path": ".devcontainers/post-create.sh",
    "chars": 71,
    "preview": "## Restore .NET packages and build the default solution\ndotnet restore\n"
  },
  {
    "path": ".editorconfig",
    "chars": 12645,
    "preview": "# EditorConfig is awesome:http://EditorConfig.org\n# From https://raw.githubusercontent.com/dotnet/roslyn/master/.editorc"
  },
  {
    "path": ".gitattributes",
    "chars": 386,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n\n# St"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.yml",
    "chars": 2783,
    "preview": "name: Bug Report\ndescription: Create a report to help us improve\ntitle: \"[Bug]: \"\nlabels: [\"bug\"]\nbody:\n  - type: markdo"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 300,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Questions\n    url: https://github.com/reactiveui/refit/discussions\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 1029,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: feature request\nassignees: ''\n\n---\n\n"
  },
  {
    "path": ".github/renovate.json",
    "chars": 124,
    "preview": "{\n    \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n    \"extends\": [\"local>reactiveui/.github:renovate"
  },
  {
    "path": ".github/workflows/ci-build.yml",
    "chars": 513,
    "preview": "name: Build\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\n# Needed so the reusable workflo"
  },
  {
    "path": ".github/workflows/lock.yml",
    "chars": 812,
    "preview": "name: 'Lock Threads'\n\non:\n  schedule:\n    - cron: '0 0 * * *'\n  workflow_dispatch:\n\npermissions:\n  issues: write\n  pull-"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 1399,
    "preview": "name: Release\n\non:\n  workflow_dispatch:\n\npermissions:\n  contents: write\n  id-token: write\n\njobs:\n  release:\n    uses: re"
  },
  {
    "path": ".gitignore",
    "chars": 1083,
    "preview": "# Windows image file caches\nThumbs.db \n\n# Folder config file\nDesktop.ini\n\n## Ignore Visual Studio temporary files, build"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 2390,
    "preview": "# Contributor Code of Conduct\n\nAs contributors and maintainers of this project, and in the interest of\nfostering an open"
  },
  {
    "path": "COPYING",
    "chars": 1053,
    "preview": "Copyright (c) 2012 GitHub\n\nPermission is hereby granted,  free of charge,  to any person obtaining a\ncopy of this softwa"
  },
  {
    "path": "CodeCoverage.runsettings",
    "chars": 635,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- File name extension must be .runsettings -->\n<RunSettings>\n  <DataCollection"
  },
  {
    "path": "Directory.Build.props",
    "chars": 3018,
    "preview": "<Project>\n  <PropertyGroup>\n    <MinClientVersion>2.12</MinClientVersion>\n    <GenerateDocumentationFile>true</GenerateD"
  },
  {
    "path": "InterfaceStubGenerator.Roslyn38/InterfaceStubGenerator.Roslyn38.csproj",
    "chars": 1105,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFrameworks>netstandard2.0</TargetFrameworks>\n    <Assem"
  },
  {
    "path": "InterfaceStubGenerator.Roslyn41/InterfaceStubGenerator.Roslyn41.csproj",
    "chars": 1192,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFrameworks>netstandard2.0</TargetFrameworks>\n    <Assem"
  },
  {
    "path": "InterfaceStubGenerator.Roslyn50/InterfaceStubGenerator.Roslyn50.csproj",
    "chars": 1271,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFrameworks>netstandard2.0</TargetFrameworks>\n    <Assem"
  },
  {
    "path": "InterfaceStubGenerator.Shared/DiagnosticDescriptors.cs",
    "chars": 946,
    "preview": "using Microsoft.CodeAnalysis;\n\nnamespace Refit.Generator;\n\ninternal static class DiagnosticDescriptors\n{\n#pragma warnin"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Emitter.cs",
    "chars": 14667,
    "preview": "using System.Linq;\nusing System.Text;\nusing Microsoft.CodeAnalysis.Text;\n\nnamespace Refit.Generator;\n\ninternal static c"
  },
  {
    "path": "InterfaceStubGenerator.Shared/ITypeSymbolExtensions.cs",
    "chars": 1514,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Microsoft.CodeAnalysis;\n\nna"
  },
  {
    "path": "InterfaceStubGenerator.Shared/ImmutableEquatableArray.cs",
    "chars": 2658,
    "preview": "using System.Collections;\n\nnamespace Refit.Generator;\n\ninternal static class ImmutableEquatableArray\n{\n    public stati"
  },
  {
    "path": "InterfaceStubGenerator.Shared/IncrementalValuesProviderExtensions.cs",
    "chars": 2527,
    "preview": "#if ROSLYN_4\nusing System.Text;\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.Text;\n\nnamespace Refit.Gener"
  },
  {
    "path": "InterfaceStubGenerator.Shared/InterfaceStubGenerator.Shared.projitems",
    "chars": 1897,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Propert"
  },
  {
    "path": "InterfaceStubGenerator.Shared/InterfaceStubGenerator.Shared.shproj",
    "chars": 1054,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "InterfaceStubGenerator.Shared/InterfaceStubGenerator.cs",
    "chars": 7174,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Collections.Immutable;\nusing System.Linq;\nusing System.Tex"
  },
  {
    "path": "InterfaceStubGenerator.Shared/IsExternalInit.cs",
    "chars": 815,
    "preview": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/ContextGenerationModel.cs",
    "chars": 210,
    "preview": "namespace Refit.Generator;\n\ninternal sealed record ContextGenerationModel(\n    string RefitInternalNamespace,\n    strin"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/InterfaceModel.cs",
    "chars": 663,
    "preview": "namespace Refit.Generator;\n\ninternal sealed record InterfaceModel(\n    string PreserveAttributeDisplayName,\n    string "
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/MethodModel.cs",
    "chars": 464,
    "preview": "using System.Collections.Immutable;\n\nnamespace Refit.Generator;\n\ninternal sealed record MethodModel(\n    string Name,\n "
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/ParameterModel.cs",
    "chars": 153,
    "preview": "namespace Refit.Generator;\n\ninternal sealed record ParameterModel(\n    string MetadataName,\n    string Type,\n    bool A"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/TypeConstraint.cs",
    "chars": 391,
    "preview": "namespace Refit.Generator;\n\ninternal readonly record struct TypeConstraint(\n    string TypeName,\n    string DeclaredNam"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Models/WellKnownTypes.cs",
    "chars": 1596,
    "preview": "using Microsoft.CodeAnalysis;\n\nnamespace Refit.Generator;\n\n/// <summary>\n/// WellKnownTypes.\n/// </summary>\npublic clas"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Parser.cs",
    "chars": 24882,
    "preview": "using System.Collections.Immutable;\nusing System.Text;\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.CShar"
  },
  {
    "path": "InterfaceStubGenerator.Shared/Polyfills/IndexRange.cs",
    "chars": 4604,
    "preview": "#if NETSTANDARD2_0 || NET462\nnamespace System\n{\n    /// <summary>\n    /// Minimal polyfill for <c>System.Index</c> to s"
  },
  {
    "path": "InterfaceStubGenerator.Shared/SourceWriter.cs",
    "chars": 2983,
    "preview": "using System.Diagnostics;\nusing System.Text;\nusing Microsoft.CodeAnalysis.Text;\n\nnamespace Refit.Generator;\n\n// From ht"
  },
  {
    "path": "InterfaceStubGenerator.Shared/UniqueNameBuilder.cs",
    "chars": 1667,
    "preview": "namespace Refit.Generator;\n\n// <Summary>\n// UniqueNameBuilder.\n// </Summary>\npublic class UniqueNameBuilder()\n{\n    pri"
  },
  {
    "path": "LICENSE",
    "chars": 1106,
    "preview": "The MIT License (MIT)\n\nCopyright (c) ReactiveUI 2012 - 2025\n\nAll rights reserved.\n\nPermission is hereby granted, free of"
  },
  {
    "path": "NuGet.config",
    "chars": 303,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <packageSources>\n    <add key=\"dotnet-tools\" value=\"https://pkg"
  },
  {
    "path": "README.md",
    "chars": 58089,
    "preview": "![Refit](refit_logo.png)\n\n## Refit: The automatic type-safe REST library for .NET Core, Xamarin and .NET\n\n[![Build](http"
  },
  {
    "path": "Refit/AnonymousDisposable.cs",
    "chars": 169,
    "preview": "namespace Refit\n{\n    sealed class AnonymousDisposable(Action block) : IDisposable\n    {\n        public void Dispose()\n"
  },
  {
    "path": "Refit/AotCompatibility.cs",
    "chars": 421,
    "preview": "using System.Runtime.CompilerServices;\nusing System.Diagnostics.CodeAnalysis;\n#if NET7_0_OR_GREATER\nusing System.Runtim"
  },
  {
    "path": "Refit/ApiException.cs",
    "chars": 10022,
    "preview": "using System.Diagnostics.CodeAnalysis;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\n\nnamespa"
  },
  {
    "path": "Refit/ApiResponse.cs",
    "chars": 9334,
    "preview": "using System.Diagnostics.CodeAnalysis;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\n\nnamespa"
  },
  {
    "path": "Refit/Attributes.cs",
    "chars": 19184,
    "preview": "using System.Net.Http;\n\nnamespace Refit\n{\n    /// <summary>\n    /// HttpMethodAttribute.\n    /// </summary>\n    /// <se"
  },
  {
    "path": "Refit/AuthenticatedHttpClientHandler.cs",
    "chars": 3211,
    "preview": "using System.Net.Http;\nusing System.Net.Http.Headers;\n\nnamespace Refit\n{\n    class AuthenticatedHttpClientHandler : Del"
  },
  {
    "path": "Refit/Buffers/PooledBufferWriter.Stream.NETStandard21.cs",
    "chars": 2417,
    "preview": "#if NET6_0_OR_GREATER\n\nusing System;\nusing System.IO;\nusing System.Threading;\nusing System.Threading.Tasks;\n\n#nullable "
  },
  {
    "path": "Refit/Buffers/PooledBufferWriter.Stream.cs",
    "chars": 6726,
    "preview": "using System.Buffers;\n\n#nullable enable\n\nnamespace Refit.Buffers\n{\n    internal sealed partial class PooledBufferWriter"
  },
  {
    "path": "Refit/Buffers/PooledBufferWriter.ThrowExceptions.cs",
    "chars": 2543,
    "preview": "using System.Runtime.CompilerServices;\n\nnamespace Refit.Buffers\n{\n    internal sealed partial class PooledBufferWriter\n"
  },
  {
    "path": "Refit/Buffers/PooledBufferWriter.cs",
    "chars": 3420,
    "preview": "using System.Buffers;\nusing System.Runtime.CompilerServices;\n\nnamespace Refit.Buffers\n{\n    /// <summary>\n    /// A <se"
  },
  {
    "path": "Refit/CachedRequestBuilderImplementation.cs",
    "chars": 4966,
    "preview": "using System.Collections.Concurrent;\nusing System.Net.Http;\n#if NET8_0_OR_GREATER\nusing System.Diagnostics.CodeAnalysis"
  },
  {
    "path": "Refit/CamelCaseUrlParameterKeyFormatter.cs",
    "chars": 1593,
    "preview": "namespace Refit\n{\n    /// <summary>\n    /// Provides an implementation of <see cref=\"IUrlParameterKeyFormatter\"/> that "
  },
  {
    "path": "Refit/CloseGenericMethodKey.cs",
    "chars": 1168,
    "preview": "using System.Reflection;\n\nnamespace Refit\n{\n    readonly struct CloseGenericMethodKey : IEquatable<CloseGenericMethodKe"
  },
  {
    "path": "Refit/CollectionFormat.cs",
    "chars": 920,
    "preview": "namespace Refit\n{\n    /// <summary>\n    /// Collection format defined in https://swagger.io/docs/specification/2-0/desc"
  },
  {
    "path": "Refit/DynamicallyAccessedMembersAttribute.cs",
    "chars": 2576,
    "preview": "#if NETSTANDARD2_0 || NET462\nnamespace System.Diagnostics.CodeAnalysis;\n\n/// <summary>\n/// Indicates that certain membe"
  },
  {
    "path": "Refit/EnumerableExtensions.cs",
    "chars": 817,
    "preview": "namespace Refit;\n\ninternal static class EnumerableExtensions\n{\n    internal static EnumerablePeek TryGetSingle<T>(this "
  },
  {
    "path": "Refit/FormValueMultimap.cs",
    "chars": 6857,
    "preview": "using System.Collections;\nusing System.Reflection;\n\nnamespace Refit\n{\n    /// <summary>\n    /// Transforms a form sourc"
  },
  {
    "path": "Refit/HttpContentExtensions.cs",
    "chars": 829,
    "preview": "using System.Net.Http;\n\nnamespace Refit\n{\n#if !NET6_0_OR_GREATER\n    static class HttpContentExtensions\n    {\n#pragma w"
  },
  {
    "path": "Refit/HttpRequestMessageProperties.cs",
    "chars": 649,
    "preview": "namespace Refit\n{\n    /// <summary>\n    /// Contains Refit-defined properties on the HttpRequestMessage.Properties/Optio"
  },
  {
    "path": "Refit/JsonContentSerializer.cs",
    "chars": 2276,
    "preview": "using System.Net.Http;\nusing System.Reflection;\n\nnamespace Refit\n{\n    /// <summary>\n    /// JsonContentSerializer.\n   "
  },
  {
    "path": "Refit/MultipartItem.cs",
    "chars": 5773,
    "preview": "using System.Net.Http;\nusing System.Net.Http.Headers;\n\nnamespace Refit\n{\n    /// <summary>\n    /// Initializes a new in"
  },
  {
    "path": "Refit/NameValueCollection.cs",
    "chars": 163,
    "preview": "namespace System.Collections.Specialized\n{\n    class NameValueCollection : Dictionary<string, string>\n    {\n        pub"
  },
  {
    "path": "Refit/Polyfills.Trimming.cs",
    "chars": 958,
    "preview": "#if NETSTANDARD2_0 || NET462\nnamespace System.Diagnostics.CodeAnalysis\n{\n    [System.AttributeUsage(System.AttributeTar"
  },
  {
    "path": "Refit/ProblemDetails.cs",
    "chars": 1554,
    "preview": "using System.Text.Json.Serialization;\n\nnamespace Refit\n{\n    /// <summary>\n    /// The object representing the details "
  },
  {
    "path": "Refit/Properties/AssemblyInfo.cs",
    "chars": 1688,
    "preview": "using System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Refit.Tests\")]\n//    \"Refit.Tests, PublicKey=002"
  },
  {
    "path": "Refit/PushStreamContent.cs",
    "chars": 12365,
    "preview": "// Copyright(c) Microsoft Open Technologies, Inc.All rights reserved.\n// Microsoft Open Technologies would like to than"
  },
  {
    "path": "Refit/Refit.csproj",
    "chars": 2965,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <Product>Refit ($(TargetFramework))</Product>\n    <TargetFrame"
  },
  {
    "path": "Refit/RefitSettings.cs",
    "chars": 17977,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing "
  },
  {
    "path": "Refit/RequestBuilder.cs",
    "chars": 8726,
    "preview": "using System.Net.Http;\n#if NET8_0_OR_GREATER\nusing System.Diagnostics.CodeAnalysis;\n#endif\n\nnamespace Refit\n{\n    /// <"
  },
  {
    "path": "Refit/RequestBuilderFactory.cs",
    "chars": 2371,
    "preview": "#if NET8_0_OR_GREATER\nusing System.Diagnostics.CodeAnalysis;\n#endif\n\nnamespace Refit\n{\n    interface IRequestBuilderFac"
  },
  {
    "path": "Refit/RequestBuilderImplementation.TaskToObservable.cs",
    "chars": 1953,
    "preview": "namespace Refit\n{\n    partial class RequestBuilderImplementation\n    {\n        sealed class TaskToObservable<T> : IObse"
  },
  {
    "path": "Refit/RequestBuilderImplementation.cs",
    "chars": 59182,
    "preview": "using System.Collections;\nusing System.Collections.Concurrent;\nusing System.Diagnostics;\nusing System.Net.Http;\nusing S"
  },
  {
    "path": "Refit/RestMethodInfo.cs",
    "chars": 29612,
    "preview": "using System.Diagnostics;\nusing System.Net.Http;\nusing System.Reflection;\nusing System.Text.RegularExpressions;\n\n// Ena"
  },
  {
    "path": "Refit/RestMethodParameterInfo.cs",
    "chars": 3537,
    "preview": "using System.Reflection;\n\nnamespace Refit\n{\n    /// <summary>\n    /// RestMethodParameterInfo.\n    /// </summary>\n    p"
  },
  {
    "path": "Refit/RestService.cs",
    "chars": 13127,
    "preview": "using System.Collections.Concurrent;\nusing System.Net.Http;\n#if NET8_0_OR_GREATER\nusing System.Diagnostics.CodeAnalysis"
  },
  {
    "path": "Refit/SystemTextJsonContentSerializer.cs",
    "chars": 9847,
    "preview": "using System.Net.Http;\nusing System.Net.Http.Json;\nusing System.Reflection;\nusing System.Text.Json;\nusing System.Text.J"
  },
  {
    "path": "Refit/UniqueName.cs",
    "chars": 2825,
    "preview": "namespace Refit\n{\n    class UniqueName\n    {\n        public static string ForType<T>()\n        {\n            return For"
  },
  {
    "path": "Refit/ValidationApiException.cs",
    "chars": 2289,
    "preview": "using System.Text.Json;\n\nnamespace Refit\n{\n    /// <summary>\n    /// An ApiException that is raised according to RFC 78"
  },
  {
    "path": "Refit/ValueStringBuilder.cs",
    "chars": 8550,
    "preview": "using System.Buffers;\nusing System.Diagnostics;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServ"
  },
  {
    "path": "Refit/targets/refit.props",
    "chars": 117,
    "preview": "<Project>\n\n  <ItemGroup>\n    <CompilerVisibleProperty Include=\"RefitInternalNamespace\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "Refit/targets/refit.targets",
    "chars": 2335,
    "preview": "<Project>\n\n  <PropertyGroup>\n\n    <!--\n    Refit internal namespace to be added to internally generated Refit code. \n   "
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_AllReturnTypes.bat",
    "chars": 80,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_ObservableHttpResponseMessage.bat",
    "chars": 121,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *ObservableHttpResponseMessage* --framework=net6."
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_Task.bat",
    "chars": 102,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *Task_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskApiResponseT.bat",
    "chars": 114,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskApiResponseT_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskHttpContent.bat",
    "chars": 113,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpContent_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskHttpResponseMessage.bat",
    "chars": 121,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpResponseMessage_Async* --framework=net6."
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskStream.bat",
    "chars": 108,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskStream_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskString.bat",
    "chars": 108,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskString_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net5.0/Benchmark_TaskT.bat",
    "chars": 103,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskT_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_AllReturnTypes.bat",
    "chars": 80,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_ObservableHttpResponseMessage.bat",
    "chars": 121,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *ObservableHttpResponseMessage* --framework=net6."
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_Task.bat",
    "chars": 102,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *Task_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskApiResponseT.bat",
    "chars": 114,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskApiResponseT_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskHttpContent.bat",
    "chars": 113,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpContent_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskHttpResponseMessage.bat",
    "chars": 121,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpResponseMessage_Async* --framework=net6."
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskStream.bat",
    "chars": 108,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskStream_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskString.bat",
    "chars": 108,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskString_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/net6.0/Benchmark_TaskT.bat",
    "chars": 103,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskT_Async* --framework=net6.0"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_AllReturnTypes.bat",
    "chars": 87,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_ObservableHttpResponseMessage.bat",
    "chars": 128,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *ObservableHttpResponseMessage* --framework=netco"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_Task.bat",
    "chars": 109,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *Task_Async* --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskApiResponseT.bat",
    "chars": 121,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskApiResponseT_Async* --framework=netcoreapp3."
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskHttpContent.bat",
    "chars": 120,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpContent_Async* --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskHttpResponseMessage.bat",
    "chars": 128,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskHttpResponseMessage_Async* --framework=netco"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskStream.bat",
    "chars": 115,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskStream_Async* --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskString.bat",
    "chars": 115,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskString_Async* --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/Benchmarks/netcoreapp3.1/Benchmark_TaskT.bat",
    "chars": 110,
    "preview": "dotnet run --project ../../Refit.Benchmarks.csproj -c Release --filter *TaskT_Async* --framework=netcoreapp3.1"
  },
  {
    "path": "Refit.Benchmarks/EndToEndBenchmark.cs",
    "chars": 9818,
    "preview": "using System.Net;\nusing AutoFixture;\nusing BenchmarkDotNet.Attributes;\n\nnamespace Refit.Benchmarks;\n\n[MemoryDiagnoser]\n"
  },
  {
    "path": "Refit.Benchmarks/IGitHubService.cs",
    "chars": 2144,
    "preview": "namespace Refit.Benchmarks;\n\npublic interface IGitHubService\n{\n    //Task - throws\n    [Get(\"/users\")]\n    public Task "
  },
  {
    "path": "Refit.Benchmarks/IPerformanceService.cs",
    "chars": 876,
    "preview": "namespace Refit.Benchmarks;\n\npublic interface IPerformanceService\n{\n    [Get(\"/users\")]\n    public Task<HttpResponseMes"
  },
  {
    "path": "Refit.Benchmarks/PerformanceBenchmark.cs",
    "chars": 1692,
    "preview": "using System.Net;\nusing BenchmarkDotNet.Attributes;\n\nnamespace Refit.Benchmarks;\n\n[MemoryDiagnoser]\npublic class Perfor"
  },
  {
    "path": "Refit.Benchmarks/Program.cs",
    "chars": 373,
    "preview": "using BenchmarkDotNet.Running;\nusing Refit.Benchmarks;\n\nif (args is { Length: > 0 })\n{\n    BenchmarkSwitcher.FromAssemb"
  },
  {
    "path": "Refit.Benchmarks/Refit.Benchmarks.csproj",
    "chars": 1792,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n    <Import Project=\"..\\Refit\\targets\\refit.props\" />\n  \n    <PropertyGroup>\n      <"
  },
  {
    "path": "Refit.Benchmarks/SourceGeneratorBenchmark.cs",
    "chars": 3521,
    "preview": "using System.Reflection;\n\nusing BenchmarkDotNet.Attributes;\n\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis"
  },
  {
    "path": "Refit.Benchmarks/SourceGeneratorBenchmarksProjects.cs",
    "chars": 45596,
    "preview": "namespace Refit.Benchmarks;\n\npublic static class SourceGeneratorBenchmarksProjects\n{\n    #region SmallInterface\n    pub"
  },
  {
    "path": "Refit.Benchmarks/StartupBenchmark.cs",
    "chars": 1678,
    "preview": "using System.Net;\nusing BenchmarkDotNet.Attributes;\n\nnamespace Refit.Benchmarks;\n\n[MemoryDiagnoser]\npublic class Startu"
  },
  {
    "path": "Refit.Benchmarks/StaticFileHttpResponseHandler.cs",
    "chars": 964,
    "preview": "using System.Net;\n\nnamespace Refit.Benchmarks;\n\npublic class StaticFileHttpResponseHandler : HttpMessageHandler\n{\n    p"
  },
  {
    "path": "Refit.Benchmarks/StaticValueHttpResponseHandler.cs",
    "chars": 556,
    "preview": "using System.Net;\n\nnamespace Refit.Benchmarks;\n\npublic class StaticValueHttpResponseHandler (string response, HttpStatu"
  },
  {
    "path": "Refit.Benchmarks/newtonsoft-json-10-users.json",
    "chars": 2304,
    "preview": "[\n  {\n    \"Id\": 253,\n    \"Name\": \"Namee3a23814-bfe9-4d4b-96db-8fc95d209ea8\",\n    \"Bio\": \"Biof413d158-7ca7-4b1b-9073-565b"
  },
  {
    "path": "Refit.Benchmarks/system-text-json-10-users.json",
    "chars": 2304,
    "preview": "[\n  {\n    \"id\": 253,\n    \"name\": \"Namee3a23814-bfe9-4d4b-96db-8fc95d209ea8\",\n    \"bio\": \"Biof413d158-7ca7-4b1b-9073-565b"
  },
  {
    "path": "Refit.GeneratorTests/Fixture.cs",
    "chars": 4387,
    "preview": "using System.Reflection;\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.CSharp;\nusing Refit.Generator;\n\nnam"
  },
  {
    "path": "Refit.GeneratorTests/GeneratedTest.cs",
    "chars": 485,
    "preview": "namespace Refit.GeneratorTests;\n\npublic class GeneratedTest\n{\n    [Fact]\n    public Task ShouldEmitAllFiles()\n    {\n   "
  },
  {
    "path": "Refit.GeneratorTests/Incremental/FunctionTest.cs",
    "chars": 8368,
    "preview": "using Microsoft.CodeAnalysis.CSharp;\n\nnamespace Refit.GeneratorTests.Incremental;\n\npublic class FunctionTest\n{\n    priv"
  },
  {
    "path": "Refit.GeneratorTests/Incremental/GenericTest.cs",
    "chars": 4772,
    "preview": "using Microsoft.CodeAnalysis.CSharp;\n\nnamespace Refit.GeneratorTests.Incremental;\n\npublic class GenericTest\n{\n    priva"
  },
  {
    "path": "Refit.GeneratorTests/Incremental/IncrementalGeneratorRunReasons.cs",
    "chars": 1098,
    "preview": "using Microsoft.CodeAnalysis;\n\nnamespace Refit.GeneratorTests.Incremental;\n\ninternal record IncrementalGeneratorRunReas"
  },
  {
    "path": "Refit.GeneratorTests/Incremental/IncrementalTest.cs",
    "chars": 3112,
    "preview": "using Microsoft.CodeAnalysis.CSharp;\n\nnamespace Refit.GeneratorTests.Incremental;\n\npublic class IncrementalTest\n{\n    p"
  },
  {
    "path": "Refit.GeneratorTests/Incremental/InheritanceTest.cs",
    "chars": 2966,
    "preview": "using Microsoft.CodeAnalysis.CSharp;\n\nnamespace Refit.GeneratorTests.Incremental;\n\npublic class InheritanceTest\n{\n    p"
  },
  {
    "path": "Refit.GeneratorTests/Incremental/TestHelper.cs",
    "chars": 3599,
    "preview": "using Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.CSharp;\nusing Microsoft.CodeAnalysis.CSharp.Syntax;\n\nusing R"
  },
  {
    "path": "Refit.GeneratorTests/InterfaceTests.cs",
    "chars": 5032,
    "preview": "namespace Refit.GeneratorTests;\n\npublic class InterfaceTests\n{\n    [Fact]\n    public Task ContainedInterfaceTest()\n    "
  },
  {
    "path": "Refit.GeneratorTests/MethodTests.cs",
    "chars": 726,
    "preview": "namespace Refit.GeneratorTests;\n\npublic class MethodTests\n{\n    [Fact]\n    public Task MethodsWithGenericConstraints()\n"
  },
  {
    "path": "Refit.GeneratorTests/ModuleInitializer.cs",
    "chars": 563,
    "preview": "using System.Runtime.CompilerServices;\nusing VerifyTests.DiffPlex;\n\nnamespace Refit.GeneratorTests;\n\npublic static clas"
  },
  {
    "path": "Refit.GeneratorTests/ParameterTests.cs",
    "chars": 923,
    "preview": "namespace Refit.GeneratorTests;\n\npublic class ParameterTests\n{\n    [Fact]\n    public Task RouteParameter()\n    {\n      "
  },
  {
    "path": "Refit.GeneratorTests/Refit.GeneratorTests.csproj",
    "chars": 2598,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Refit\\targets\\refit.props\" />\n\n  <PropertyGroup>\n    <TargetFr"
  },
  {
    "path": "Refit.GeneratorTests/ReturnTypeTests.cs",
    "chars": 1989,
    "preview": "namespace Refit.GeneratorTests;\n\npublic class ReturnTypeTests\n{\n    [Fact]\n    public Task GenericTaskShouldWork()\n    "
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#Generated.g.verified.cs",
    "chars": 863,
    "preview": "//HintName: Generated.g.cs\n\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    /// <inheritdoc />\n    [globa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#IGeneratedClient.g.verified.cs",
    "chars": 1551,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/GeneratedTest.ShouldEmitAllFiles#PreserveAttribute.g.verified.cs",
    "chars": 935,
    "preview": "//HintName: PreserveAttribute.g.cs\n\n#pragma warning disable\nnamespace RefitInternalGenerated\n{\n    [global::System.Diag"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.ContainedInterfaceTest#IContainedInterface.g.verified.cs",
    "chars": 1603,
    "preview": "//HintName: IContainedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.DefaultInterfaceMethod#IGeneratedInterface.g.verified.cs",
    "chars": 1563,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.DerivedDefaultInterfaceMethod#IBaseInterface.g.verified.cs",
    "chars": 1553,
    "preview": "//HintName: IBaseInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.DerivedDefaultInterfaceMethod#IGeneratedInterface.g.verified.cs",
    "chars": 2069,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.DisposableTest#IGeneratedInterface.g.verified.cs",
    "chars": 1641,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.GlobalNamespaceTest#IGeneratedInterface.g.verified.cs",
    "chars": 1508,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs",
    "chars": 1543,
    "preview": "//HintName: IBaseInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceDerivedFromRefitBaseTest#IDerivedInterface.g.verified.cs",
    "chars": 1590,
    "preview": "//HintName: IDerivedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    part"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfaceWithGenericConstraint#IGeneratedInterface.g.verified.cs",
    "chars": 1715,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentCasing#IApi.g.verified.cs",
    "chars": 1503,
    "preview": "//HintName: IApi.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial class Gen"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentCasing#Iapi1.g.verified.cs",
    "chars": 1504,
    "preview": "//HintName: Iapi1.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial class Ge"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentSignature#IApi.g.verified.cs",
    "chars": 1503,
    "preview": "//HintName: IApi.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial class Gen"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.InterfacesWithDifferentSignature#IApi1.g.verified.cs",
    "chars": 1510,
    "preview": "//HintName: IApi1.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial class Ge"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.NestedNamespaceTest#IGeneratedInterface.g.verified.cs",
    "chars": 1582,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.NonRefitMethodShouldRaiseDiagnostic#IGeneratedClient.g.verified.cs",
    "chars": 1833,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.NonRefitMethodShouldRaiseDiagnostic.verified.txt",
    "chars": 710,
    "preview": "{\n  Diagnostics: [\n    {\n      Location: /*\n\nvoid NonRefitMethod();\n     ^^^^^^^^^^^^^^\n}\n*/\n : (16,5)-(16,19),\n      M"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromBaseTest#IGeneratedInterface.g.verified.cs",
    "chars": 1880,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromBaseTest.verified.txt",
    "chars": 717,
    "preview": "{\n  Diagnostics: [\n    {\n      Location: /*\n{\n    void NonRefitMethod();\n         ^^^^^^^^^^^^^^\n}\n*/\n : (19,9)-(19,23)"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IBaseInterface.g.verified.cs",
    "chars": 1553,
    "preview": "//HintName: IBaseInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    partial"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/InterfaceTests.RefitInterfaceDerivedFromRefitBaseTest#IGeneratedInterface.g.verified.cs",
    "chars": 2069,
    "preview": "//HintName: IGeneratedInterface.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    pa"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/MethodTests.MethodsWithGenericConstraints#IGeneratedClient.g.verified.cs",
    "chars": 2337,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/MethodTests.MethodsWithGenericConstraints.verified.txt",
    "chars": 748,
    "preview": "{\n  Diagnostics: [\n    {\n      Location: /*\n\nvoid NonRefitMethod<T1, T2, T3, T4, T5>()\n     ^^^^^^^^^^^^^^\n    where T1"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ParameterTests.NullableRouteParameter#IGeneratedClient.g.verified.cs",
    "chars": 1644,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ParameterTests.NullableValueTypeRouteParameter#IGeneratedClient.g.verified.cs",
    "chars": 1639,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ParameterTests.RouteParameter#IGeneratedClient.g.verified.cs",
    "chars": 1643,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ParameterTests.ValueTypeRouteParameter#IGeneratedClient.g.verified.cs",
    "chars": 1637,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericConstraintReturnTask#IGeneratedClient.g.verified.cs",
    "chars": 1658,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericStructConstraintReturnTask#IGeneratedClient.g.verified.cs",
    "chars": 1624,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericTaskShouldWork#IGeneratedClient.g.verified.cs",
    "chars": 1551,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.GenericUnmanagedConstraintReturnTask#IGeneratedClient.g.verified.cs",
    "chars": 1627,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnIObservable#IGeneratedClient.g.verified.cs",
    "chars": 1671,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnNullableObject#IGeneratedClient.g.verified.cs",
    "chars": 1551,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnNullableValueType#IGeneratedClient.g.verified.cs",
    "chars": 1547,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.ReturnUnsupportedType#IGeneratedClient.g.verified.cs",
    "chars": 1541,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.GeneratorTests/_snapshots/ReturnTypeTests.VoidTaskShouldWork#IGeneratedClient.g.verified.cs",
    "chars": 1530,
    "preview": "//HintName: IGeneratedClient.g.cs\n#nullable disable\n#pragma warning disable\nnamespace Refit.Implementation\n{\n\n    parti"
  },
  {
    "path": "Refit.HttpClientFactory/HttpClientFactoryCore.cs",
    "chars": 11772,
    "preview": "\nusing System;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Reflection;\nusing System.Runtime.CompilerServices"
  },
  {
    "path": "Refit.HttpClientFactory/HttpClientFactoryExtensions.cs",
    "chars": 18049,
    "preview": "using System;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Reflection;\nusing Microsoft.Extensions.DependencyI"
  },
  {
    "path": "Refit.HttpClientFactory/HttpClientFactoryExtensions.tt",
    "chars": 4850,
    "preview": "<#@ template debug=\"false\" hostspecific=\"false\" language=\"C#\" #>\n<#@ output extension=\".cs\" #>\nusing System;\nusing Syst"
  },
  {
    "path": "Refit.HttpClientFactory/Refit.HttpClientFactory.csproj",
    "chars": 1074,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <Product>Refit HTTP Client Factory Extensions</Product>\n    <D"
  },
  {
    "path": "Refit.HttpClientFactory/SettingsFor.cs",
    "chars": 910,
    "preview": "namespace Refit\n{\n    /// <summary>\n    /// ISettingsFor\n    /// </summary>\n    public interface ISettingsFor\n    {\n   "
  },
  {
    "path": "Refit.Newtonsoft.Json/NewtonsoftJsonContentSerializer.cs",
    "chars": 3193,
    "preview": "using System.Net.Http;\nusing System.Reflection;\nusing System.Text;\nusing Newtonsoft.Json;\n\nnamespace Refit\n{\n    /// <s"
  },
  {
    "path": "Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj",
    "chars": 972,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <Product>Refit Serializer for Newtonsoft.Json ($(TargetFramewo"
  },
  {
    "path": "Refit.Tests/API/ApiApprovalTests.Refit.DotNet8_0.verified.txt",
    "chars": 24397,
    "preview": "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(\"Refit.HttpClientFactory\")]\n[assembly: System.Runtime.Com"
  },
  {
    "path": "Refit.Tests/API/ApiApprovalTests.Refit.DotNet9_0.verified.txt",
    "chars": 24397,
    "preview": "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(\"Refit.HttpClientFactory\")]\n[assembly: System.Runtime.Com"
  },
  {
    "path": "Refit.Tests/API/ApiApprovalTests.cs",
    "chars": 818,
    "preview": "// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.\n// Licensed to the .NET Foundation under o"
  },
  {
    "path": "Refit.Tests/API/ApiExtensions.cs",
    "chars": 1846,
    "preview": "// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.\n// Licensed to the .NET Foundation under o"
  },
  {
    "path": "Refit.Tests/API/_snapshots/ApiApprovalTests.Refit.DotNet10_0.verified.txt",
    "chars": 28877,
    "preview": "[assembly: System.Runtime.CompilerServices.DisableRuntimeMarshalling]\n[assembly: System.Runtime.CompilerServices.Intern"
  },
  {
    "path": "Refit.Tests/API/_snapshots/ApiApprovalTests.Refit.DotNet8_0.verified.txt",
    "chars": 28805,
    "preview": "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(\"Refit.HttpClientFactory\")]\n[assembly: System.Runtime.Com"
  },
  {
    "path": "Refit.Tests/API/_snapshots/ApiApprovalTests.Refit.DotNet9_0.verified.txt",
    "chars": 28805,
    "preview": "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(\"Refit.HttpClientFactory\")]\n[assembly: System.Runtime.Com"
  },
  {
    "path": "Refit.Tests/App.config",
    "chars": 582,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n  <runtime>\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-c"
  },
  {
    "path": "Refit.Tests/AuthenticatedClientHandlerTests.cs",
    "chars": 13864,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Net.Http;\nusing System.Text;\nusing Syste"
  },
  {
    "path": "Refit.Tests/CachedRequestBuilder.cs",
    "chars": 5307,
    "preview": "using System.Net;\nusing System.Net.Http;\nusing System.Reflection;\n\nusing RichardSzalay.MockHttp;\n\nusing Xunit;\n\nnamespa"
  },
  {
    "path": "Refit.Tests/CamelCaseUrlParameterKeyFormatter.cs",
    "chars": 1374,
    "preview": "using Xunit;\n\nnamespace Refit.Tests;\n\npublic class CamelCaselTestsRequest\n{\n    public string alreadyCamelCased { get; "
  },
  {
    "path": "Refit.Tests/DefaultUrlParameterFormatterTest.cs",
    "chars": 10305,
    "preview": "using System.Globalization;\nusing System.Reflection;\nusing Xunit;\n\nnamespace Refit.Tests;\n\npublic class DefaultUrlParam"
  },
  {
    "path": "Refit.Tests/DeliminatorSeparatedPropertyNamesContractResolver.cs",
    "chars": 1271,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Text;\nusing Newtonsoft.Json.Se"
  },
  {
    "path": "Refit.Tests/DeserializationExceptionFactoryTests.cs",
    "chars": 5049,
    "preview": "using System.Net;\nusing System.Net.Http;\nusing RichardSzalay.MockHttp;\nusing Xunit;\n\nnamespace Refit.Tests;\n\npublic cla"
  },
  {
    "path": "Refit.Tests/ExceptionFactoryTests.cs",
    "chars": 3409,
    "preview": "using System;\nusing System.Net;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing Refit; // for the code gen\nu"
  },
  {
    "path": "Refit.Tests/ExplicitInterfaceRefitTests.cs",
    "chars": 1843,
    "preview": "using System.Net.Http;\nusing System.Threading.Tasks;\nusing Refit;\nusing RichardSzalay.MockHttp;\nusing Xunit;\n\nnamespace"
  },
  {
    "path": "Refit.Tests/FormValueMultimapTests.cs",
    "chars": 9450,
    "preview": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Text.Json.Seriali"
  },
  {
    "path": "Refit.Tests/GitHubApi.cs",
    "chars": 3946,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Text;\nusing Syst"
  }
]

// ... and 81 more files (download for full content)

About this extraction

This page contains the full source code of the reactiveui/refit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 281 files (1.3 MB), approximately 293.9k tokens, and a symbol index with 1982 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!