다음을 통해 공유


Enterprise Content Management (ECM) Code Samples for SharePoint Server 2010

This topic introduces complete code samples from across the ECM object model that you can compile, run, and use to learn best practices for developing custom ECM solutions.

Applies to: SharePoint Server 2010

These code samples show best practices from the records management, document management, managed metadata, digital asset management (DAM), content iterator, and Web content management (WCM) feature areas.

Samples from the ECM Object Model

Download the SharePoint 2010 sample code described in this topic from Code Gallery.

Table 1. ECM code samples and descriptions

Sample

Description

SharePoint 2010 ECM Code Sample: Content Type Based Metadata

Provides code for applying metadata based on a specific content type.

SharePoint 2010 ECM Code Sample: Create a Routing Rule

Provides code that uses an ItemAdded event receiver to automatically create routing rules. Routing rules are used by the Content Organizer feature to move documents to a target document library or folder.

SharePoint 2010 ECM Code Sample: Custom Document ID Provider

Provides code for creating a custom Document ID provider.

SharePoint 2010 ECM Code Sample: Document Sets Ribbon and Export

Provides code that demonstrates how to add a new custom button to the Manage tab of the document sets ribbon, how to add functionality to the button, and how to export document sets so that they can be downloaded as a single ZIP file.

SharePoint 2010 ECM Code Sample: Generate Managed Metadata Hierarchy

Provides code that demonstrates how to generate the path of the taxonomy from a specified term up to its parent. It can be based on getting the property from a field that is set on a document set, but it can also be used in other cases.

SharePoint 2010 ECM Code Sample: Managing Managed Metadata Dependencies

Provides code that uses an event receiver on the ItemAdded event and the ItemUpdated event in the document libraries object model to manage metadata dependencies for list items.

SharePoint 2010 ECM Code Sample: Pausable Timer Job

Provides code that demonstrates the content iterator, and that supports pausing and resuming a timer job at a custom level that is more granular than the list level but less granular than the item level. Learn more about the content iterator in the ContentIterator class content.

SharePoint 2010 ECM Code Sample: Publishing Cache Services and Silverlight

Provides code that demonstrates how to use the Windows Communication Foundation (WCF) to create a publishing cache Representational State Transfer (REST) server, create a Silverlight application that renders navigation that is returned by the Publishing REST service into a navigation control, and create a Silverlight application that displays a table that shows a list of results based on a cross-list query returned by the publishing cache REST service in table format.

SharePoint 2010 ECM Code Sample: Shared Retention Events

Provides code that demonstrates how to create a deployable farm solution that extends the information management policy shared retention policy feature.

Silverlight Thumbnail Image Extractor

Includes Microsoft Silverlight code used in the Walkthroughs for SharePoint Server 2010 (ECM): Creating and Customizing a Video Sharing Site series of walkthroughs. It is a central part of the scenario for creating a customized video upload experience.

Find ECM code samples in your C:\Program Files\Microsoft SDKs\SharePoint 2010\Samples folder. The folder contains the code and additional resources for all of the samples.

See Also

Concepts

SharePoint 2010: SDK: Code Samples

Rich Media Programming Model in SharePoint Server 2010 (ECM)

Document Management Programming Model in SharePoint Server 2010 (ECM)

Records Management Programming Model in SharePoint Server 2010 (ECM)

Metadata and Taxonomy Programming Model in SharePoint Server 2010 (ECM)

Publishing Programming Model in SharePoint Server 2010 (ECM)

Enterprise Development with SharePoint Server 2010

Other Resources

Enterprise Content Management Resource Center

SharePoint Developer Center

SharePoint Developer Team Blog