ManagedCode.Communication.Orleans 2.0.14

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET 6.0
dotnet add package ManagedCode.Communication.Orleans --version 2.0.14
NuGet\Install-Package ManagedCode.Communication.Orleans -Version 2.0.14
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ManagedCode.Communication.Orleans" Version="2.0.14" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ManagedCode.Communication.Orleans --version 2.0.14
#r "nuget: ManagedCode.Communication.Orleans, 2.0.14"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ManagedCode.Communication.Orleans as a Cake Addin
#addin nuget:?package=ManagedCode.Communication.Orleans&version=2.0.14

// Install ManagedCode.Communication.Orleans as a Cake Tool
#tool nuget:?package=ManagedCode.Communication.Orleans&version=2.0.14

Communication

.NET Coverage Status nuget CodeQL NuGet Package

The Communication library is a convenient wrapper for handling the results of functions that do not throw exceptions. Instead of throwing exceptions, these functions return an object that contains the result of the operation. This makes it easy to handle and process the results of these operations in a consistent, reliable way.

Motivation

Many functions in software development can fail and throw exceptions when something goes wrong. This can make it difficult to handle errors and to read and understand code that uses these functions.

Exceptions are a powerful tool for handling error conditions in your code, but they can also be difficult to manage and can make your code harder to read and understand. Instead of throwing exceptions, the Communication library allows you to return a Result object that contains the result of an operation. This makes it easy to handle and process the results of these operations in a consistent, reliable way.

Features

  • Wraps the result of a function in an object, eliminating the need to handle exceptions.
  • Makes it easy to check whether the function was successful or not.
  • Provides access to the function's output via simple property accessors.

Getting Started

To use the Communication library in your project, you will need to add a reference to the Communication assembly. You can do this by downloading the library from GitHub and adding it to your project, or by installing the Communication NuGet package.

Once you have added a reference to the Communication assembly, you can start using the library in your code. Here is a simple example of how to use the Communication library to handle the result of an operation:

var succeed = Result.Succeed();
if(succeed.IsSuccess)
{
    // do some
}

var fail = Result.Fail();
if(fail.IsFailed)
{
    // do some
}

Generic Result

var succeed = Result<MyObject>.Succeed(new MyObject());
if(succeed.IsSuccess)
{
    succeed.Value // <-- this is the result
    // do some
}

var fail = Result<MyObject>.Fail("Oops!");
if(fail.IsFailed)
{
    // do some
}

From

var succeed = await Result<MyObject>.From(() => GetMyResult());
if(succeed.IsSuccess)
{
    succeed.Value // <-- this is the result
    // do some
}

Conclusion

In summary, our library provides a convenient and easy-to-use solution for handling the result of a function that may throw exceptions. It eliminates the need to handle exceptions and makes it easy to check whether the function was successful and to access its output. We hope you find it useful in your own projects!

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on ManagedCode.Communication.Orleans:

Package Downloads
ManagedCode.Orleans.Identity The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Identity base on Orleans

ManagedCode.Orleans.Identity.Server The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Identity base on Orleans

ManagedCode.Orleans.Identity.Client The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Identity base on Orleans

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.14 13 2/7/2023
2.0.13 449 12/19/2022
2.0.12 110 12/19/2022
2.0.11 130 12/8/2022
2.0.10 151 12/3/2022