LocalizableSearcherAttribute

Namespace: Digi21.DigiNG.Plugin.Search
Assembly: Digi21.DigiNG.Plugin

Like SearcherAttribute, with the title read from the extension's resources.

[AttributeUsage(AttributeTargets.Class)]
public class LocalizableSearcherAttribute : SearcherAttribute

Inherits from: SearcherAttribute.

Constructors

public LocalizableSearcherAttribute(Type resourceManagerProvider, string resourceKey)
Parameter Description
resourceManagerProvider Type with a non-public static property of type ResourceManager. The requirements are those of LocalizableCommandAttribute.
resourceKey Resource key containing the title. The resource string is assigned to Title.

The constructor throws ArgumentException if resourceManagerProvider has no non-public static property of type ResourceManager or the resource does not contain the resourceKey key. Digi3D.AI creates the attribute when loading the extension; if the constructor throws the exception, it does not register that search provider or subsequent providers in the same DLL.

Example

The LocalizableCommandAttribute example registers the BuscadorLineasCerradas search provider through [LocalizableSearcher(typeof(Recursos), "BuscarLineasCerradas")].