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
66 lines
1.5 KiB
C#
66 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using umbraco.interfaces;
|
|
using umbraco.cms.businesslogic.property;
|
|
using System.Web;
|
|
|
|
namespace umbraco.MacroEngines
|
|
{
|
|
public class PropertyResult : IProperty, IHtmlString
|
|
{
|
|
private readonly string _alias;
|
|
private readonly string _value;
|
|
|
|
public PropertyResult(IProperty source)
|
|
{
|
|
if (source == null) return;
|
|
|
|
_alias = source.Alias;
|
|
_value = source.Value;
|
|
}
|
|
|
|
public PropertyResult(string alias, string value)
|
|
{
|
|
_alias = alias;
|
|
_value = value;
|
|
}
|
|
|
|
public PropertyResult(Property source)
|
|
{
|
|
_alias = source.PropertyType.Alias;
|
|
_value = source.Value.ToString();
|
|
}
|
|
|
|
public string Alias
|
|
{
|
|
get { return _alias; }
|
|
}
|
|
|
|
public string Value
|
|
{
|
|
get { return _value; }
|
|
}
|
|
|
|
public bool IsNull()
|
|
{
|
|
return Value == null;
|
|
}
|
|
|
|
public bool HasValue()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(Value);
|
|
}
|
|
|
|
public int ContextId { get; set; }
|
|
public string ContextAlias { get; set; }
|
|
|
|
// implements IHtmlString.ToHtmlString
|
|
public string ToHtmlString()
|
|
{
|
|
return Value;
|
|
}
|
|
}
|
|
}
|