-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename Exclude property to ExcludeByFile
- Loading branch information
Showing
3 changed files
with
62 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
using System; | ||
using Coverlet.Core; | ||
using Microsoft.Build.Framework; | ||
using Microsoft.Build.Utilities; | ||
|
||
namespace Coverlet.MSbuild.Tasks | ||
{ | ||
public class InstrumentationTask : Task | ||
{ | ||
private static Coverage _coverage; | ||
private string _path; | ||
private string _filter; | ||
private string _exclude; | ||
|
||
internal static Coverage Coverage | ||
{ | ||
get { return _coverage; } | ||
} | ||
|
||
[Required] | ||
public string Path | ||
{ | ||
get { return _path; } | ||
set { _path = value; } | ||
} | ||
|
||
public string Filter | ||
{ | ||
get { return _filter; } | ||
set { _filter = value; } | ||
} | ||
|
||
public string Exclude | ||
{ | ||
get { return _exclude; } | ||
set { _exclude = value; } | ||
} | ||
|
||
public override bool Execute() | ||
{ | ||
try | ||
{ | ||
var excludes = _exclude?.Split(','); | ||
var filters = _filter?.Split(','); | ||
|
||
_coverage = new Coverage(_path, Guid.NewGuid().ToString(), filters, excludes); | ||
_coverage.PrepareModules(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} | ||
using System; | ||
using Coverlet.Core; | ||
using Microsoft.Build.Framework; | ||
using Microsoft.Build.Utilities; | ||
|
||
namespace Coverlet.MSbuild.Tasks | ||
{ | ||
public class InstrumentationTask : Task | ||
{ | ||
private static Coverage _coverage; | ||
private string _path; | ||
private string _filter; | ||
private string _excludeByFile; | ||
|
||
internal static Coverage Coverage | ||
{ | ||
get { return _coverage; } | ||
} | ||
|
||
[Required] | ||
public string Path | ||
{ | ||
get { return _path; } | ||
set { _path = value; } | ||
} | ||
|
||
public string Filter | ||
{ | ||
get { return _filter; } | ||
set { _filter = value; } | ||
} | ||
|
||
public string ExcludeByFile | ||
{ | ||
get { return _excludeByFile; } | ||
set { _excludeByFile = value; } | ||
} | ||
|
||
public override bool Execute() | ||
{ | ||
try | ||
{ | ||
var excludes = _excludeByFile?.Split(','); | ||
var filters = _filter?.Split(','); | ||
|
||
_coverage = new Coverage(_path, Guid.NewGuid().ToString(), filters, excludes); | ||
_coverage.PrepareModules(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters