-
Notifications
You must be signed in to change notification settings - Fork 780
Closed
Labels
content/incorrect-informationContent in the docs is incorrectContent in the docs is incorrect
Description
Describe the issue
The code listed for the Distributed Lock building block example doesn't compile.
URL of the docs
How-To: Use a lock
Expected content
class Program
{
[Obsolete("Distributed Lock API is in Alpha, this can be removed once it is stable.")]
static async Task Main(string[] args)
{
string DAPR_LOCK_NAME = "lockstore";
string fileName = "my_file_name";
var client = new DaprClientBuilder().Build();
await using (var fileLock = await client.Lock(DAPR_LOCK_NAME, fileName, "random_id_abc123", 60))
{
if (fileLock.Success)
{
Console.WriteLine("Success");
}
else
{
Console.WriteLine($"Failed to lock {fileName}.");
}
}
}
}Additional context
Found by a discord user (Adam R).
Metadata
Metadata
Assignees
Labels
content/incorrect-informationContent in the docs is incorrectContent in the docs is incorrect