HyperDev.Remoting
1.2.0
dotnet add package HyperDev.Remoting --version 1.2.0
NuGet\Install-Package HyperDev.Remoting -Version 1.2.0
<PackageReference Include="HyperDev.Remoting" Version="1.2.0" />
<PackageVersion Include="HyperDev.Remoting" Version="1.2.0" />
<PackageReference Include="HyperDev.Remoting" />
paket add HyperDev.Remoting --version 1.2.0
#r "nuget: HyperDev.Remoting, 1.2.0"
#:package HyperDev.Remoting@1.2.0
#addin nuget:?package=HyperDev.Remoting&version=1.2.0
#tool nuget:?package=HyperDev.Remoting&version=1.2.0
HyperDev.Remoting
Contract and annotations for remote objects (server objects whose methods are called from the browser), part of the HyperDev Fatum framework. This package has no dependency on ASP.NET Core: it describes what is exposed, while HyperDev.Web.Remoting serves it over HTTP and HyperDev.TypeScript.Remoting generates the TypeScript client.
RemoteContract: one rule for which methods are remote, shared by the server dispatcher and the TypeScript generator- Exposure per assembly or class (
[RemoteExposure]:GeneratedorExplicit) and per method ([RemotePolicy]: ignore, timeout, loader, confirmation, HTTP GET) - URI activation of child objects (
UriActivator<TActivator>,[UriActivator],UriActivatorCache) - Client state protection (
[ClientState],[ClientWritable],[ClientReadOnly],[ClientWriteOnly],[ClientIgnore],CallerProtection) - Response caching (
[RemoteCache]) and OData query settings forIQueryablemethods ([RemoteQueryable]) - Client-implemented methods (
[ClientGenerated],[ClientScript])
Installation
dotnet add package HyperDev.Remoting
Quick start
using HyperDev.Remoting;
// Root remote object: its public instance methods are remote by default
[UriActivator(typeof(ShopActivator))]
public class Shop
{
public Order GetOrder(int id) => new Order { Id = id };
[RemotePolicy(UseHttpGet = true), RemoteCache(300)]
public string[] GetCategories() => new[] { "Books", "Music" };
}
[ClientState(ClientStateMode.Explicit)]
public class Order
{
public int Id { get; set; }
[ClientWritable]
public string Notes { get; set; }
public decimal Total { get; set; }
[RemotePolicy(RequiresConfirmation = true, ConfirmationMessage = "Confirm the order?")]
public void Confirm() { /* ... */ }
}
// Child remote objects are addressed by URI and rebuilt on the server
public class ShopActivator : UriActivator<Shop>
{
protected override void RegisterTypes()
{
RegisterActivator(shop => shop.GetOrder(0), order => order.Id);
}
}
UriActivatorCache.Get<ShopActivator>().CreateUri(order) returns Order?id=42; CreateInstance(shop, uri) calls shop.GetOrder(42) again.
Key members (here Id) and references to other remote objects are never accepted from the client.
Target frameworks
.NET 8.0, .NET 10.0
License
MIT, © Ivan Senatore, Wemake Informatica srl. Third-party dependencies keep their own licenses (Microsoft.Extensions.*: MIT).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net10.0
- HyperDev.Core (>= 1.2.4)
-
net8.0
- HyperDev.Core (>= 1.2.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HyperDev.Remoting:
| Package | Downloads |
|---|---|
|
HyperDev.Web.Remoting
HyperDev Fatum Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.