-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add namespaces to the diagrams files system path (#92)
- Loading branch information
Showing
5,746 changed files
with
4,618 additions
and
2,839 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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
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,50 @@ | ||
using C4InterFlow.Structures; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.CommandLine.Binding; | ||
using System.CommandLine; | ||
using C4InterFlow.Cli.Commands.Options; | ||
|
||
namespace C4InterFlow.Cli.Commands.Binders | ||
{ | ||
public class InputOptions | ||
{ | ||
public InputOptions(string[] interfaces, string interfacesInputFile, string[] businessProcesses, string[] namespaces) | ||
{ | ||
Interfaces = interfaces; | ||
InterfacesInputFile = interfacesInputFile; | ||
BusinessProcesses = businessProcesses; | ||
Namespaces = namespaces; | ||
} | ||
public string[] Interfaces { get; private set; } | ||
|
||
public string InterfacesInputFile { get; private set; } | ||
|
||
public string[] BusinessProcesses { get; private set; } | ||
|
||
public string[] Namespaces { get; private set; } | ||
} | ||
|
||
public class InputOptionsBinder : BinderBase<InputOptions> | ||
{ | ||
private readonly Option<string[]> _interfacesOption; | ||
private readonly Option<string> _interfacesInputFileOption; | ||
private readonly Option<string[]> _businessProcessesOption; | ||
private readonly Option<string[]> _namespaces; | ||
|
||
public InputOptionsBinder(Option<string[]> interfacesOption, Option<string> interfacesInputFileOption, Option<string[]> businessProcessesOption, Option<string[]> namespaces) | ||
{ | ||
_interfacesOption = interfacesOption; | ||
_interfacesInputFileOption = interfacesInputFileOption; | ||
_businessProcessesOption = businessProcessesOption; | ||
_namespaces = namespaces; | ||
} | ||
|
||
protected override InputOptions GetBoundValue(BindingContext bindingContext) => | ||
new InputOptions( | ||
bindingContext.ParseResult.GetValueForOption(_interfacesOption), | ||
bindingContext.ParseResult.GetValueForOption(_interfacesInputFileOption), | ||
bindingContext.ParseResult.GetValueForOption(_businessProcessesOption), | ||
bindingContext.ParseResult.GetValueForOption(_namespaces)); | ||
} | ||
} |
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
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,21 @@ | ||
using System.CommandLine; | ||
using System.CommandLine.Parsing; | ||
|
||
namespace C4InterFlow.Cli.Commands.Options; | ||
|
||
public static class NamespacesOption | ||
{ | ||
public static Option<string[]> Get() | ||
{ | ||
const string description = | ||
"The aliases of Namespaces for which to draw the Diagram(s)."; | ||
|
||
var option = new Option<string[]>(new[] { "--namespaces", "-ns" }, description) | ||
{ | ||
AllowMultipleArgumentsPerToken = true | ||
}; | ||
option.SetDefaultValue(null); | ||
|
||
return option; | ||
} | ||
} |
Oops, something went wrong.