Merge remote-tracking branch 'origin/7.0.0' into 7.0.0--property-editor-guid-to-alias

Conflicts:
	src/Umbraco.Core/Configuration/LegacyUmbracoSettings.cs
	src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Expressions/AlterColumnExpression.cs
	src/Umbraco.Core/PropertyEditors/TinyMcePropertyEditorValueConverter.cs
	src/Umbraco.Core/XmlHelper.cs
	src/Umbraco.Tests/ObjectExtensionsTests.cs
	src/Umbraco.Web/PropertyEditors/RteMacroRenderingPropertyEditorValueConverter.cs
	src/Umbraco.Web/Routing/DefaultUrlProvider.cs
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/macro.cs
This commit is contained in:
Shannon
2013-09-17 00:27:17 +10:00
130 changed files with 2785 additions and 1282 deletions

View File

@@ -131,7 +131,7 @@ namespace Umbraco.Web.Models
//this is the result of an extension method execution gone wrong so we return dynamic null
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod
&& attempt.Error != null && attempt.Error is TargetInvocationException)
&& attempt.Exception != null && attempt.Exception is TargetInvocationException)
{
result = new DynamicNull();
return true;
@@ -150,7 +150,7 @@ namespace Umbraco.Web.Models
{
if (binder.Name.InvariantEquals("ChildrenAsList") || binder.Name.InvariantEquals("Children"))
{
return new Attempt<object>(true, Children);
return Attempt<object>.Succeed(Children);
}
if (binder.Name.InvariantEquals("parentId"))
@@ -160,9 +160,9 @@ namespace Umbraco.Web.Models
{
throw new InvalidOperationException(string.Format("The node {0} does not have a parent", Id));
}
return new Attempt<object>(true, parent.Id);
return Attempt<object>.Succeed(parent.Id);
}
return Attempt<object>.False;
return Attempt<object>.Fail();
}
/// <summary>
@@ -182,10 +182,10 @@ namespace Umbraco.Web.Models
.ToArray();
if (filteredTypeChildren.Any())
{
return new Attempt<object>(true,
return Attempt<object>.Succeed(
new DynamicPublishedContentList(filteredTypeChildren.Select(x => new DynamicPublishedContent(x))));
}
return Attempt<object>.False;
return Attempt<object>.Fail();
}
/// <summary>
@@ -201,9 +201,7 @@ namespace Umbraco.Web.Models
? reflectedProperty.Value
: null;
return result == null
? Attempt<object>.False
: new Attempt<object>(true, result);
return Attempt.If(result != null, result);
}
/// <summary>
@@ -225,7 +223,7 @@ namespace Umbraco.Web.Models
if (userProperty == null)
{
return Attempt<object>.False;
return Attempt<object>.Fail();
}
var result = userProperty.Value;
@@ -250,7 +248,7 @@ namespace Umbraco.Web.Models
result = converted.Result;
}
return new Attempt<object>(true, result);
return Attempt<object>.Succeed(result);
}
@@ -385,7 +383,7 @@ namespace Umbraco.Web.Models
{
try
{
return new Attempt<object>(true,
return Attempt<object>.Succeed(
content.GetType().InvokeMember(memberAlias,
System.Reflection.BindingFlags.GetProperty |
System.Reflection.BindingFlags.Instance |
@@ -396,7 +394,7 @@ namespace Umbraco.Web.Models
}
catch (MissingMethodException ex)
{
return new Attempt<object>(ex);
return Attempt<object>.Fail(ex);
}
};