Afrowave.SharedTools.Models 0.0.21

There is a newer version of this package available.
See the version list below for details.
dotnet add package Afrowave.SharedTools.Models --version 0.0.21
                    
NuGet\Install-Package Afrowave.SharedTools.Models -Version 0.0.21
                    
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="Afrowave.SharedTools.Models" Version="0.0.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Afrowave.SharedTools.Models" Version="0.0.21" />
                    
Directory.Packages.props
<PackageReference Include="Afrowave.SharedTools.Models" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Afrowave.SharedTools.Models --version 0.0.21
                    
#r "nuget: Afrowave.SharedTools.Models, 0.0.21"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Afrowave.SharedTools.Models@0.0.21
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Afrowave.SharedTools.Models&version=0.0.21
                    
Install as a Cake Addin
#tool nuget:?package=Afrowave.SharedTools.Models&version=0.0.21
                    
Install as a Cake Tool

Afrowave.SharedTools.Models

This module contains standardized models and data wrappers used across Afrowave projects. These structures are intended to simplify the design of method results, API communication, and metadata encapsulation.


📦 Contents

  • Results/Result.cs – A minimal boolean result wrapper
  • Results/Response<T>.cs – A generic response container with data, message, and flags

✅ Result

A simple result type for indicating success or failure without returning data.

var result = Result.Ok("Operation succeeded");
if (!result.Success) Console.WriteLine(result.Message);

Main members:

  • bool Success
  • string Message
  • Result.Ok(string message) – success with message
  • Result.Fail(string message) – failure with message

✅ Response<T>

A standardized generic response class for wrapping data with result metadata.

var response = Response<User>.SuccessResponse(user, "User loaded successfully");
if (response.Success) Display(response.Data);

Main members:

  • bool Success
  • bool Warning
  • string Message
  • T Data

Factory methods:

  • SuccessResponse(T data, string message)
  • Fail(string message)
  • EmptySuccess()
  • SuccessWithWarning(T data, string warningMessage)
  • Fail(Exception ex)

🌐 LibreTranslate Models

Models for integration with the LibreTranslate API.

Settings

LibreServer
Configuration for LibreTranslate server endpoints and authentication.
Members:

  • string ApiKey – API key for authentication
  • string Host – Server host or IP
  • string DetectLanguageEndpoint – Endpoint for language detection
  • string LanguagesEndpoint – Endpoint for supported languages
  • string TranslateEndpoint – Endpoint for text translation
  • string TranslateFileEndpoint – Endpoint for file translation
  • bool NeedsKey – Indicates if API key is required

Requests

Translate
Request for translating text.
Members:

  • string Q – Text to translate
  • string Source – Source language code
  • string Target – Target language code
  • string Format – Output format
  • int Alternatives – Number of alternatives
  • string? Api_key – API key

TranslateFile
Request for translating a file.
Members:

  • IFormFile File – File to translate
  • string Source – Source language code
  • string Target – Target language code
  • string Api_key – API key

DetectLanguage
Request for detecting the language of a text.
Members:

  • string Q – Text to analyze
  • string Api_key – API key

Responses

Detections
Result of language detection.
Members:

  • string Language – Detected language code
  • int Confidence – Confidence score

Translate
Result of a text translation.
Members:

  • string TranslatedText – Translated text
  • Detections DetectedLanguage – Detected source language
  • List<string> Alternatives – Alternative translations

TranslateFile
Result of a file translation.
Members:

  • string TranslatedFileUrl – URL to the translated file

ErrorResponse
Error details from LibreTranslate API.
Members:

  • string Error – Error message

LibreLanguage
Information about a supported language.
Members:

  • string Code – Language code
  • string Name – Language name
  • List<string> Targets – Supported target languages

🧭 Structure

All model classes follow clear, consistent naming and XML documentation. They are compatible with .NET Standard 2.1 and intended for use across console, web, and library layers.


✍️ This file is part of the multilingual documentation system. Translations will be managed by LangHub.

Product 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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Afrowave.SharedTools.Models:

Package Downloads
Afrowave.SharedTools.Api

API abstractions and helpers for Afrowave.SharedTools. Provides standardized interfaces and wrappers for integration.Added multipart forms

Afrowave.SharedTools.Ftp

Universal FTP toolkit.

Afrowave.SharedTools.IO

Universal IO toolkit.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.31 163 10/7/2025
0.0.30 124 10/6/2025
0.0.21 126 10/5/2025
0.0.2 115 10/4/2025
0.0.1 96 10/4/2025

Same as 0.0.2 Readme fixed. Support for LibreTranslate models