-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VCI-688: Add ModuleCompressionOptionsBuilder class
- Loading branch information
1 parent
05c4a42
commit d57eb03
Showing
2 changed files
with
92 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Utils | ||
{ | ||
public class ModuleCompressionOptions | ||
{ | ||
public string SourceDirectory { get; set; } | ||
public string OutputZipPath { get; set; } | ||
public string ModuleId { get; set; } | ||
public string ModuleManifestPath { get; set; } | ||
public string WebProjectDirectory { get; set; } | ||
public IEnumerable<string> IgnoreList { get; set; } = new List<string>(); | ||
public IEnumerable<string> KeepList { get; set; } = new List<string>(); | ||
public IEnumerable<string> ModuleContentFolders { get; set; } = new List<string>(); | ||
} | ||
|
||
public class ModuleCompressionOptionsBuilder | ||
{ | ||
private readonly ModuleCompressionOptions options = new ModuleCompressionOptions(); | ||
|
||
public ModuleCompressionOptionsBuilder WithSourceDirectory(string sourceDirectory) | ||
{ | ||
options.SourceDirectory = sourceDirectory; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithOutputZipPath(string outputZipPath) | ||
{ | ||
options.OutputZipPath = outputZipPath; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithModuleId(string moduleId) | ||
{ | ||
options.ModuleId = moduleId; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithModuleManifestPath(string moduleManifestPath) | ||
{ | ||
options.ModuleManifestPath = moduleManifestPath; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithWebProjectDirectory(string webProjectDirectory) | ||
{ | ||
options.WebProjectDirectory = webProjectDirectory; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithIgnoreList(IEnumerable<string> ignoreList) | ||
{ | ||
options.IgnoreList = ignoreList; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithKeepList(IEnumerable<string> keepList) | ||
{ | ||
options.KeepList = keepList; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptionsBuilder WithModuleContentFolders(IEnumerable<string> moduleContentFolders) | ||
{ | ||
options.ModuleContentFolders = moduleContentFolders; | ||
return this; | ||
} | ||
|
||
public ModuleCompressionOptions Build() | ||
{ | ||
return options; | ||
} | ||
} | ||
} |