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

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

    Parameters

    element
    The element containing the attribute.
    name
    The name of the attribute to get.
    action
    The action specified by the hint.

    Return Value

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