Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent

# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
This commit is contained in:
Shannon
2019-06-21 15:06:43 +10:00
137 changed files with 2017 additions and 1814 deletions

View File

@@ -3,6 +3,7 @@ using System.Linq;
namespace Umbraco.Core.Models.Entities
{
/// <summary>
/// Implements <see cref="IDocumentEntitySlim"/>.
/// </summary>

View File

@@ -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 />

View File

@@ -2,6 +2,7 @@
namespace Umbraco.Core.Models.Entities
{
/// <summary>
/// Represents a lightweight document entity, managed by the entity service.
/// </summary>

View 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; }
}
}

View 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; }
}
}