Afrowave.SharedTools.Models
0.0.21
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
<PackageReference Include="Afrowave.SharedTools.Models" Version="0.0.21" />
<PackageVersion Include="Afrowave.SharedTools.Models" Version="0.0.21" />
<PackageReference Include="Afrowave.SharedTools.Models" />
paket add Afrowave.SharedTools.Models --version 0.0.21
#r "nuget: Afrowave.SharedTools.Models, 0.0.21"
#:package Afrowave.SharedTools.Models@0.0.21
#addin nuget:?package=Afrowave.SharedTools.Models&version=0.0.21
#tool nuget:?package=Afrowave.SharedTools.Models&version=0.0.21
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 wrapperResults/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 Successstring MessageResult.Ok(string message)– success with messageResult.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 Successbool Warningstring MessageT 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 authenticationstring Host– Server host or IPstring DetectLanguageEndpoint– Endpoint for language detectionstring LanguagesEndpoint– Endpoint for supported languagesstring TranslateEndpoint– Endpoint for text translationstring TranslateFileEndpoint– Endpoint for file translationbool NeedsKey– Indicates if API key is required
Requests
Translate
Request for translating text.
Members:
string Q– Text to translatestring Source– Source language codestring Target– Target language codestring Format– Output formatint Alternatives– Number of alternativesstring? Api_key– API key
TranslateFile
Request for translating a file.
Members:
IFormFile File– File to translatestring Source– Source language codestring Target– Target language codestring Api_key– API key
DetectLanguage
Request for detecting the language of a text.
Members:
string Q– Text to analyzestring Api_key– API key
Responses
Detections
Result of language detection.
Members:
string Language– Detected language codeint Confidence– Confidence score
Translate
Result of a text translation.
Members:
string TranslatedText– Translated textDetections DetectedLanguage– Detected source languageList<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 codestring Name– Language nameList<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 | 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 | 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. |
-
.NETStandard 2.1
- Microsoft.AspNetCore.Http (>= 2.3.0)
- System.Text.Json (>= 10.0.0-rc.1.25451.107)
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.
Same as 0.0.2 Readme fixed. Support for LibreTranslate models