using System.Runtime.Serialization;
using System.ComponentModel;

namespace wijmoSample1.Models.FileExplorer
{
	[DataContract]
	public class ItemOperationResult : IItemOperationResult
	{
		public ItemOperationResult(string path)
		{
			Path = path;
		}

		/// <summary>
		/// Gets whether the operation succeeds.
		/// </summary>
		[DataMember(Name = "success", EmitDefaultValue = false)]
		public bool Success
		{
			get;
			set;
		}

		/// <summary>
		/// Gets the error.
		/// </summary>
		[DataMember(Name = "error", EmitDefaultValue = false)]
		public string Error
		{
			get;
			set;
		}

		/// <summary>
		/// Gets the item's path.
		/// </summary>
		[DataMember(Name = "path", EmitDefaultValue = false)]
		public string Path
		{
			get;
			private set;
		}
	}
}