using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace wijmoSample1.Models.FileExplorer
{
	/// <summary>
	/// The param of the FileExplorer action.
	/// </summary>
	public class ActionParam
	{
		private string[] _searchPatterns;
		private string _filterExpression;
		private string[] _sourcePaths;

		/// <summary>
		/// The FileCommand.
		/// </summary>
		public FileCommand CommandName
		{
			get;
			set;
		}

		/// <summary>
		/// The search patterns.
		/// </summary>
		public string[] SearchPatterns
		{
			get { return _searchPatterns; }
			set
			{

				_searchPatterns = value;
			}
		}

		/// <summary>
		/// The filter expression.
		/// </summary>
		public string FilterExpression
		{
			get
			{
				return _filterExpression ?? string.Empty;
			}
			set
			{
				_filterExpression = value;
			}
		}

		/// <summary>
		/// The page size.
		/// </summary>
		public int PageSize
		{
			get;
			set;
		}

		/// <summary>
		/// The page index.
		/// </summary>
		public int PageIndex
		{
			get;
			set;
		}

		/// <summary>
		/// The sort expression.
		/// </summary>
		public SortField SortExpression
		{
			get;
			set;
		}

		/// <summary>
		/// The sort direction.
		/// </summary>
		public System.Web.UI.WebControls.SortDirection SortDirection
		{
			get;
			set;
		}

		/// <summary>
		/// Gets and sets whether only get the folders.
		/// </summary>
		public bool OnlyFolder
		{
			get;
			set;
		}

		/// <summary>
		/// The path or target path.
		/// </summary>
		public string Path
		{
			get;
			set;
		}

		/// <summary>
		/// The source paths.
		/// </summary>
		public string[] SourcePaths
		{
			get { return _sourcePaths ?? (_sourcePaths = new string[] { }); }
			set { _sourcePaths = value; }
		}
	}
}