![]() |
VOOZH | about |
dotnet add package IceRpc.Slice --version 0.6.0
NuGet\Install-Package IceRpc.Slice -Version 0.6.0
<PackageReference Include="IceRpc.Slice" Version="0.6.0" />
<PackageVersion Include="IceRpc.Slice" Version="0.6.0" />Directory.Packages.props
<PackageReference Include="IceRpc.Slice" />Project file
paket add IceRpc.Slice --version 0.6.0
#r "nuget: IceRpc.Slice, 0.6.0"
#:package IceRpc.Slice@0.6.0
#addin nuget:?package=IceRpc.Slice&version=0.6.0Install as a Cake Addin
#tool nuget:?package=IceRpc.Slice&version=0.6.0Install as a Cake Tool
The IceRPC framework allows you to make RPCs with the serialization format and IDL of your choice. It provides full support for both Slice and Protobuf.
IceRpc.Slice provides integration code between the IceRPC core APIs and code generated by the Slice compiler for C#.
Package | Source code | Documentation | Examples | API reference
// Slice contract
module VisitorCenter
/// Represents a simple greeter.
interface Greeter {
/// Creates a personalized greeting.
/// @param name: The name of the person to greet.
/// @returns: The greeting.
greet(name: string) -> string
}
// Client application
using IceRpc;
using VisitorCenter;
await using var connection = new ClientConnection(new Uri("icerpc://localhost"));
// GreeterProxy is a struct generated by the Slice compiler; its implementation uses
// IceRpc.Slice.
var greeter = new GreeterProxy(connection);
string greeting = await greeter.GreetAsync(Environment.UserName);
Console.WriteLine(greeting);
await connection.ShutdownAsync();
// Server application
using IceRpc;
using IceRpc.Features;
using VisitorCenter;
await using var server = new Server(new Chatbot());
server.Listen();
// Wait until the console receives a Ctrl+C.
await CancelKeyPressed;
await server.ShutdownAsync();
// IGreeterService is an interface generated by the Slice compiler.
// The [Service] attribute instructs the Source Generator to implement IDispatcher by
// routing "greet" requests to the GreetAsync method.
[Service]
internal partial class Chatbot : IGreeterService
{
public ValueTask<string> GreetAsync(
string name,
IFeatureCollection features,
CancellationToken cancellationToken)
{
Console.WriteLine($"Dispatching greet request {{ name = '{name}' }}");
return new($"Hello, {name}!");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.0 | 135 | 6/5/2026 |
| 0.5.2 | 190 | 5/18/2026 |
| 0.5.1 | 359 | 1/7/2026 |
| 0.5.0 | 792 | 12/1/2025 |
| 0.4.1 | 634 | 11/15/2024 |
| 0.4.0.1 | 357 | 9/17/2024 |
| 0.4.0 | 285 | 9/16/2024 |
| 0.3.1 | 3,281 | 3/28/2024 |
| 0.3.0 | 752 | 2/14/2024 |
| 0.2.1 | 788 | 12/12/2023 |
| 0.2.0 | 510 | 12/4/2023 |
| 0.1.2 | 485 | 10/9/2023 |
| 0.1.1 | 300 | 9/18/2023 |
| 0.1.0 | 331 | 9/6/2023 |