Merge branch '6.2.0-pubcontent' into 7.0.0-pubcontent
Conflicts: src/Umbraco.Core/Cache/CacheProviderBase.cs src/Umbraco.Core/Cache/HttpRuntimeCacheProvider.cs src/Umbraco.Core/Cache/NullCacheProvider.cs src/Umbraco.Core/Cache/StaticCacheProvider.cs src/Umbraco.Core/Configuration/UmbracoSettings.cs src/Umbraco.Core/CoreBootManager.cs src/Umbraco.Core/Dynamics/PropertyResult.cs src/Umbraco.Core/Models/IPublishedContentProperty.cs src/Umbraco.Core/Models/PublishedItemType.cs src/Umbraco.Core/PropertyEditors/IPropertyEditorValueConverter.cs src/Umbraco.Core/PropertyEditors/PropertyEditorValueConvertersResolver.cs src/Umbraco.Core/PropertyEditors/PropertyValueConvertersResolver.cs src/Umbraco.Core/PublishedContentExtensions.cs src/Umbraco.Core/PublishedContentHelper.cs src/Umbraco.Core/Umbraco.Core.csproj src/Umbraco.Tests/CodeFirst/StronglyTypedMapperTest.cs src/Umbraco.Tests/LibraryTests.cs src/Umbraco.Tests/PropertyEditors/PropertyEditorValueConverterTests.cs src/Umbraco.Tests/PublishedCache/PublishedContentCacheTests.cs src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs src/Umbraco.Web/ExamineExtensions.cs src/Umbraco.Web/Models/DynamicPublishedContent.cs src/Umbraco.Web/Models/XmlPublishedContent.cs src/Umbraco.Web/Models/XmlPublishedContentProperty.cs src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs src/Umbraco.Web/PublishedContentExtensions.cs src/Umbraco.Web/Templates/TemplateUtilities.cs src/Umbraco.Web/Umbraco.Web.csproj src/Umbraco.Web/WebBootManager.cs src/Umbraco.Web/umbraco.presentation/macro.cs src/umbraco.MacroEngines/RazorDynamicNode/PropertyResult.cs src/umbraco.MacroEngines/RazorDynamicNode/PublishedContentExtensions.cs
This commit is contained in:
@@ -16,7 +16,7 @@ namespace umbraco.MacroEngines
|
||||
[Obsolete("This class has been superceded by Umbraco.Core.Dynamics.DynamicNull")]
|
||||
public class DynamicNull : DynamicObject, IEnumerable, IHtmlString
|
||||
{
|
||||
private readonly Umbraco.Core.Dynamics.DynamicNull _inner = new Umbraco.Core.Dynamics.DynamicNull();
|
||||
private readonly Umbraco.Core.Dynamics.DynamicNull _inner = Umbraco.Core.Dynamics.DynamicNull.Null;
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -10,27 +10,29 @@ namespace umbraco.MacroEngines
|
||||
{
|
||||
public class PropertyResult : IProperty, IHtmlString
|
||||
{
|
||||
private string _alias;
|
||||
private string _value;
|
||||
private readonly string _alias;
|
||||
private readonly string _value;
|
||||
|
||||
public PropertyResult(IProperty source)
|
||||
{
|
||||
if (source != null)
|
||||
{
|
||||
this._alias = source.Alias;
|
||||
this._value = source.Value;
|
||||
}
|
||||
if (source == null) return;
|
||||
|
||||
_alias = source.Alias;
|
||||
_value = source.Value;
|
||||
}
|
||||
|
||||
public PropertyResult(string alias, string value)
|
||||
{
|
||||
this._alias = alias;
|
||||
this._value = value;
|
||||
_alias = alias;
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public PropertyResult(Property source)
|
||||
{
|
||||
this._alias = source.PropertyType.Alias;
|
||||
this._value = string.Format("{0}", source.Value);
|
||||
_alias = source.PropertyType.Alias;
|
||||
_value = source.Value.ToString();
|
||||
}
|
||||
|
||||
public string Alias
|
||||
{
|
||||
get { return _alias; }
|
||||
@@ -45,6 +47,7 @@ namespace umbraco.MacroEngines
|
||||
{
|
||||
return Value == null;
|
||||
}
|
||||
|
||||
public bool HasValue()
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(Value);
|
||||
@@ -53,9 +56,9 @@ namespace umbraco.MacroEngines
|
||||
public int ContextId { get; set; }
|
||||
public string ContextAlias { get; set; }
|
||||
|
||||
// implements IHtmlString.ToHtmlString
|
||||
public string ToHtmlString()
|
||||
{
|
||||
//Like a boss
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@ using Property = umbraco.NodeFactory.Property;
|
||||
|
||||
namespace umbraco.MacroEngines.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for converting DynamicPublishedContent to INode
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Provides extension methods for <c>IPublishedContent</c>.
|
||||
/// </summary>
|
||||
/// <remarks>These are dedicated to converting DynamicPublishedContent to INode.</remarks>
|
||||
internal static class PublishedContentExtensions
|
||||
{
|
||||
|
||||
internal static IProperty ConvertToNodeProperty(this IPublishedContentProperty prop)
|
||||
{
|
||||
internal static IProperty ConvertToNodeProperty(this IPublishedProperty prop)
|
||||
{
|
||||
return new PropertyResult(prop.Alias, prop.Value.ToString());
|
||||
return new PropertyResult(prop.PropertyTypeAlias, prop.ObjectValue.ToString());
|
||||
}
|
||||
|
||||
internal static INode ConvertToNode(this IPublishedContent doc)
|
||||
@@ -30,7 +30,7 @@ namespace umbraco.MacroEngines.Library
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal custom INode class used for conversions from DynamicPublishedContent
|
||||
/// Internal custom INode class used for conversions from DynamicPublishedContent.
|
||||
/// </summary>
|
||||
private class ConvertedNode : INode
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user