다음을 통해 공유


ContentIterator.ItemsOfContentTypeQuery Method

Generates the query for an SPQuery object that returns all of the items of a specified content type.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Shared Function ItemsOfContentTypeQuery ( _
    strContentTypeName As String _
) As String
'Usage
Dim strContentTypeName As String
Dim returnValue As String

returnValue = ContentIterator.ItemsOfContentTypeQuery(strContentTypeName)
public static string ItemsOfContentTypeQuery(
    string strContentTypeName
)

Parameters

  • strContentTypeName
    Type: System.String
    The name of the content type.

Return Value

Type: System.String
The query.
Returns String.

Remarks

Must only used for list-level queries (that is, it should not be used to get items underneath a scope, such as. a folder). For a large list, this query is subject to throttling unless the ContentTypeId field is indexed.

See Also

Reference

ContentIterator Class

ContentIterator Members

Microsoft.Office.Server.Utilities Namespace

Indexed

EnsureContentTypeIndexedIfLargeList(SPList)