зеркало из https://github.com/github/codeql.git
C#: Introduce delegate type in autobuilder
This commit is contained in:
Родитель
97128b1475
Коммит
7dfc584159
|
@ -19,6 +19,12 @@ namespace Semmle.Autobuild.Shared
|
|||
BuildScript Analyse(Autobuilder builder, bool auto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A delegate used to wrap a build script in an environment where an appropriate
|
||||
/// version of .NET Core is automatically installed.
|
||||
/// </summary>
|
||||
public delegate BuildScript WithDotNet(Autobuilder builder, Func<IDictionary<string, string>?, BuildScript> f);
|
||||
|
||||
/// <summary>
|
||||
/// Exception indicating that environment variables are missing or invalid.
|
||||
/// </summary>
|
||||
|
|
|
@ -11,9 +11,9 @@ namespace Semmle.Autobuild.Shared
|
|||
/// </summary>
|
||||
public class BuildCommandAutoRule : IBuildRule
|
||||
{
|
||||
private readonly Func<Autobuilder, Func<IDictionary<string, string>?, BuildScript>, BuildScript> withDotNet;
|
||||
private readonly WithDotNet withDotNet;
|
||||
|
||||
public BuildCommandAutoRule(Func<Autobuilder, Func<IDictionary<string, string>?, BuildScript>, BuildScript> withDotNet)
|
||||
public BuildCommandAutoRule(WithDotNet withDotNet)
|
||||
{
|
||||
this.withDotNet = withDotNet;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ namespace Semmle.Autobuild.Shared
|
|||
/// </summary>
|
||||
public class BuildCommandRule : IBuildRule
|
||||
{
|
||||
private readonly Func<Autobuilder, Func<IDictionary<string, string>?, BuildScript>, BuildScript> withDotNet;
|
||||
private readonly WithDotNet withDotNet;
|
||||
|
||||
public BuildCommandRule(Func<Autobuilder, Func<IDictionary<string, string>?, BuildScript>, BuildScript> withDotNet)
|
||||
public BuildCommandRule(WithDotNet withDotNet)
|
||||
{
|
||||
this.withDotNet = withDotNet;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче