netmash/NDB.Application.DataContracts/Metadata.cs

26 lines
629 B
C#
Raw Normal View History

2020-12-20 21:05:04 +02:00
using System;
using System.Collections.Generic;
2023-01-12 01:01:36 +02:00
namespace Netmash.Application.DataContracts
2020-12-20 21:05:04 +02:00
{
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());
}
}
}
}