C# Класс GSoft.Dynamite.Repositories.QueryHelper

Utility to help build SPQuery filter strings
Наследование: IQueryHelper
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
GetAllWssIdByTerm string
TrimIfNotNullOrEmpty string

Открытые методы

Метод Описание
QueryHelper ( ITaxonomyService taxonomyService, ILogger logger ) : System

Initializes a new instance of the QueryHelper class.

TermFilter ( SPList list, string taxonomyFieldInternalName, IList terms, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term

TermFilter ( SPList list, string taxonomyFieldInternalName, Term term, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term

TermFilter ( SPList list, string taxonomyFieldInternalName, string termSetName, string termLabel, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term from the site-collection-reserved term store group

TermFilter ( SPList list, string taxonomyFieldInternalName, string termStoreGroupName, string termSetName, string termLabel, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term in a global farm term store group

ViewFieldsForEntityType ( Type entityType ) : string

Returns a string corresponding the the ViewFields attribute of a SPQuery with all the properties of a particular Entity

Приватные методы

Метод Описание
GetAllWssIdByTerm ( SPList list, Term term, bool includeDescendants ) : string
TrimIfNotNullOrEmpty ( string toTrim ) : string

Описание методов

QueryHelper() публичный Метод

Initializes a new instance of the QueryHelper class.
public QueryHelper ( ITaxonomyService taxonomyService, ILogger logger ) : System
taxonomyService ITaxonomyService The taxonomy service.
logger ILogger The logger.
Результат System

TermFilter() публичный Метод

Generates a SPQuery filter for Taxonomy Term
public TermFilter ( SPList list, string taxonomyFieldInternalName, IList terms, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
terms IList List of terms for why we want to match in an OR fashion
includeDescendants bool Whether the Term's child terms should be query hits as well
Результат string

TermFilter() публичный Метод

Generates a SPQuery filter for Taxonomy Term
public TermFilter ( SPList list, string taxonomyFieldInternalName, Term term, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
term Term Term to match for
includeDescendants bool Whether the Term's child terms should be query hits as well
Результат string

TermFilter() публичный Метод

Generates a SPQuery filter for Taxonomy Term from the site-collection-reserved term store group
public TermFilter ( SPList list, string taxonomyFieldInternalName, string termSetName, string termLabel, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
termSetName string Name of the term set
termLabel string Label by which to find the term (dupes not supported)
includeDescendants bool Whether the Term's child terms should be query hits as well
Результат string

TermFilter() публичный Метод

Generates a SPQuery filter for Taxonomy Term in a global farm term store group
public TermFilter ( SPList list, string taxonomyFieldInternalName, string termStoreGroupName, string termSetName, string termLabel, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
termStoreGroupName string Name of the global farm term store group
termSetName string Name of the term set
termLabel string Label by which to find the term (dupes not supported)
includeDescendants bool Whether the Term's child terms should be query hits as well
Результат string

ViewFieldsForEntityType() публичный Метод

Returns a string corresponding the the ViewFields attribute of a SPQuery with all the properties of a particular Entity
public ViewFieldsForEntityType ( Type entityType ) : string
entityType System.Type The type of the entity
Результат string