This page include a full list of all the attributes that can be applied to Shaman connector types and fields.

DetailsUrl

Specifies that the current field represents an URL that allows to retrieve additional information about the current object. See also the introduction for example usage.

DisplayOptions

Specifies how the field should be displayed to the user, for example its display name.

EntityTypeOptions

Applied to an entity type, specifies an optional singular version (DisplayName) and plural version (EntitySetDisplayName) of the type name.

EnumExtraction

Applied to an enum member, specifies how the enum should be mapped to the string values in the HTML page.
public enum ProductStatus
{
    [EnumExtraction("Available")]
    Available,

    [EnumExtraction("This item is no longer available!")]
    SoldOut
}
If the text and the enumeration member name only differ by white spaces and capitalization, it is not necessary to explicitely write an EnumExtraction attribute. However, it is possible to specify multiple EnumExtractions for the same member.

GeneratedAttribute

Specifies that a particular field is a URL that follows a common pattern.
public class Category : Entity
{
    [Key]
    public string Id;
}

public class Product : Entity
{
    [Key]
    public Category Category;

    [Key]
    public int Name;

    [DetailsUrl(DetailsLevel.D)]
    [GeneratedUrl("http://www.example.com/{Category.Id}/{Name}")]
    public Uri Url;
}

The value of the field will be automatically populated using the specified fields, that can also refer to linked resources.

However, all these fields must be marked with the [Key] attribute. This mechanism can also work in the opposite direction: if you apply an Extraction attribute to the generated field, the referred fields will be automatically populated.
[DetailsUrl(DetailsLevel.D)]
[GeneratedUrl("http://www.example.com/{Category.Id}/{Name}")]
[Extraction(DetailsLevel.L, "a.details")]
public Uri Url;

If multiple entity types share the same URL model, you can let Shaman distinguish them by specifying a selectorTest to the corresponding DetailsUrl attribute.

Image

Defines the approximate size or aspect ratio of a WebImage field. Used for display purposes.

Inverse

Specifies the inverse field of a IPagedEnumerable<> field. It is not mandatory, but it makes it possible to persist the object relationships to a database, since it basically represents a foreign key. See also Entity relationships.

Key

Defines one or more fields that univocally identifies the current object. If more than one fields are marked with this attribute, all these fields must match in order for the entity to be considered the same. If no Key fields are specified, the entity cannot be persisted to a database. Key attributes can also be applied to fields whose type is another entity.

ListExtraction

Appied to an entity type or to a field, specifies how the items of that type (or the items of an IPagedEnumerable<> field) can be retrieved. See also the introduction.

MainContent

Specifies the field that contains the most representative data for the user, used for display purposes.

Optional

Specifies that the specified field might not apply to all the entities of the current type, and could be null.

PreviewOf

Specifies that the field contains a lower quality, or incomplete version of the data of another field. Used for display purposes. For example:
[PreviewOf("FullImage")]
public WebImage Thumbnail;

public WebImage FullImage;
or
[PreviewOf("Content")]
[Extraction(DetailsLevel.L, ".summary")]
public string Summary;

[Extraction(DetailsLevel.D, "#content")]
public Html Content;

SiteInfo

Applied to a _SiteInfo class in the same namespace of the other entity types for a specific site, determines to log into the website. See Authentication.

In addition, it is possible to specify a Culture that determines how date and number conversions should be handled.