Class BobLocalizationKeyRouteAttribute
- Namespace
- BlazOrbit.Localization
- Assembly
- BlazOrbit.Core.dll
Routes any localization key starting with Prefix to a specific provider type before the rest of the bundle's Chain. Stacks on the same assembly as the bundle declaration; one attribute per prefix.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
public sealed class BobLocalizationKeyRouteAttribute : Attribute
- Inheritance
-
objectAttributeBobLocalizationKeyRouteAttribute
Remarks
Use to mix back-ends inside a single bundle without splitting it into multiple marker types.
Example: keys starting with "cms:" route to a database-backed provider while the rest
fall through to the default chain (typically static bundles + literal fallback).
Constructors
BobLocalizationKeyRouteAttribute(Type, string, Type)
Initialises a new route declaration.
public BobLocalizationKeyRouteAttribute(Type resourceType, string prefix, Type providerType)
Parameters
resourceTypeTypeprefixstringproviderTypeType
Properties
Prefix
Literal prefix that triggers the route. Compared with System.StringComparison.Ordinal.
public string Prefix { get; }
Property Value
- string
ProviderType
Provider type consulted first when a key matches Prefix.
public Type ProviderType { get; }
Property Value
- Type
ResourceType
Marker resource type the route applies to.
public Type ResourceType { get; }
Property Value
- Type