private static ILogArgs MakeLog(ICakeContext context, ILogArgs l) { if (l != null) { return(l); } if (context != null) { return new LogArgs() { Info = x => context.Log.Write(Verbosity.Normal, LogLevel.Information, x), Warn = x => context.Log.Write(Verbosity.Normal, LogLevel.Warning, x), Echo = x => context.Log.Write(Verbosity.Normal, LogLevel.Error, x), Error = x => context.Log.Write(Verbosity.Verbose, LogLevel.Information, x), } } ; return(new LogArgs() { Info = x => { }, Warn = x => { }, Echo = x => { }, Error = x => { } }); }
public static int Collect(ICollectArgs c, ILogArgs l) { return(Api.Collect(c.ToParameters(), l.ToParameters())); }
public static int Prepare(IPrepareArgs p, ILogArgs l) { return(Api.Prepare(p.ToParameters(), l.ToParameters())); }
public static int Collect(this ICakeContext context, ICollectArgs c, ILogArgs l = null) { return(CSApi.Collect(c, MakeLog(context, l))); }
public static int Prepare(this ICakeContext context, IPrepareArgs p, ILogArgs l = null) { return(CSApi.Prepare(p, MakeLog(context, l))); }