C# Class PeoplePickerRemediation.Console.CamlQueryExtensions

Show file Open project: OfficeDev/PnP-Transformation

Public Methods

Method Description
SetOrderByIDField ( this camlQuery ) : void

This method will set the OrderBy ID field which is indexed by default

SetOrderByIDField ( this camlQuery, bool sortAsc ) : void

This method will set the OrderBy index field or ID field which is indexed by default

SetOrderByIndexField ( this camlQuery ) : void

This method will set the OrderBy index field

SetQuery ( this camlQuery, string queryXml ) : void

This method will update the query condition in ViewXml

SetQueryRowlimit ( this camlQuery, uint rowLimit ) : void

This method will set the Query row limit

SetQueryThrottleMode ( this camlQuery, QueryThrottleMode queryThrottleMode ) : void

This method will set the QueryThrottle Mode for ListViewThreshold exception

SetViewAttribute ( this camlQuery, QueryScope scope ) : void

This method will set scope attribute in query

SetViewFields ( this camlQuery, string viewFieldsXml ) : void

This Method will append the ViewFields xml to the Query

Private Methods

Method Description
CreateViewFieldsXml ( string fields ) : string

This Method will create the ViewFields xml from sting array

GetOrCreateXmlNodeByXPath ( string path, string name, string value, XmlDocument xmlDoc ) : XmlNode

This Method will create specified node if it doesn't exists, else return XmlNode

GetXmlNodeByXPath ( string path, XmlDocument xmlDoc ) : XmlNode

this method will return Xml node by Specified xpath

LoadViewXml ( string viewXml ) : XmlDocument

This method will create ml document from string

OverrideOrderByField ( XmlNode node, string fieldXml ) : void

This method will insert the fieldml into query

UpdateCamlQuery ( CamlQuery camlQuery, XmlDocument xmlDoc ) : void

Update the VewXml with content from CAMLQuery extension methods

Method Details

SetOrderByIDField() public static method

This method will set the OrderBy ID field which is indexed by default
public static SetOrderByIDField ( this camlQuery ) : void
camlQuery this CamlQuery
return void

SetOrderByIDField() public static method

This method will set the OrderBy index field or ID field which is indexed by default
public static SetOrderByIDField ( this camlQuery, bool sortAsc ) : void
camlQuery this
sortAsc bool
return void

SetOrderByIndexField() public static method

This method will set the OrderBy index field
public static SetOrderByIndexField ( this camlQuery ) : void
camlQuery this CamlQuery
return void

SetQuery() public static method

This method will update the query condition in ViewXml
public static SetQuery ( this camlQuery, string queryXml ) : void
camlQuery this CamlQuery
queryXml string query condition
return void

SetQueryRowlimit() public static method

This method will set the Query row limit
public static SetQueryRowlimit ( this camlQuery, uint rowLimit ) : void
camlQuery this CamlQuery
rowLimit uint rowlimit
return void

SetQueryThrottleMode() public static method

This method will set the QueryThrottle Mode for ListViewThreshold exception
public static SetQueryThrottleMode ( this camlQuery, QueryThrottleMode queryThrottleMode ) : void
camlQuery this CamlQuery
queryThrottleMode QueryThrottleMode ThrottleMode option
return void

SetViewAttribute() public static method

This method will set scope attribute in query
public static SetViewAttribute ( this camlQuery, QueryScope scope ) : void
camlQuery this CamlQuery
scope QueryScope Scope option
return void

SetViewFields() public static method

This Method will append the ViewFields xml to the Query
public static SetViewFields ( this camlQuery, string viewFieldsXml ) : void
camlQuery this CamlQuery
viewFieldsXml string ViewFields as xml string
return void