Skip to content

Instantly share code, notes, and snippets.

View mknet3's full-sized avatar
:octocat:

Manuel Cañete mknet3

:octocat:
View GitHub Profile
@mknet3
mknet3 / RebusTraceContextOutgoing.cs
Created April 8, 2020 17:19
Rebus.TraceContext.W3C.Outgoing
namespace RebusTraceContext
{
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Rebus.Config;
using Rebus.Messages;
using Rebus.Pipeline;
using Rebus.Pipeline.Send;
@mknet3
mknet3 / RebusTraceContextIncoming.cs
Last active April 8, 2020 17:22
Rebus.TraceContext.W3C.Incoming
namespace RebusTraceContext
{
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.Extensions.DependencyInjection;
using Rebus.Handlers;
using Rebus.Pipeline;
@mknet3
mknet3 / sp.snippet
Last active January 16, 2019 15:44
Visual Studio 2017 Snippet to add safe parameters to methods
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>sp</Title>
<Shortcut>sp</Shortcut>
<Description>Code snippet for add safe parameter into method</Description>
<Author>manuelcaub</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@mknet3
mknet3 / guard-clauses
Last active June 10, 2018 00:55
Avoiding else - Guard clauses
if (!foo) {
throw sitException;
}
if (!bar) {
throw dolorException;
}
if (!baz) {
throw ipsumException;