DataSource for Entity Framework in WPF
C1.LiveLinq.LiveViews.Xml Namespace / XmlExtensions Class / IndexedAttribute Method / IndexedAttribute(XAttribute,IndexingHintAction) Method
The attribute to apply the hint to.
The action specified by the hint.
Example

In This Topic
    IndexedAttribute(XAttribute,IndexingHintAction) Method
    In This Topic
    A hint to create and use an index on the specified XML attribute. The hint has specified action.
    Syntax
    'Declaration
     
    Public Overloads Shared Function IndexedAttribute( _
       ByVal attribute As XAttribute, _
       ByVal action As IndexingHintAction _
    ) As XHint
    public static XHint IndexedAttribute( 
       XAttribute attribute,
       IndexingHintAction action
    )

    Parameters

    attribute
    The attribute to apply the hint to.
    action
    The action specified by the hint.

    Return Value

    Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed, its role is purely declarative.
    Remarks
    Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this attribute, if possible. After it is used for query optimization, before the query is executed, this hint is removed from the expression. See C1.LiveLinq.Hints for more details.
    Example
    var query =
        from c in customers
        where (string)c.Attribute("CustomerID").IndexedAttribute(IndexingHintAction.Mandatory) == "ALFKI"
        select c;
    See Also