NServiceBus.CorrelationContextExtensions.SetCorrelationId C# (CSharp) Method

SetCorrelationId() private method

private SetCorrelationId ( this options, string correlationId ) : void
options this
correlationId string
return void
        public static void SetCorrelationId(this SendOptions options, string correlationId)
        {
            Guard.AgainstNull(nameof(options), options);
            Guard.AgainstNullAndEmpty(nameof(correlationId), correlationId);

            options.Context.GetOrCreate<AttachCorrelationIdBehavior.State>()
                .CustomCorrelationId = correlationId;
        }
CorrelationContextExtensions