Files
Umbraco-CMS/umbraco/presentation.ClientDependency/ClientDependencyPath.cs
Shandem f6d0d043b5 DO NOT DOWNLOAD. DOWNLOAT LATEST STABLE FROM RELEASE TAB
Created 4.1.0 branch

[TFS Changeset #55082]
2009-06-19 07:39:16 +00:00

59 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
namespace umbraco.presentation.ClientDependency
{
/// <summary>
/// A path object for the client dependency loader. Used to specify all of the base paths (name and path) to
/// be used with the client dependencies.
/// Databinding support has been enabled.
/// </summary>
[ParseChildren(true)]
public class ClientDependencyPath
{
string _name = "";
string _path = "";
public string Name { get { return _name; } set { _name = value; } }
public string Path { get { return _path; } set { _path = value; } }
#region Logic to allow for databinding non-UI ASP.Net control
public event EventHandler DataBinding;
public void DataBind()
{
OnDataBinding(new EventArgs());
}
protected void OnDataBinding(EventArgs e)
{
if (DataBinding != null)
DataBinding(this, e);
}
public Control BindingContainer
{
get
{
return Parent;
}
}
#endregion
/// <summary>
/// This is set at runtime to set the load for this path object. this is required for databinding.
/// </summary>
public ClientDependencyLoader Parent { get; internal set; }
public string ResolvedPath
{
get
{
if (string.IsNullOrEmpty(Path))
throw new ArgumentNullException("Path has not been set");
return Parent.ResolveUrl(Path);
}
}
}
}