using System;
using System.Collections.Generic;
using System.Text;

namespace Vortex.SceneFramework {

	/// <summary>
	/// Attribute which marks property or field to be a domain element reference which should be resolved on domain layout loading
	/// </summary>
	[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]	
	public sealed class ElementRefAttribute : Attribute {

		public string ElementID { get; private set; }

		/// <summary>
		/// Gets or sets a value indicating whether element reference is strongly required. By default reference is required.
		/// </summary>
		/// <value><c>true</c> if reference required; otherwise, <c>false</c>.</value>
		public bool Required { get; set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="ElementRefAttribute"/> class.
		/// </summary>
		public ElementRefAttribute() {
			Required = true;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ElementRefAttribute"/> class.
		/// </summary>
		/// <param name="elementId">The element id to use for binding.</param>
		public ElementRefAttribute(string elementId) {
			ElementID = elementId;
			Required = true;
		}
	}

	/// <summary>
	/// Attribute which marks property or field as resource reference which should be resolved on domain loading. By default reference is required.
	/// </summary>
	[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
	public sealed class ResourceRefAttribute : Attribute {

		public string ResourceID { get; private set; }

		/// <summary>
		/// Gets or sets a value indicating whether resource reference is strongly required.
		/// </summary>
		/// <value><c>true</c> if eference required; otherwise, <c>false</c>.</value>
		public bool Required { get; set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="ResourceRefAttribute"/> class.
		/// </summary>
		public ResourceRefAttribute() {
			Required = true;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ResourceRefAttribute"/> class.
		/// </summary>
		/// <param name="resourceId">The resource id to use for binding.</param>
		public ResourceRefAttribute(string resourceId) {
			ResourceID = resourceId;
			Required = true;
		}
	}

	
	/// <summary>
	/// Attribute which marks property or field as resource reference which should be resolved on domain loading
	/// </summary>
	[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
	public sealed class SceneComponentAttribute : Attribute {
	}
	

}
