Skip to content

Instantly share code, notes, and snippets.

@Im5tu
Last active January 7, 2018 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Im5tu/7440535ee94e51a12afe0d05f0f16d68 to your computer and use it in GitHub Desktop.
Save Im5tu/7440535ee94e51a12afe0d05f0f16d68 to your computer and use it in GitHub Desktop.
CreateCorrelation
public static IDisposable CreateCorrelation(Guid? correlationId = null)
{
if (_correlationStack.Value == null)
_correlationStack.Value = new Stack<Guid>();
_correlationStack.Value.Push(correlationId ?? Guid.NewGuid());
return new DisposeCorrelation(_correlationStack);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment