Skip to content

Instantly share code, notes, and snippets.

View pardahlman's full-sized avatar

Pär Dahlman pardahlman

View GitHub Profile
@pardahlman
pardahlman / sourcegraph-cli.json
Created May 19, 2021 05:42
Scoop manifest for SourceGraph CLI
{
"version": "3.27.1",
"description": "Command line interface to Sourcegraph",
"homepage": "https://github.com/sourcegraph/src-cli",
"url": "https://github.com/sourcegraph/src-cli/releases/download/3.27.1/src_windows_amd64.exe",
"hash": "46edfff495948df804cb17e5b93d56388335c15627b472dc3b0d6b89ce67dd11",
"bin": [ [ "src_windows_amd64.exe", "src" ] ],
"license": "Apache-2.0",
"checkver": "github",
"autoupdate": {
using System.Threading;
using System.Threading.Tasks;
using RawRabbit.Pipe;
using RawRabbit.Pipe.Middleware;
using RawRabbit.Serialization;
namespace RawRabbit.Custom
{
public class CustomBodySerializationMiddleware : BodySerializationMiddleware
{
protected static Task SubscribeAsync<TMessage, TMessageContext>(Func<TMessage, TMessageContext, Task> asyncHandler)
{
return BusClient.SubscribeAsync<TMessage, TMessageContext>(async (message, context) =>
{
var customCtx = context as CustomContext;
using (LogContext.PushProperty("executionId", customCtx?.ExecutionId))
using (LogContext.PushProperty("origin", customCtx?.Origin))
using (LogContext.PushProperty("sessionId", customCtx?.SessionId))
{
await asyncHandler(message, context);