DataSource for Entity Framework in WPF
C1.LiveLinq.LiveViews.Xml Namespace / XmlExtensions Class / IndexedElement Method / IndexedElement(XContainer,XName,IndexingHintAction) Method
The element or document containing the element.
The name of the element to get.
The action specified by the hint.
Example

In This Topic
    IndexedElement(XContainer,XName,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 container As XContainer, _
       ByVal name As XName, _
       ByVal action As IndexingHintAction _
    ) As XHint
    public static XHint IndexedElement( 
       XContainer container,
       XName name,
       IndexingHintAction action
    )

    Parameters

    container
    The element or document containing the element.
    name
    The name of the element to get.
    action
    The action specified by the hint.

    Return Value

    The element that has the specified name.
    Remarks
    Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this element, if possible. When the query is executed, the hint method IndexedElement is replaced with the standard LINQ to XML method System.Xml.Linq.XContainer.Element(System.Xml.Linq.XName). See C1.LiveLinq.Hints for more details.
    Example
    var query =
        from c in customers
        where (string)c.IndexedElement("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
        select c;
    See Also