BuildFeed/Tools/RedisMongoMigration/MetaItem.cs
2016-07-15 12:17:30 +01:00

40 lines
678 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RedisMongoMigration
{
public class MetaItemKey
{
public string Value { get; set; }
public MetaType Type { get; set; }
public MetaItemKey()
{
}
public MetaItemKey(string id)
{
var items = id.Split(':');
Type = (MetaType)Enum.Parse(typeof(MetaType), items[0]);
Value = items[1];
}
public override string ToString()
{
return $"{Type}:{Value}";
}
}
public enum MetaType
{
Lab,
Version,
Source,
Year
}
}