diff --git a/packages/http-client-csharp/readme.md b/packages/http-client-csharp/readme.md index 77f8efc84b9..6fdd63cb3cf 100644 --- a/packages/http-client-csharp/readme.md +++ b/packages/http-client-csharp/readme.md @@ -27,6 +27,14 @@ For detailed instructions on how to customize the generated C# code, see the [Cu tsp compile . --emit=@typespec/http-client-csharp ``` +You can pass multiple options via the command line using the `--option` flag: + +```bash +tsp compile . --emit=@typespec/http-client-csharp \ + --option "@typespec/http-client-csharp.package-name=MyClient" \ + --option "@typespec/http-client-csharp.generate-protocol-methods=false" +``` + 2. Via the config ```yaml @@ -41,9 +49,21 @@ emit: - "@typespec/http-client-csharp" options: "@typespec/http-client-csharp": - option: value + package-name: MyClient + generate-protocol-methods: false + generate-convenience-methods: true ``` +> **Note for custom emitter authors:** If you are building a custom emitter that extends `@typespec/http-client-csharp`, you must specify your own emitter name in the options rather than `@typespec/http-client-csharp`. For example, if your emitter is named `@my-org/my-custom-emitter`: +> +> ```yaml +> emit: +> - "@my-org/my-custom-emitter" +> options: +> "@my-org/my-custom-emitter": +> package-name: MyClient +> ``` + ## Emitter options ### `emitter-output-dir`