Skip to content

Instantly share code, notes, and snippets.

View vanbukin's full-sized avatar

Roman Bukin vanbukin

View GitHub Profile
@vanbukin
vanbukin / Serializer.cs
Created May 27, 2020 18:29
System.Text.Json CosmosDb Serializer
using System;
using System.Buffers;
using System.IO;
using System.Text.Encodings.Web;
using System.Text.Json;
using Microsoft.Azure.Cosmos;
namespace Cosmos.Serialization
{
/// <summary>
@vanbukin
vanbukin / EventsGateway.fs
Created May 28, 2020 20:26
EventsGateway
namespace Dodo.EventStream
open System
open System.IO
open System.Threading.Tasks
open Microsoft.Azure.WebJobs
open Microsoft.Azure.WebJobs.Extensions.Http
open Microsoft.AspNetCore.Http
open Microsoft.Extensions.Logging
open System.Text.Json
@vanbukin
vanbukin / Auth.cs
Created June 3, 2020 17:49
Client credentials flow ASP.NET Core Background refresh
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using IdentityModel.Client;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Auth