Voyager.Common.Proxy.Server.Core
1.7.7
See the version list below for details.
dotnet add package Voyager.Common.Proxy.Server.Core --version 1.7.7
NuGet\Install-Package Voyager.Common.Proxy.Server.Core -Version 1.7.7
<PackageReference Include="Voyager.Common.Proxy.Server.Core" Version="1.7.7" />
<PackageVersion Include="Voyager.Common.Proxy.Server.Core" Version="1.7.7" />
<PackageReference Include="Voyager.Common.Proxy.Server.Core" />
paket add Voyager.Common.Proxy.Server.Core --version 1.7.7
#r "nuget: Voyager.Common.Proxy.Server.Core, 1.7.7"
#:package Voyager.Common.Proxy.Server.Core@1.7.7
#addin nuget:?package=Voyager.Common.Proxy.Server.Core&version=1.7.7
#tool nuget:?package=Voyager.Common.Proxy.Server.Core&version=1.7.7
Voyager.Common.Proxy.Server.Core
Core logic for service scanning, endpoint metadata building, and request dispatching.
Overview
This package contains the shared implementation used by both Voyager.Common.Proxy.Server.AspNetCore and Voyager.Common.Proxy.Server.Owin to transform service interfaces into HTTP endpoints.
Key Types
ServiceScanner- Scans service interfaces and builds endpoint descriptors using the same routing conventions asVoyager.Common.Proxy.ClientRequestDispatcher- Invokes service methods based on HTTP requests and writes responsesRequestValidator- Validates request parameters before method executionParameterBinder- Binds request parameters from route values, query strings, and request bodyEndpointMatcher- Matches incoming HTTP requests to registered endpoints
Routing Conventions
The scanner uses the same conventions as the client library:
| Method Prefix | HTTP Method | Route Template |
|---|---|---|
Get, Find, Search |
GET | /{ServiceName}/{MethodName}/{id?} |
Create, Add, Insert |
POST | /{ServiceName}/{MethodName} |
Update, Modify, Set |
PUT | /{ServiceName}/{MethodName}/{id} |
Delete, Remove |
DELETE | /{ServiceName}/{MethodName}/{id} |
| Other | POST | /{ServiceName}/{MethodName} |
Usage
This package is typically not used directly. Instead, use one of the platform-specific packages:
- ASP.NET Core (.NET 6.0+):
Voyager.Common.Proxy.Server.AspNetCore - OWIN (.NET Framework 4.8):
Voyager.Common.Proxy.Server.Owin
Error Type to HTTP Status Code Mapping
According to ADR-007, Result<T>.Error types are mapped to HTTP status codes:
| ErrorType | HTTP Status | Classification |
|---|---|---|
Validation |
400 Bad Request | Business |
Business |
400 Bad Request | Business |
Unauthorized |
401 Unauthorized | Business |
Permission |
403 Forbidden | Business |
NotFound |
404 Not Found | Business |
Conflict |
409 Conflict | Business |
Cancelled |
499 Client Closed | Business |
Timeout |
504 Gateway Timeout | Transient |
Unavailable |
503 Service Unavailable | Transient |
CircuitBreakerOpen |
503 Service Unavailable | Transient |
Database |
500 Internal Server Error | Infrastructure |
Unexpected |
500 Internal Server Error | Infrastructure |
Classification meaning:
- Business errors: Client should NOT retry (invalid input, not found, no permission)
- Transient errors: Client MAY retry (temporary unavailability)
- Infrastructure errors: Client should NOT retry, but circuit breaker should count
Server-to-Server Calls
When your server needs to call other services, use Voyager.Common.Proxy.Client with built-in resilience:
// In your server's Startup/Program.cs
services.AddServiceProxy<IPaymentService>(options =>
{
options.BaseUrl = new Uri("https://payments.internal.com");
options.Resilience.Retry.Enabled = true;
options.Resilience.CircuitBreaker.Enabled = true;
});
See Voyager.Common.Proxy.Client for details.
Request Validation
The RequestDispatcher supports automatic validation of request parameters when [ValidateRequest] attribute is present on the method or interface.
How It Works
- Before invoking the service method,
RequestValidatorchecks all parameters - Parameters implementing
IValidatableRequestorIValidatableRequestBoolare validated - Parameters with
[ValidationMethod]attribute have that method invoked - On validation failure,
ArgumentExceptionis thrown and caught by existing error handling - HTTP 400 response is returned with
ErrorType="Validation"
Validation Flow
HTTP Request
│
▼
RequestDispatcher
│
├─► Deserialize parameters
│
├─► Check [ValidateRequest] attribute
│ │
│ └─► RequestValidator.ValidateParameters()
│ │
│ ├─ IValidatableRequest.IsValid() → Result
│ ├─ IValidatableRequestBool.IsValid() → bool
│ └─ [ValidationMethod] → Result or bool
│
├─► On failure: throw ArgumentException
│ │
│ └─► HTTP 400 + ErrorType="Validation"
│
└─► On success: Invoke service method
Supported Validation Approaches
| Approach | Detection | Performance |
|---|---|---|
IValidatableRequest |
Interface cast | Fast |
IValidatableRequestBool |
Interface cast | Fast |
[ValidationMethod] |
Reflection | Slower |
Example
// Service interface with validation
[ValidateRequest]
public interface IPaymentService
{
Task<Result<Payment>> CreatePaymentAsync(CreatePaymentRequest request);
}
// Request model with validation
public class CreatePaymentRequest : IValidatableRequest
{
public decimal Amount { get; set; }
public string Currency { get; set; }
public Result IsValid()
{
if (Amount <= 0)
return Result.Failure(Error.ValidationError("Amount must be positive"));
if (string.IsNullOrEmpty(Currency))
return Result.Failure(Error.ValidationError("Currency is required"));
return Result.Success();
}
}
When an invalid request is received, the response will be:
HTTP 400 Bad Request
ErrorType: Validation
ErrorMessage: Amount must be positive
Target Framework
netstandard2.0- Compatible with .NET Framework 4.6.1+, .NET Core 2.0+, and .NET 5+
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Text.Json (>= 8.0.5)
- Voyager.Common.Proxy.Abstractions (>= 1.7.7)
- Voyager.Common.Proxy.Server.Abstractions (>= 1.7.7)
- Voyager.Common.Results (>= 1.7.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Voyager.Common.Proxy.Server.Core:
| Package | Downloads |
|---|---|
|
Voyager.Common.Proxy.Server.Swagger.Core
Core logic for Swagger/OpenAPI generation from Voyager.Common.Proxy service interfaces. Shared between ASP.NET Core and OWIN implementations. |
|
|
Voyager.Common.Proxy.Server.AspNetCore
ASP.NET Core integration for Voyager.Common.Proxy.Server - automatically generates HTTP endpoints from service interfaces. |
|
|
Voyager.Common.Proxy.Server.Owin
OWIN integration for Voyager.Common.Proxy.Server - automatically generates HTTP endpoints from service interfaces for .NET Framework 4.8. Uses raw OWIN delegate signatures for maximum compatibility. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.8.0-preview | 0 | 2/10/2026 |
| 1.7.8-preview.1 | 27 | 2/9/2026 |
| 1.7.7 | 54 | 2/6/2026 |
| 1.7.7-preview.1.1 | 30 | 2/6/2026 |
| 1.7.7-preview | 0 | 2/10/2026 |