Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit a7c0a12

Browse files
committed
Refactored Extract.cs
1 parent 3e1d9b4 commit a7c0a12

File tree

7 files changed

+74
-1826
lines changed

7 files changed

+74
-1826
lines changed

src/apimtemplate/Commands/Extract.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public ExtractCommand()
2626
if (!apiManagementName.HasValue()) throw new Exception("Missing parameter <apimname>.");
2727
if (!resourceGroupName.HasValue()) throw new Exception("Missing parameter <resourceGroup>.");
2828

29+
// TemplateCreator templateCreator = new TemplateCreator();
30+
2931
string resourceGroup = resourceGroupName.Values[0].ToString();
3032
string apimname = apiManagementName.Values[0].ToString();
3133
Api api = new Api();
@@ -35,7 +37,6 @@ public ExtractCommand()
3537

3638
ConsoleColor lastColor = Console.ForegroundColor;
3739
Console.ForegroundColor = ConsoleColor.Green;
38-
3940
Console.WriteLine("{0} API's found!", count);
4041
Console.ForegroundColor = lastColor;
4142

@@ -46,6 +47,10 @@ public ExtractCommand()
4647
Console.WriteLine(oApis);
4748
string apiname = (string)oApis["value"][i]["name"];
4849
ColoredConsole.WriteLine(apiname);
50+
51+
ReadFile();
52+
53+
4954
ColoredConsole.WriteLine(api.GetAPIOperations(apimname, resourceGroup, apiname).Result);
5055
}
5156
Console.ReadKey();
@@ -58,7 +63,6 @@ private static string FormatJSON(string json)
5863
dynamic parsedJson = JsonConvert.DeserializeObject(json);
5964
return JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
6065
}
61-
6266
public static void DownloadFile(string sourceURL, string destinationPath)
6367
{
6468
long fileSize = 0;

src/apimtemplate/Common/AzureResourceId.cs

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/apimtemplate/Common/DeploymentParameters.cs

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)