Skip to content

Commit

Permalink
Update XML documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Barendse committed Jun 10, 2020
1 parent eac6351 commit 249b3b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// Provides a default overridable implementation for <see cref="IPropertyValueConverter"/> that does nothing.
/// Provides a default implementation for <see cref="IPropertyValueConverter" />.
/// </summary>
/// <seealso cref="Umbraco.Core.PropertyEditors.IPropertyValueConverter" />
public abstract class PropertyValueConverterBase : IPropertyValueConverter
{
/// <inheritdoc />
public virtual bool IsConverter(IPublishedPropertyType propertyType)
=> false;

/// <inheritdoc />
public virtual bool? IsValue(object value, PropertyValueLevel level)
{
switch (level)
Expand All @@ -35,18 +38,23 @@ public virtual bool HasValue(IPublishedProperty property, string culture, string
return value != null && (!(value is string stringValue) || !string.IsNullOrWhiteSpace(stringValue));
}

/// <inheritdoc />
public virtual Type GetPropertyValueType(IPublishedPropertyType propertyType)
=> typeof(object);

/// <inheritdoc />
public virtual PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Snapshot;

/// <inheritdoc />
public virtual object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)
=> source;

/// <inheritdoc />
public virtual object ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
=> inter;

/// <inheritdoc />
public virtual object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
=> inter?.ToString() ?? string.Empty;
}
Expand Down

0 comments on commit 249b3b8

Please sign in to comment.