Adds IDataValueReference

This commit is contained in:
Shannon
2019-10-21 19:40:06 +11:00
parent d2c43d6f13
commit 13f7ee8a5f
3 changed files with 37 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ using Umbraco.Core.Services;
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// Represents an editor for editing data values.
/// </summary>
@@ -63,8 +64,26 @@ namespace Umbraco.Core.PropertyEditors
// TODO: / deal with this when unplugging the xml cache
// why property vs propertyType? services should be injected! etc...
/// <summary>
/// Used for serializing an <see cref="IContent"/> item for packaging
/// </summary>
/// <param name="property"></param>
/// <param name="dataTypeService"></param>
/// <param name="localizationService"></param>
/// <param name="published"></param>
/// <returns></returns>
IEnumerable<XElement> ConvertDbToXml(Property property, IDataTypeService dataTypeService, ILocalizationService localizationService, bool published);
/// <summary>
/// Used for serializing an <see cref="IContent"/> item for packaging
/// </summary>
/// <param name="propertyType"></param>
/// <param name="value"></param>
/// <param name="dataTypeService"></param>
/// <returns></returns>
XNode ConvertDbToXml(PropertyType propertyType, object value, IDataTypeService dataTypeService);
string ConvertDbToString(PropertyType propertyType, object value, IDataTypeService dataTypeService);
}
}

View File

@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// Used to resolve references from <see cref="IDataValueEditor"/> values
/// </summary>
public interface IDataValueReference
{
/// <summary>
/// Returns any references contained in the value
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
IEnumerable<Udi> GetReferences(object value);
}
}

View File

@@ -270,6 +270,7 @@
<Compile Include="Models\PublishedContent\IPublishedContentType.cs" />
<Compile Include="Models\PublishedContent\IPublishedPropertyType.cs" />
<Compile Include="PropertyEditors\ConfigurationFieldsExtensions.cs" />
<Compile Include="PropertyEditors\IDataValueReference.cs" />
<Compile Include="PropertyEditors\IIgnoreUserStartNodesConfig.cs" />
<Compile Include="PublishedContentExtensions.cs" />
<Compile Include="Models\PublishedContent\UrlMode.cs" />