WatchAlias.

Watch(ICakeContext, WatchSettings, Action<IEnumerable<FileChange>>) Method

Summary

Watch files that is specified by settings.
Assembly
Cake.Watch.dll
Namespace
Cake.Watch
Containing Type
WatchAlias

Syntax

public static void Watch(this ICakeContext context, WatchSettings settings, Action<IEnumerable<FileChange>> fileChanged)

Examples

var settings = new WatchSettings { Recursive = true, Path = "src", Pattern = "*.html" };
Watch(settings , (changes) => {
    var list = changes.ToList();
    list.ForEach(change => {
       Console.WriteLine(change.FullName);
    });
})

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext
settings WatchSettings
fileChanged Action<IEnumerable<FileChange>>

Return Value

Type Description
void