Skip to content

DescriptionTextAttribute class

namespace: Serenity.ComponentModel   assembly: Serenity.Net.Core

Specifies the Description text for a property or class. Unlike DescriptionAttribute, it can specify a local text key.

[AttributeUsage(AttributeTargets.All)]
public class DescriptionTextAttribute : DescriptionAttribute, IHasTextKey

Public Members

name description
DescriptionTextAttribute() Initializes a new instance of the DescriptionTextAttribute class with no Description text.
DescriptionTextAttribute(…) Initializes a new instance of the DescriptionTextAttribute class with the specified Description text.
TextKey { get; set; } Gets or sets the local text key for the Description text. An empty string can be used to mark the text as literal, and no inferred text key should be generated for the property this attribute is placed on.

Examples

[DescriptionText("My Description Text", TextKey = "My.Text.Key")] // with key and invariant text [DescriptionText(TextKey = "My.Text.Key")] // with only key and no text [DescriptionText("My Description Text")] // with only invariant text, no key [DescriptionText("Db.Text.Key")] // still with only invariant text, no key unlike DescriptionAttribute.

See Also