Merge branch 'dev-v7' into 7.3.0
Conflicts: src/Umbraco.Core/Services/EntityService.cs src/Umbraco.Core/Services/ServiceContext.cs src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs src/Umbraco.Web/Cache/TemplateCacheRefresher.cs src/umbraco.cms/businesslogic/template/Template.cs
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
get
|
||||
{
|
||||
var converted = ObjectExtensions.TryConvertTo<T>(RawValue);
|
||||
var converted = RawValue.TryConvertTo<T>();
|
||||
if (converted.Success == false)
|
||||
throw new InvalidCastException("Could not convert value " + RawValue + " to type " + typeof(T));
|
||||
return converted.Result;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Xml.Linq;
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
internal class ContentErrorPageElement : InnerTextConfigurationElement<int>, IContentErrorPage
|
||||
internal class ContentErrorPageElement : InnerTextConfigurationElement<string>, IContentErrorPage
|
||||
{
|
||||
public ContentErrorPageElement(XElement rawXml)
|
||||
: base(rawXml)
|
||||
@@ -14,7 +15,43 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
|
||||
}
|
||||
|
||||
public bool HasContentId
|
||||
{
|
||||
get { return ContentId != int.MinValue; }
|
||||
}
|
||||
|
||||
public bool HasContentKey
|
||||
{
|
||||
get { return ContentKey != Guid.Empty; }
|
||||
}
|
||||
|
||||
public int ContentId
|
||||
{
|
||||
get
|
||||
{
|
||||
int parsed;
|
||||
if (int.TryParse(Value, out parsed))
|
||||
{
|
||||
return parsed;
|
||||
}
|
||||
return int.MinValue;
|
||||
}
|
||||
}
|
||||
|
||||
public Guid ContentKey
|
||||
{
|
||||
get
|
||||
{
|
||||
Guid parsed;
|
||||
if (Guid.TryParse(Value, out parsed))
|
||||
{
|
||||
return parsed;
|
||||
}
|
||||
return Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public string ContentXPath
|
||||
{
|
||||
get { return Value; }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
public interface IContentErrorPage
|
||||
{
|
||||
int ContentId { get; }
|
||||
Guid ContentKey { get; }
|
||||
string ContentXPath { get; }
|
||||
bool HasContentId { get; }
|
||||
bool HasContentKey { get; }
|
||||
string Culture { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user