using System; using System.Runtime.Serialization; namespace Umbraco.Core.Models { /// /// Represents a Script file /// [Serializable] [DataContract(IsReference = true)] public class Script : File, IScript { public Script(string path) : this(path, (Func) null) { } public Script(string path, Func getFileContent) : base(path, getFileContent) { } /// /// Indicates whether the current entity has an identity, which in this case is a path/name. /// /// /// Overrides the default Entity identity check. /// public override bool HasIdentity => string.IsNullOrEmpty(Path) == false; } }