mirror of https://github.com/abpframework/abp.git
4 changed files with 26 additions and 21 deletions
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using Volo.Utils.SolutionTemplating.Files; |
||||
|
|
||||
|
namespace Volo.Utils.SolutionTemplating.Building |
||||
|
{ |
||||
|
public static class ProjectBuildContextExtensions |
||||
|
{ |
||||
|
public static FileEntry GetFile(this ProjectBuildContext context, string filePath) |
||||
|
{ |
||||
|
var file = context.Files.FirstOrDefault(f => f.Name == filePath); |
||||
|
if (file == null) |
||||
|
{ |
||||
|
throw new ApplicationException("Could not find file: " + filePath); |
||||
|
} |
||||
|
|
||||
|
return file; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,22 +1,7 @@ |
|||||
using System; |
namespace Volo.Utils.SolutionTemplating.Building |
||||
using System.Linq; |
|
||||
using Volo.Utils.SolutionTemplating.Files; |
|
||||
|
|
||||
namespace Volo.Utils.SolutionTemplating.Building |
|
||||
{ |
{ |
||||
public abstract class ProjectBuildPipelineStep |
public abstract class ProjectBuildPipelineStep |
||||
{ |
{ |
||||
public abstract void Execute(ProjectBuildContext context); |
public abstract void Execute(ProjectBuildContext context); |
||||
|
|
||||
protected FileEntry GetFile(ProjectBuildContext context, string filePath) |
|
||||
{ |
|
||||
var file = context.Files.FirstOrDefault(f => f.Name == filePath); |
|
||||
if (file == null) |
|
||||
{ |
|
||||
throw new ApplicationException("Could not find file: " + filePath); |
|
||||
} |
|
||||
|
|
||||
return file; |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
Loading…
Reference in new issue