26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Additional Resources<br />

• For more information about viewing pending changes in your workspace, see “How<br />

to: View and Manage All Pending Changes in Your Workspace” at<br />

http://msdn2.microsoft.com/en-us/library/ms181400(VS.80).aspx<br />

• For more information about viewing pending changes in other workspaces, see “How<br />

to: View Pending Changes in Other Workspaces” at http://msdn2.microsoft.com/enus/library/ms181401(VS.80).aspx<br />

• For more information about the tf status command see “Status Command” at<br />

http://msdn2.microsoft.com/en-us/library/9s5ae285(VS.80).aspx<br />

How to Create a Custom Check-in Policy<br />

To create a custom check-in policy, use the plug-in model exposed by the policy<br />

framework.<br />

You can create a custom check-in policy to implement your own policy logic; for<br />

example, if you want to check if users have been adding comments or using regular<br />

expressions correctly at the time of check-in.<br />

Plug-ins are used both <strong>with</strong>in the policy definition process and during the policy<br />

evaluation process. Policy plug-ins are installed either as stand-alone utilities or as part of<br />

a separate application, and are registered <strong>with</strong> the policy framework so that they can be<br />

loaded as needed.<br />

A policy plug-in must expose the following interfaces:<br />

• IPolicyDefinition – The IPolicyDefinition interface exposes methods that are used in<br />

the process of defining policy requirements for a team project. This interface includes<br />

methods for invoking a user interface specific to the policy plug-in in order to allow<br />

users to easily define a check-in policy.<br />

• IPolicyEvaluation – The IPolicyEvaluation interface exposes methods that are used<br />

in the process of evaluating policy compliance during the check-in process. This<br />

interface includes methods that accept the contents of a check-in operation and<br />

analyze them to establish whether the defined policy is satisfied.<br />

You can package multiple policy plug-ins n the same assembly. The only requirement is<br />

that you implement the plug-ins as separate classes.<br />

Note: These interfaces are exposed in PolicyBase class. As an alternative to<br />

implementing IPolicyDefinition and IPolicyEvaluation interfaces, you can derive a<br />

class from PolicyBase.<br />

Additional Resources<br />

• For more information about creating and using a custom check-in policy, see “How<br />

To - Create Custom Check-In Policies in <strong>Visual</strong> <strong>Studio</strong> <strong>Team</strong> <strong>Foundation</strong> <strong>Server</strong>” in<br />

this guide.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!