netmash/Netmash.Application.DataCon.../Metadata.cs

26 lines
629 B
C#

using System;
using System.Collections.Generic;
namespace Netmash.Application.DataContracts
{
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());
}
}
}
}