Condividi tramite


ActivationConstraint Class

Definition

Describes a context-based activation rule.

[Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.Extensibility.ActivationConstraint+ActivationConstraintConverter))]
public abstract class ActivationConstraint : IEquatable<Microsoft.VisualStudio.Extensibility.ActivationConstraint>
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.Extensibility.ActivationConstraint+ActivationConstraintConverter))>]
type ActivationConstraint = class
    interface IEquatable<ActivationConstraint>
Public MustInherit Class ActivationConstraint
Implements IEquatable(Of ActivationConstraint)
Inheritance
ActivationConstraint
Attributes
Newtonsoft.Json.JsonConverterAttribute
Implements

Constructors

ActivationConstraint()

Methods

ActiveProjectBuildProperty(String, String)

Creates an activation constraint that is true when the selected project has the specified build property and the property value matches the regex pattern provided.

ActiveProjectCapability(ProjectCapability)

Creates an activation constraint that is true when the selected project capability matches capability.

ActiveProjectFlavor(Guid)
Obsolete.

Creates an activation constraint that is true when the selected project has a flavor matching flavor.

And(ActivationConstraint[])

Creates an activation constraint that is true when all constraints are true.

ClientContext(ClientContextKey, String)

Creates an activation constraint that is true when the provided client context key matches the regex pattern provided.

EditorContentType(String)

Creates an activation constraint that is true when active editor content type is or inherits from contentType.

Equals(ActivationConstraint)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Determines whether the specified object is equal to the current object.

FeatureFlag(String)

Creates an activation constraint that is true when the provided feature flag is enabled.

GetHashCode()

Serves as the default hash function.

Not(ActivationConstraint)

Creates an activation constraint that is true when constraint is false and vice versa.

Or(ActivationConstraint[])

Creates an activation constraint that is true when at least one of constraints is true.

ProjectAddedItem(String)

Creates an activation constraint that is true when a file matching the regex pattern provided is added to a project in the solution that is opened.

SolutionHasProjectBuildProperty(String, String)

Creates an activation constraint that is true when the solution has a loaded project with the specified build property and the property value matches the regex pattern provided.

SolutionHasProjectCapability(ProjectCapability)

Creates an activation constraint that is true when the solution has a project with the matching capability.

SolutionHasProjectFlavor(Guid)
Obsolete.

Creates an activation constraint that is true when the solution has a project that has a flavor matching flavor.

SolutionState(SolutionState)

Creates an activation constraint that is true when the solution state matches state.

UIContext(Guid)

Creates an activation constraint that is true when the provided Visual Studio UI Context is enabled.

Operators

BitwiseAnd(ActivationConstraint, ActivationConstraint)

Creates an activation constraint that is true when both a and b are true.

BitwiseOr(ActivationConstraint, ActivationConstraint)

Creates an activation constraint that is true when at least one of a or b is true.

LogicalNot(ActivationConstraint)

Creates an activation constraint that is true when a is false and vice versa.

Applies to