using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace B4Restore.Common.Control.BaseDS
{
	public sealed class AttributeFactory
	{
		private AttributeFactory() { }

		/// <summary>
		/// Creates an instance of a custom attribute class based on the its type.
		/// </summary>
		/// <param name="type">Custom AttributeType.</param>
		/// <returns>A new instance of a custom attribute implementation.</returns>
		public static IAttribute GetAttribute(AttributeType type)
		{
			IAttribute attribute = null;

			// Select based an the attribute type.
			switch (type)
			{
				case AttributeType.bindfield:
					attribute = new BindFieldAttribute();
					break;
			}

			return attribute;
		}
	}
}
