// -----------------------------------------------------------------------
// <copyright file="MyLink.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace AsyncDigrams
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;
	using Telerik.Windows.Diagrams.Core;
	using Telerik.Windows.Controls;

	/// <summary>
	/// TODO: Update summary.
	/// </summary>
	public class MyLink : ViewModelBase, ILink<MyNode>
	{
		private MyNode source;
		private MyNode target;

		public MyLink()
		{ }

		public string Content { get; set; }

		public MyNode Source
		{
			get
			{
				return this.source;
			}
			set
			{
				if (this.source != value)
				{
					this.source = value;
					this.OnPropertyChanged("Source");
				}
			}
		}

		public MyNode Target
		{
			get
			{
				return this.target;
			}
			set
			{
				if (this.target != value)
				{
					this.target = value;
					this.OnPropertyChanged("Target");
				}
			}
		}

		object ILink.Source
		{
			get
			{
				return this.Source;
			}
			set
			{
				this.Source = value as MyNode;
			}
		}

		object ILink.Target
		{
			get
			{
				return this.Target;
			}
			set
			{
				this.Target = value as MyNode;
			}
		}
	}
}
