chatbot/Chatbot.Application/Commands/Metadata.cs

26 lines
628 B
C#
Raw Normal View History

2020-06-06 18:29:20 +03:00
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());
}
}
}
}