Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent
# Conflicts: # src/Umbraco.Web.UI.Client/package-lock.json
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
|
||||
namespace Umbraco.Core.Models.Entities
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Implements <see cref="IDocumentEntitySlim"/>.
|
||||
/// </summary>
|
||||
|
||||
@@ -111,52 +111,6 @@ namespace Umbraco.Core.Models.Entities
|
||||
public virtual bool IsContainer { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a lightweight property.
|
||||
/// </summary>
|
||||
public class PropertySlim
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PropertySlim"/> class.
|
||||
/// </summary>
|
||||
public PropertySlim(string editorAlias, object value)
|
||||
{
|
||||
PropertyEditorAlias = editorAlias;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the property editor alias.
|
||||
/// </summary>
|
||||
public string PropertyEditorAlias { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the property value.
|
||||
/// </summary>
|
||||
public object Value { get; }
|
||||
|
||||
protected bool Equals(PropertySlim other)
|
||||
{
|
||||
return PropertyEditorAlias.Equals(other.PropertyEditorAlias) && Equals(Value, other.Value);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != GetType()) return false;
|
||||
return Equals((PropertySlim) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return (PropertyEditorAlias.GetHashCode() * 397) ^ (Value != null ? Value.GetHashCode() : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region IDeepCloneable
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Umbraco.Core.Models.Entities
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a lightweight document entity, managed by the entity service.
|
||||
/// </summary>
|
||||
|
||||
14
src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs
Normal file
14
src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Umbraco.Core.Models.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a lightweight media entity, managed by the entity service.
|
||||
/// </summary>
|
||||
public interface IMediaEntitySlim : IContentEntitySlim
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The media file's path/url
|
||||
/// </summary>
|
||||
string MediaPath { get; }
|
||||
}
|
||||
}
|
||||
10
src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs
Normal file
10
src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Umbraco.Core.Models.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements <see cref="IMediaEntitySlim"/>.
|
||||
/// </summary>
|
||||
public class MediaEntitySlim : ContentEntitySlim, IMediaEntitySlim
|
||||
{
|
||||
public string MediaPath { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user