2012-10-04 13:05:31 -02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Runtime.Serialization;
|
2013-09-13 18:11:20 +10:00
|
|
|
|
using Umbraco.Core.Configuration.UmbracoSettings;
|
2012-10-04 11:44:31 -02:00
|
|
|
|
using Umbraco.Core.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents a Script file
|
|
|
|
|
|
/// </summary>
|
2012-10-04 13:05:31 -02:00
|
|
|
|
[Serializable]
|
|
|
|
|
|
[DataContract(IsReference = true)]
|
2012-10-04 11:44:31 -02:00
|
|
|
|
public class Script : File
|
|
|
|
|
|
{
|
2013-09-13 18:11:20 +10:00
|
|
|
|
public Script(string path)
|
2015-09-07 12:38:46 +02:00
|
|
|
|
: this(path, (Func<File, string>) null)
|
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
internal Script(string path, Func<File, string> getFileContent)
|
|
|
|
|
|
: base(path, getFileContent)
|
2017-07-20 11:21:28 +02:00
|
|
|
|
{ }
|
2013-01-29 12:16:13 -01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Indicates whether the current entity has an identity, which in this case is a path/name.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// Overrides the default Entity identity check.
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
public override bool HasIdentity
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return string.IsNullOrEmpty(Path) == false; }
|
|
|
|
|
|
}
|
2012-10-04 11:44:31 -02:00
|
|
|
|
}
|
2017-07-20 11:21:28 +02:00
|
|
|
|
}
|