netmash/NDB.Application.DataContracts/Metadata.cs

26 lines
625 B
C#

using System;
using System.Collections.Generic;
namespace NDB.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());
}
}
}
}