-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from mivano/whatif-region
Whatif region
- Loading branch information
Showing
21 changed files
with
1,083 additions
and
114 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
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,34 @@ | ||
using AzureCostCli.Commands.ShowCommand.OutputFormatters; | ||
using AzureCostCli.CostApi; | ||
using Spectre.Console.Cli; | ||
|
||
namespace AzureCostCli.Commands.Prices; | ||
|
||
public class ListPricesCommand: AsyncCommand<PricesSettings> | ||
{ | ||
private readonly IPriceRetriever _priceRetriever; | ||
|
||
private readonly Dictionary<OutputFormat, BaseOutputFormatter> _outputFormatters = new(); | ||
|
||
|
||
public ListPricesCommand(IPriceRetriever priceRetriever) | ||
{ | ||
_priceRetriever = priceRetriever; | ||
|
||
// Add the output formatters | ||
_outputFormatters.Add(OutputFormat.Console, new ConsoleOutputFormatter()); | ||
_outputFormatters.Add(OutputFormat.Json, new JsonOutputFormatter()); | ||
_outputFormatters.Add(OutputFormat.Jsonc, new JsonOutputFormatter()); | ||
_outputFormatters.Add(OutputFormat.Text, new TextOutputFormatter()); | ||
_outputFormatters.Add(OutputFormat.Markdown, new MarkdownOutputFormatter()); | ||
_outputFormatters.Add(OutputFormat.Csv, new CsvOutputFormatter()); | ||
} | ||
|
||
public override async Task<int> ExecuteAsync(CommandContext context, PricesSettings settings) | ||
{ | ||
|
||
var prices = await _priceRetriever.GetAzurePricesAsync(); | ||
|
||
return 0; | ||
} | ||
} |
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,6 @@ | ||
namespace AzureCostCli.Commands.Prices; | ||
|
||
public class PricesSettings:CostSettings | ||
{ | ||
|
||
} |
Oops, something went wrong.