Created
June 21, 2022 10:49
-
-
Save neuecc/2b5a4a884a26b1d1999191c3a5420b67 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Options can configure `with` operator | |
| var options = NatsOptions.Default with | |
| { | |
| Url = "nats://127.0.0.1:9999", | |
| LoggerFactory = new MinimumConsoleLoggerFactory(LogLevel.Information), | |
| Serializer = new MessagePackNatsSerializer(), | |
| ConnectOptions = ConnectOptions.Default with | |
| { | |
| Echo = true, | |
| Username = "foo", | |
| Password = "bar", | |
| } | |
| }; | |
| await using var conn = new NatsConnection(options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment