﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gibe.DittoProcessors.Processors
{
	public class ParentAttribute : TestableDittoProcessorAttribute
	{
		private readonly uint _parentDepth;

		public ParentAttribute(uint parentDepth = 1)
		{
			_parentDepth = parentDepth;
		}

		public override object ProcessValue()
		{
			var content = Context.Content;
			for (var i = 0; i < _parentDepth; i++)
			{
				content = content.Parent;
			}

			return content;
		}
	}
}

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gibe.DittoProcessors.Processors
{
	public class ParentAttribute : TestableDittoProcessorAttribute
	{
		public override object ProcessValue()
		{
			return Context.Content.Parent;
		}
	}
}

Revert "Navigate up many parents"
Revert "Navigate up many parents"

This reverts commit f430cc765b43b22d56ce20dae47a331401f0dbd3.
