Skip to content

Commit 63022f5

Browse files
committed
Apigen use '--' instead of '/' to name command line arguments
1 parent aa67074 commit 63022f5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ let generateApi () =
8686
ExecProcess
8787
(fun si ->
8888
si.FileName <- apiGenExe
89-
si.Arguments <- "/apiName:AMQP_0_9_1 " + amqpSpec0_9_1i + " " + autogeneratedApi0_9_1)
89+
si.Arguments <- "--apiName:AMQP_0_9_1 " + amqpSpec0_9_1i + " " + autogeneratedApi0_9_1)
9090
(TimeSpan.FromMinutes 1.)
9191
|> fun res -> if res <> 0 then failwith "generateApi process failed")
9292

projects/client/Apigen/src/apigen/Apigen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ public static void InitPrimitiveType(string amqpType, string dotnetType, bool is
203203
}
204204

205205
public void HandleOption(string opt) {
206-
if (opt.StartsWith("/apiName:")) {
206+
if (opt.StartsWith("--apiName:")) {
207207
m_apiName = opt.Substring(9);
208-
} else if (opt == "/c") {
208+
} else if (opt == "-c") {
209209
m_emitComments = true;
210210
} else {
211211
Console.Error.WriteLine("Unsupported command-line option: " + opt);
@@ -216,13 +216,13 @@ public void HandleOption(string opt) {
216216
public void Usage() {
217217
Console.Error.WriteLine("Usage: Apigen.exe [options ...] <input-spec-xml> <output-csharp-file>");
218218
Console.Error.WriteLine(" Options include:");
219-
Console.Error.WriteLine(" /apiName:<identifier>");
219+
Console.Error.WriteLine(" --apiName:<identifier>");
220220
Console.Error.WriteLine(" The apiName option is required.");
221221
Environment.Exit(1);
222222
}
223223

224224
public Apigen(IList<string> args) {
225-
while (args.Count > 0 && ((string) args[0]).StartsWith("/")) {
225+
while (args.Count > 0 && ((string) args[0]).StartsWith("--")) {
226226
HandleOption((string) args[0]);
227227
args.RemoveAt(0);
228228
}

0 commit comments

Comments
 (0)