using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using Howest.SchemaDiscovery.CommonHelpers;

namespace Howest.SchemaDiscovery.DbObjects
{
	public class Procedure
	{
		#region Properties
		private string name;

		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		/// <value>The name.</value>
		public string Name
		{
			get { return name; }
			set { name = value; }
		}

		/// <summary>
		/// Gets the name of the DB StoreProcedure.
		/// </summary>
		/// <value>The name of the DB StoreProcedure.</value>
		public string DBName
		{
			get
			{
				//Escape Name
				string nameTemp = string.Format(CultureInfo.CurrentCulture, "[{0}]", NamingHelper.EscapeObjectName(name));
				return nameTemp;
			}
		}

		private List<Parameter> parameters = new List<Parameter>();

		/// <summary>
		/// Gets or sets the parameters.
		/// </summary>
		/// <value>The parameters.</value>

		//[Browsable(false)]
		public List<Parameter> Parameters
		{
			get { return parameters; }
		}
		#endregion
	}
}
