Compartilhar via


MSBuildGlobWithGaps Class

Definition

A glob with gaps. The gaps are represented as other globs.
For example, to express a glob that matches all .cs files except the ones containing "foo" and the ones under bin directories, one can use:
new MSBuildGlobWithGaps(
   MSBuildGlob.Parse("**/*.cs"),            // matches all .cs files
   new CompositeGlob(                       // a composite glob to combine all the gaps
      MSBuildGlob.Parse("**/*foo*.cs"),     // matches .cs files containing "foo"
      MSBuildGlob.Parse("**/bin/**/*.cs")   // matches .cs files under bin directories
   )
)
public ref class MSBuildGlobWithGaps : Microsoft::Build::Globbing::IMSBuildGlob
public class MSBuildGlobWithGaps : Microsoft.Build.Globbing.IMSBuildGlob
type MSBuildGlobWithGaps = class
    interface IMSBuildGlob
Public Class MSBuildGlobWithGaps
Implements IMSBuildGlob
Inheritance
MSBuildGlobWithGaps
Implements

Examples

To express a glob that matches all .cs files except the ones containing "foo" and the ones under bin directories, use:

new MSBuildGlobWithGaps(
    MSBuildGlob.Parse("**/*.cs"),            // matches all .cs files
    new CompositeGlob(                       // a composite glob to combine all the gaps
        MSBuildGlob.Parse("**/*foo*.cs"),     // matches .cs files containing "foo"
        MSBuildGlob.Parse("**/bin/**/*.cs")   // matches .cs files under bin directories
    )
)

Constructors

MSBuildGlobWithGaps(IMSBuildGlob, IEnumerable<IMSBuildGlob>)

Constructor

MSBuildGlobWithGaps(IMSBuildGlob, IMSBuildGlob[])

Constructor

Properties

Gaps

Glob which will be subtracted from the MainGlob.

MainGlob

The main glob used for globbing operations.

Methods

IsMatch(String)

Matches the given stringToMatch against the glob.

Extension Methods

GetParsedGlobs(IMSBuildGlob)

Retrieve all the MSBuildGlob objects from the given glob composite.

Applies to