Поделиться через


PolicyBase Class

Base class to inherit for a new check-in policy.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.VersionControl.Client.PolicyBase
    Microsoft.TeamFoundation.Build.Controls.BuildPolicy
    Microsoft.TeamFoundation.VersionControl.Controls.WorkItemPolicy

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public MustInherit Class PolicyBase _
    Implements IPolicyDefinition, IPolicyCompatibility, IPolicyEvaluation, IDisposable
[SerializableAttribute]
public abstract class PolicyBase : IPolicyDefinition, 
    IPolicyCompatibility, IPolicyEvaluation, IDisposable
[SerializableAttribute]
public ref class PolicyBase abstract : IPolicyDefinition, 
    IPolicyCompatibility, IPolicyEvaluation, IDisposable
[<AbstractClass>]
[<SerializableAttribute>]
type PolicyBase =  
    class 
        interface IPolicyDefinition 
        interface IPolicyCompatibility 
        interface IPolicyEvaluation 
        interface IDisposable 
    end
public abstract class PolicyBase implements IPolicyDefinition, IPolicyCompatibility, IPolicyEvaluation, IDisposable

The PolicyBase type exposes the following members.

Constructors

  Name Description
Protected method PolicyBase Initializes a new instance of the PolicyBase class.

Top

Properties

  Name Description
Public property CanEdit Gets a flag that describes whether this policy is configurable.
Public property Description Gets the description of this policy.
Protected property Disposed Returns true if this object has been disposed.
Public property InstallationInstructions Gets or sets textual instructions about how the policy can be installed on a computer.
Protected property PendingCheckin Get an object that represents the pending changes part of the pending checkin.
Public property Type Gets the name of this policy.
Public property TypeDescription Gets the description of this kind of policy.

Top

Methods

  Name Description
Public method Activate Called if the user double-clicks on a policy failure.
Public method DisplayHelp Displays a Help dialog box that is associated with the policy failure.
Public method Dispose Disposes this object.
Public method Edit Shows a configuration dialog box to the user to specify options for the check-in policy.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Evaluate Performs the policy evaluation.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAssemblyName Only override this for backward compatibility where you want to specify a different assembly name for the checkin policy in order to maintain backward compatibility with a previously released version of the checkin policy.
Public method GetBinaryFormatter Only override this if you want to create a new BinaryFormatter and hook into the serialization process for backward compatibility (e.g., you want to set the Binder property on the formatter to handle compatibility for a checkin policy that has been moved to another assembly).
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Initializes the specified pending check-in.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnPolicyStateChanged Fire the event to notify of a change in policy state.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event PolicyStateChanged Occurs when the state of the policy is changed.

Top

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.

See Also

Reference

Microsoft.TeamFoundation.VersionControl.Client Namespace