Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Baudi Kurbanov",
"label": "Software Engineer",
"email": "khav.kurb@gmail.com",
"phone": "+79263155555",
"summary": "Backend software engineer with 3+ years of experience specializing in C#/.NET. Have a proven track record of building, optimizing and supporting microservices and GUI applications. Passionate about solving complex algorithmic challenges and designing resilient systems. Especially enjoy low-level engineering and applying fundamental knowledge. Looking for a team with strong engineering standards, open communication, transparent leveling, and a healthy feedback culture.",
"location": {
"city": "Moscow",
"countryCode": "Russia"
@baudii
baudii / AsTask.cs
Last active November 4, 2024 23:57
Simple extension method that converts Unity's AsyncOperation into a Task to use it with await. Unlike extending GetAwaiter(), this implementation supports cancellation tokens
public static Task AsTask(this AsyncOperation asyncOperation, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
if (asyncOperation == null)
throw new ArgumentNullException(nameof(asyncOperation), "Provided async operation is null");
if (asyncOperation.isDone)
return Task.CompletedTask;