Skip to content

Console Project code snippet incorrectly formatted on the Getting started with Dapr client .NET SDK docs #5073

@KrylixZA

Description

@KrylixZA

Describe the issue

The following code snippet is missing the correct code block formatting.

Image

URL of the docs

https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-client/

Expected content

This block of code should be formatted as follows:

using Microsoft.Extensins.Hosting; using Microsoft.Extensions.DependencyInjection;

var builder = Host.CreateApplicationBuilder(args); builder.Services.AddDaprClient(); var app = builder.Build();

using var scope = app.Services.CreateScope(); var client = scope.ServiceProvider.GetRequiredService();

// Invokes a POST method named “deposit” that takes input of type “Transaction” var data = new { id = “17”, amount = 99m }; var account = await client.InvokeMethodAsync(“routing”, “deposit”, data, cancellationToken); Console.WriteLine(“Returned: id:{0} | Balance:{1}”, account.Id, account.Balance);

Screenshots

See above.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions