Implementation
The code for a check-in policy is really simple:
First, make the
BigChangesCheckInPolicy
class inherit fromPolicyBase
:public class BigChangesCheckInPolicy : PolicyBase { }
You will also need to add the following
using
statement:using Microsoft.TeamFoundation.VersionControl.Client;
Now, we'll implement the methods that are required by the abstract methods in
PolicyBase
. Let's first use the following code to describe our policy:public override string Description => "The Big Changes Checkin Policy makes sure that if you "+ "make lots of changes you are adding a work item to "+ "the check-in"; public override string Type => "Big Changes Checkin Policy [Dialog Box]"; public override string TypeDescription => "The Big Changes Checkin Policy makes sure that if you " + "make lots of changes you are adding a work item to " + "the check-in [Dialog Box]"; public override bool Edit(IPolicyEditArgs policyEditArgs) => true...