ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot 10.0.0-beta.1

This is a prerelease version of ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot.
dotnet add package ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot --version 10.0.0-beta.1
                    
NuGet\Install-Package ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot -Version 10.0.0-beta.1
                    
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="ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot" Version="10.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot" Version="10.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot" />
                    
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 ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot --version 10.0.0-beta.1
                    
#r "nuget: ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot, 10.0.0-beta.1"
                    
#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 ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot@10.0.0-beta.1
                    
#: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=ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot&version=10.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot&version=10.0.0-beta.1&prerelease
                    
Install as a Cake Tool

ZaminX.BuildingBlocks.CrossCutting.Translator.Parrot

نمای کلی

این پروژه پیاده‌سازی اصلی capability مربوط به Parrot را نگه می‌دارد.

نقش این پروژه:

  • پیاده‌سازی ITranslator
  • نگهداری داده‌ها در حافظه
  • ترکیب داده‌های providerها
  • اعمال fallback
  • مدیریت refresh
  • ارائه registration اصلی

اجزای اصلی

ParrotTranslator

پیاده‌سازی API مصرفی capability است.


ParrotTranslationStore

داده‌های ترجمه را در حافظه نگه می‌دارد و lookup را انجام می‌دهد.


ParrotTranslationProviderCoordinator

مسئول بارگذاری داده‌ها از providerها و merge آن‌هاست.


ParrotRefreshService

برای refresh داده‌ها استفاده می‌شود.


ParrotStartupHostedService

در زمان startup، بارگذاری اولیه داده‌ها را انجام می‌دهد.


رفتارها

کش

تمام داده‌ها پس از load در حافظه نگه‌داری می‌شوند.


merge providerها

providerها به ترتیب registration اجرا می‌شوند.

providerهای بعدی می‌توانند داده‌های قبلی را override کنند.


fallback

ترتیب lookup:

  1. culture دقیق
  2. parent culture
  3. invariant
  4. خود key

formatting

دو نوع formatting وجود دارد:

  • با آرگومان ترجمه‌شونده
  • با آرگومان raw

registration

نقطه ورود اصلی:

services.AddParrot(parrot ⇒ { parrot.UseSqlServer(...); });


نکات طراحی

  • این پروژه به provider خاصی وابسته نیست
  • registration provider در پروژه provider انجام می‌شود
  • logging در این لایه حداقلی است
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-beta.1 731 4/4/2026