2.6 KiB
2.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:07:59.007705+00:00 | zai-org/GLM-5-FP8 | 1 | 63cd62f694267ff8 |
Resources
Purpose
This module provides localization resources and a XAML markup extension for the DatabaseServices assembly. It enables the resolution of user-facing strings (such as status messages regarding database operations) within the UI layer, supporting both direct code access via a resource manager and declarative access within XAML files.
Public Interface
Class: TranslateExtension
- Signature:
public class TranslateExtension : MarkupExtension - Constructor:
TranslateExtension(string key)- Initializes the extension with the resource key to be looked up. - Method:
public override object ProvideValue(IServiceProvider serviceProvider)- Resolves the_keyto a localized string. Returns#stringnotfound#if the key is null/empty, or#stringnotfound# <key>if the lookup fails.
Class: StringResources (Internal)
- Signature:
internal class StringResources - Property:
static ResourceManager ResourceManager- Provides access to the resource cache. - Property:
static CultureInfo Culture- Gets or sets the current UI culture for resource lookups. - Static Properties (Localized Strings):
string ClearingLocalDb("Clearing local db")string ConnectedTo("Connected to: ")string CopyFromRemoteServer("Copy from remote server to local")string CopyingTable("Copying")string EnablingConstraints("Finishing up")string Local("Local")string Remote("Remote")string SwitchFileNotFound("Could not switch to local - File not found:")string SwitchToLocal("Switch to local")string SwitchToRemote("Switch to remote")
Invariants
TranslateExtensionnever returnsnull. It guarantees a string return, falling back to error indicators (#stringnotfound#) if the resource key is missing.StringResourcesis an auto-generated class; manual modifications will be overwritten by tooling (Visual Studio/ResGen).
Dependencies
- Depends on:
System,System.Windows.Markup,System.Resources,System.Globalization. - Dependents: Any XAML UI components within the
DatabaseServicesscope that require localized text.
Gotchas
- The
StringResourcesclass is markedinternal, making it inaccessible outside theDatabaseServicesassembly. - The `Translate