using ProtoBuf;

namespace DiplomovaPrace.Contracts
{
	[ProtoContract]
	public class ValueDto<T>
	{
		[ProtoMember(1)]
		public T Value { get; set; }

		public ValueDto()
		{
			// NOOP
		}

		public ValueDto(T value)
		{
			Value = value;
		}
	}

	public static class ValueDto
	{
		public static ValueDto<T> FromValue<T>(T value)
		{
			return new ValueDto<T>(value);
		}
	}
}
