/
veer
/
Zaya.Primitives
Обзор
Документация
Войти
/
veer
/
Zaya.Primitives
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
docs/api/Zaya.Primitives.LocalizedString.yml
628 строк
21 KB
Vladimir Makarov
feat: add localization and plugin settings infrastructure (v0.2.0)
16 июл 2026, 12:49
16 июл 2026, 12:49
839804f
Код
Авторство
О чём код?
### YamlMime:ManagedReference items: - uid: Zaya.Primitives.LocalizedString commentId: T:Zaya.Primitives.LocalizedString id: LocalizedString parent: Zaya.Primitives children: - Zaya.Primitives.LocalizedString.#ctor(System.String,System.Func{System.Globalization.CultureInfo,System.String}) - Zaya.Primitives.LocalizedString.GetValue(System.Globalization.CultureInfo) - Zaya.Primitives.LocalizedString.Invariant(System.String) - Zaya.Primitives.LocalizedString.Key langs: - csharp - vb name: LocalizedString nameWithType: LocalizedString fullName: Zaya.Primitives.LocalizedString type: Class source: remote: path: src/Zaya.Primitives/LocalizedString.cs branch: main repo: https://github.com/shtrasser-dev/Zaya.Primitives id: LocalizedString path: src/Zaya.Primitives/LocalizedString.cs startLine: 12 assemblies: - Zaya.Primitives namespace: Zaya.Primitives summary: >- Represents a string that can be localized. Supports two modes: <ul><li>Localized via a resolver function (typically a .resx <code>ResourceManager</code>).</li><li>Invariant — created via <xref href="Zaya.Primitives.LocalizedString.Invariant(System.String)" data-throw-if-not-resolved="false"></xref> and never translated.</li></ul> All source strings live in resource files; no English defaults are embedded in code. example: [] syntax: content: public sealed class LocalizedString content.vb: Public NotInheritable Class LocalizedString inheritance: - System.Object inheritedMembers: - System.Object.Equals(System.Object) - System.Object.Equals(System.Object,System.Object) - System.Object.GetHashCode - System.Object.GetType - System.Object.ReferenceEquals(System.Object,System.Object) - System.Object.ToString - uid: Zaya.Primitives.LocalizedString.Key commentId: P:Zaya.Primitives.LocalizedString.Key id: Key parent: Zaya.Primitives.LocalizedString langs: - csharp - vb name: Key nameWithType: LocalizedString.Key fullName: Zaya.Primitives.LocalizedString.Key type: Property source: remote: path: src/Zaya.Primitives/LocalizedString.cs branch: main repo: https://github.com/shtrasser-dev/Zaya.Primitives id: Key path: src/Zaya.Primitives/LocalizedString.cs startLine: 17 assemblies: - Zaya.Primitives namespace: Zaya.Primitives summary: Gets the resource key used for localization. For invariant strings this equals the invariant text itself. example: [] syntax: content: public string Key { get; } parameters: [] return: type: System.String content.vb: Public ReadOnly Property Key As String overload: Zaya.Primitives.LocalizedString.Key* - uid: Zaya.Primitives.LocalizedString.Invariant(System.String) commentId: M:Zaya.Primitives.LocalizedString.Invariant(System.String) id: Invariant(System.String) parent: Zaya.Primitives.LocalizedString langs: - csharp - vb name: Invariant(string) nameWithType: LocalizedString.Invariant(string) fullName: Zaya.Primitives.LocalizedString.Invariant(string) type: Method source: remote: path: src/Zaya.Primitives/LocalizedString.cs branch: main repo: https://github.com/shtrasser-dev/Zaya.Primitives id: Invariant path: src/Zaya.Primitives/LocalizedString.cs startLine: 33 assemblies: - Zaya.Primitives namespace: Zaya.Primitives summary: Creates an invariant string that is never localized (e.g. log messages, internal IDs). example: [] syntax: content: public static LocalizedString Invariant(string text) parameters: - id: text type: System.String description: The invariant text. return: type: Zaya.Primitives.LocalizedString description: A <xref href="Zaya.Primitives.LocalizedString" data-throw-if-not-resolved="false"></xref> that always returns <code class="paramref">text</code>. content.vb: Public Shared Function Invariant(text As String) As LocalizedString overload: Zaya.Primitives.LocalizedString.Invariant* nameWithType.vb: LocalizedString.Invariant(String) fullName.vb: Zaya.Primitives.LocalizedString.Invariant(String) name.vb: Invariant(String) - uid: Zaya.Primitives.LocalizedString.#ctor(System.String,System.Func{System.Globalization.CultureInfo,System.String}) commentId: M:Zaya.Primitives.LocalizedString.#ctor(System.String,System.Func{System.Globalization.CultureInfo,System.String}) id: '#ctor(System.String,System.Func{System.Globalization.CultureInfo,System.String})' parent: Zaya.Primitives.LocalizedString langs: - csharp - vb name: LocalizedString(string, Func<CultureInfo, string>) nameWithType: LocalizedString.LocalizedString(string, Func<CultureInfo, string>) fullName: Zaya.Primitives.LocalizedString.LocalizedString(string, System.Func<System.Globalization.CultureInfo, string>) type: Constructor source: remote: path: src/Zaya.Primitives/LocalizedString.cs branch: main repo: https://github.com/shtrasser-dev/Zaya.Primitives id: .ctor path: src/Zaya.Primitives/LocalizedString.cs startLine: 40 assemblies: - Zaya.Primitives namespace: Zaya.Primitives summary: Initializes a new instance of the <xref href="Zaya.Primitives.LocalizedString" data-throw-if-not-resolved="false"></xref> class with a resolver. example: [] syntax: content: public LocalizedString(string key, Func<CultureInfo, string> resolver) parameters: - id: key type: System.String description: Resource key for lookup (e.g. "Ocr_EngineName"). Used as fallback when the resolver returns null or empty. - id: resolver type: System.Func{System.Globalization.CultureInfo,System.String} description: Function that resolves the key to a localized string for a given culture. content.vb: Public Sub New(key As String, resolver As Func(Of CultureInfo, String)) overload: Zaya.Primitives.LocalizedString.#ctor* nameWithType.vb: LocalizedString.New(String, Func(Of CultureInfo, String)) fullName.vb: Zaya.Primitives.LocalizedString.New(String, System.Func(Of System.Globalization.CultureInfo, String)) name.vb: New(String, Func(Of CultureInfo, String)) - uid: Zaya.Primitives.LocalizedString.GetValue(System.Globalization.CultureInfo) commentId: M:Zaya.Primitives.LocalizedString.GetValue(System.Globalization.CultureInfo) id: GetValue(System.Globalization.CultureInfo) parent: Zaya.Primitives.LocalizedString langs: - csharp - vb name: GetValue(CultureInfo) nameWithType: LocalizedString.GetValue(CultureInfo) fullName: Zaya.Primitives.LocalizedString.GetValue(System.Globalization.CultureInfo) type: Method source: remote: path: src/Zaya.Primitives/LocalizedString.cs branch: main repo: https://github.com/shtrasser-dev/Zaya.Primitives id: GetValue path: src/Zaya.Primitives/LocalizedString.cs startLine: 52 assemblies: - Zaya.Primitives namespace: Zaya.Primitives summary: >- Returns the localized value for the specified culture. Falls back to <xref href="Zaya.Primitives.LocalizedString.Key" data-throw-if-not-resolved="false"></xref> when the resolver returns null or empty. example: [] syntax: content: public string GetValue(CultureInfo culture) parameters: - id: culture type: System.Globalization.CultureInfo description: The target culture. return: type: System.String description: The localized or invariant string. content.vb: Public Function GetValue(culture As CultureInfo) As String overload: Zaya.Primitives.LocalizedString.GetValue* references: - uid: Zaya.Primitives.LocalizedString.Invariant(System.String) commentId: M:Zaya.Primitives.LocalizedString.Invariant(System.String) isExternal: true href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Invariant_System_String_ name: Invariant(string) nameWithType: LocalizedString.Invariant(string) fullName: Zaya.Primitives.LocalizedString.Invariant(string) nameWithType.vb: LocalizedString.Invariant(String) fullName.vb: Zaya.Primitives.LocalizedString.Invariant(String) name.vb: Invariant(String) spec.csharp: - uid: Zaya.Primitives.LocalizedString.Invariant(System.String) name: Invariant href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Invariant_System_String_ - name: ( - uid: System.String name: string isExternal: true href: https://learn.microsoft.com/dotnet/api/system.string - name: ) spec.vb: - uid: Zaya.Primitives.LocalizedString.Invariant(System.String) name: Invariant href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Invariant_System_String_ - name: ( - uid: System.String name: String isExternal: true href: https://learn.microsoft.com/dotnet/api/system.string - name: ) - uid: Zaya.Primitives commentId: N:Zaya.Primitives href: Zaya.html name: Zaya.Primitives nameWithType: Zaya.Primitives fullName: Zaya.Primitives spec.csharp: - uid: Zaya name: Zaya href: Zaya.html - name: . - uid: Zaya.Primitives name: Primitives href: Zaya.Primitives.html spec.vb: - uid: Zaya name: Zaya href: Zaya.html - name: . - uid: Zaya.Primitives name: Primitives href: Zaya.Primitives.html - uid: System.Object commentId: T:System.Object parent: System isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object name: object nameWithType: object fullName: object nameWithType.vb: Object fullName.vb: Object name.vb: Object - uid: System.Object.Equals(System.Object) commentId: M:System.Object.Equals(System.Object) parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) name: Equals(object) nameWithType: object.Equals(object) fullName: object.Equals(object) nameWithType.vb: Object.Equals(Object) fullName.vb: Object.Equals(Object) name.vb: Equals(Object) spec.csharp: - uid: System.Object.Equals(System.Object) name: Equals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) - name: ( - uid: System.Object name: object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) spec.vb: - uid: System.Object.Equals(System.Object) name: Equals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) - name: ( - uid: System.Object name: Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) - uid: System.Object.Equals(System.Object,System.Object) commentId: M:System.Object.Equals(System.Object,System.Object) parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) name: Equals(object, object) nameWithType: object.Equals(object, object) fullName: object.Equals(object, object) nameWithType.vb: Object.Equals(Object, Object) fullName.vb: Object.Equals(Object, Object) name.vb: Equals(Object, Object) spec.csharp: - uid: System.Object.Equals(System.Object,System.Object) name: Equals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) - name: ( - uid: System.Object name: object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ',' - name: " " - uid: System.Object name: object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) spec.vb: - uid: System.Object.Equals(System.Object,System.Object) name: Equals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) - name: ( - uid: System.Object name: Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ',' - name: " " - uid: System.Object name: Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) - uid: System.Object.GetHashCode commentId: M:System.Object.GetHashCode parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode name: GetHashCode() nameWithType: object.GetHashCode() fullName: object.GetHashCode() nameWithType.vb: Object.GetHashCode() fullName.vb: Object.GetHashCode() spec.csharp: - uid: System.Object.GetHashCode name: GetHashCode isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode - name: ( - name: ) spec.vb: - uid: System.Object.GetHashCode name: GetHashCode isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode - name: ( - name: ) - uid: System.Object.GetType commentId: M:System.Object.GetType parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gettype name: GetType() nameWithType: object.GetType() fullName: object.GetType() nameWithType.vb: Object.GetType() fullName.vb: Object.GetType() spec.csharp: - uid: System.Object.GetType name: GetType isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gettype - name: ( - name: ) spec.vb: - uid: System.Object.GetType name: GetType isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.gettype - name: ( - name: ) - uid: System.Object.ReferenceEquals(System.Object,System.Object) commentId: M:System.Object.ReferenceEquals(System.Object,System.Object) parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals name: ReferenceEquals(object, object) nameWithType: object.ReferenceEquals(object, object) fullName: object.ReferenceEquals(object, object) nameWithType.vb: Object.ReferenceEquals(Object, Object) fullName.vb: Object.ReferenceEquals(Object, Object) name.vb: ReferenceEquals(Object, Object) spec.csharp: - uid: System.Object.ReferenceEquals(System.Object,System.Object) name: ReferenceEquals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals - name: ( - uid: System.Object name: object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ',' - name: " " - uid: System.Object name: object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) spec.vb: - uid: System.Object.ReferenceEquals(System.Object,System.Object) name: ReferenceEquals isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals - name: ( - uid: System.Object name: Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ',' - name: " " - uid: System.Object name: Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object - name: ) - uid: System.Object.ToString commentId: M:System.Object.ToString parent: System.Object isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.tostring name: ToString() nameWithType: object.ToString() fullName: object.ToString() nameWithType.vb: Object.ToString() fullName.vb: Object.ToString() spec.csharp: - uid: System.Object.ToString name: ToString isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.tostring - name: ( - name: ) spec.vb: - uid: System.Object.ToString name: ToString isExternal: true href: https://learn.microsoft.com/dotnet/api/system.object.tostring - name: ( - name: ) - uid: System commentId: N:System isExternal: true href: https://learn.microsoft.com/dotnet/api/system name: System nameWithType: System fullName: System - uid: Zaya.Primitives.LocalizedString.Key* commentId: Overload:Zaya.Primitives.LocalizedString.Key href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Key name: Key nameWithType: LocalizedString.Key fullName: Zaya.Primitives.LocalizedString.Key - uid: System.String commentId: T:System.String parent: System isExternal: true href: https://learn.microsoft.com/dotnet/api/system.string name: string nameWithType: string fullName: string nameWithType.vb: String fullName.vb: String name.vb: String - uid: Zaya.Primitives.LocalizedString commentId: T:Zaya.Primitives.LocalizedString parent: Zaya.Primitives href: Zaya.Primitives.LocalizedString.html name: LocalizedString nameWithType: LocalizedString fullName: Zaya.Primitives.LocalizedString - uid: Zaya.Primitives.LocalizedString.Invariant* commentId: Overload:Zaya.Primitives.LocalizedString.Invariant href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Invariant_System_String_ name: Invariant nameWithType: LocalizedString.Invariant fullName: Zaya.Primitives.LocalizedString.Invariant - uid: Zaya.Primitives.LocalizedString.#ctor* commentId: Overload:Zaya.Primitives.LocalizedString.#ctor href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString__ctor_System_String_System_Func_System_Globalization_CultureInfo_System_String__ name: LocalizedString nameWithType: LocalizedString.LocalizedString fullName: Zaya.Primitives.LocalizedString.LocalizedString nameWithType.vb: LocalizedString.New fullName.vb: Zaya.Primitives.LocalizedString.New name.vb: New - uid: System.Func{System.Globalization.CultureInfo,System.String} commentId: T:System.Func{System.Globalization.CultureInfo,System.String} parent: System definition: System.Func`2 href: https://learn.microsoft.com/dotnet/api/system.func-2 name: Func<CultureInfo, string> nameWithType: Func<CultureInfo, string> fullName: System.Func<System.Globalization.CultureInfo, string> nameWithType.vb: Func(Of CultureInfo, String) fullName.vb: System.Func(Of System.Globalization.CultureInfo, String) name.vb: Func(Of CultureInfo, String) spec.csharp: - uid: System.Func`2 name: Func isExternal: true href: https://learn.microsoft.com/dotnet/api/system.func-2 - name: < - uid: System.Globalization.CultureInfo name: CultureInfo isExternal: true href: https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo - name: ',' - name: " " - uid: System.String name: string isExternal: true href: https://learn.microsoft.com/dotnet/api/system.string - name: '>' spec.vb: - uid: System.Func`2 name: Func isExternal: true href: https://learn.microsoft.com/dotnet/api/system.func-2 - name: ( - name: Of - name: " " - uid: System.Globalization.CultureInfo name: CultureInfo isExternal: true href: https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo - name: ',' - name: " " - uid: System.String name: String isExternal: true href: https://learn.microsoft.com/dotnet/api/system.string - name: ) - uid: System.Func`2 commentId: T:System.Func`2 isExternal: true href: https://learn.microsoft.com/dotnet/api/system.func-2 name: Func<T, TResult> nameWithType: Func<T, TResult> fullName: System.Func<T, TResult> nameWithType.vb: Func(Of T, TResult) fullName.vb: System.Func(Of T, TResult) name.vb: Func(Of T, TResult) spec.csharp: - uid: System.Func`2 name: Func isExternal: true href: https://learn.microsoft.com/dotnet/api/system.func-2 - name: < - name: T - name: ',' - name: " " - name: TResult - name: '>' spec.vb: - uid: System.Func`2 name: Func isExternal: true href: https://learn.microsoft.com/dotnet/api/system.func-2 - name: ( - name: Of - name: " " - name: T - name: ',' - name: " " - name: TResult - name: ) - uid: Zaya.Primitives.LocalizedString.Key commentId: P:Zaya.Primitives.LocalizedString.Key href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_Key name: Key nameWithType: LocalizedString.Key fullName: Zaya.Primitives.LocalizedString.Key - uid: Zaya.Primitives.LocalizedString.GetValue* commentId: Overload:Zaya.Primitives.LocalizedString.GetValue href: Zaya.Primitives.LocalizedString.html#Zaya_Primitives_LocalizedString_GetValue_System_Globalization_CultureInfo_ name: GetValue nameWithType: LocalizedString.GetValue fullName: Zaya.Primitives.LocalizedString.GetValue - uid: System.Globalization.CultureInfo commentId: T:System.Globalization.CultureInfo parent: System.Globalization isExternal: true href: https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo name: CultureInfo nameWithType: CultureInfo fullName: System.Globalization.CultureInfo - uid: System.Globalization commentId: N:System.Globalization isExternal: true href: https://learn.microsoft.com/dotnet/api/system name: System.Globalization nameWithType: System.Globalization fullName: System.Globalization spec.csharp: - uid: System name: System isExternal: true href: https://learn.microsoft.com/dotnet/api/system - name: . - uid: System.Globalization name: Globalization isExternal: true href: https://learn.microsoft.com/dotnet/api/system.globalization spec.vb: - uid: System name: System isExternal: true href: https://learn.microsoft.com/dotnet/api/system - name: . - uid: System.Globalization name: Globalization isExternal: true href: https://learn.microsoft.com/dotnet/api/system.globalization