26 lines
628 B
C#
26 lines
628 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Chatbot.Api.Application.Commands
|
|
{
|
|
public class Metadata : Dictionary<string, string>
|
|
{
|
|
public const string CorrelationIdKey = "CorrelationId";
|
|
|
|
public Guid CorrelationId
|
|
{
|
|
get
|
|
{
|
|
return Guid.Parse(this[CorrelationIdKey]);
|
|
}
|
|
set
|
|
{
|
|
if (ContainsKey(CorrelationIdKey))
|
|
this[CorrelationIdKey] = value.ToString();
|
|
else
|
|
Add(CorrelationIdKey, value.ToString());
|
|
}
|
|
}
|
|
}
|
|
}
|