Export (0) Print
Expand All

ContentSource Class

Provides the base class for all content sources.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public abstract class ContentSource

For more information the SharePoint Server search Administration object model, see Getting Started with the SharePoint Server Search Administration Object Model.

Use the ContentSources property of the Content class to get the collection of content sources for a Search service application.

To add a new content source to the collection, use the Create() method of the ContentSourceCollection class.

To delete a content source, use the Delete method of the ContentSource class.

Use an indexer to return a single content source from the ContentSourceCollection object. For example, assuming the collection is assigned to a variable named contentSources, use contentSources[index] in Microsoft Visual C# or contentSources(index) in Microsoft Visual Basic, where index is a string containing the name of the content source or an integer containing the content source identifier.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft