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

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

    Parameters

    element
    The element 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 element, 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.Element("CustomerID").IndexedElement(IndexingHintAction.Mandatory) == "ALFKI"
        select c;
    See Also