ContentSource Class
Provides the base class for all content sources.
Inheritance Hierarchy
System.Object
Microsoft.Office.Server.Search.Administration.ContentSource
Microsoft.Office.Server.Search.Administration.BusinessDataContentSource
Microsoft.Office.Server.Search.Administration.CustomConnectorContentSource
Microsoft.Office.Server.Search.Administration.CustomContentSource
Microsoft.Office.Server.Search.Administration.HierarchicalContentSource
Microsoft.Office.Server.Search.Administration.SharePointContentSource
Microsoft.Office.Server.Search.Administration.WebContentSource
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public MustInherit Class ContentSource
'Usage
Dim instance As ContentSource
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public abstract class ContentSource
Remarks
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.