porting 7.6-rc1 into 8

This commit is contained in:
Stephan
2017-05-12 14:49:44 +02:00
parent ade6c2f057
commit 8561d85f7a
1148 changed files with 41983 additions and 17045 deletions

View File

@@ -15,7 +15,7 @@ namespace Umbraco.Core.Models
{
public MacroProperty()
{
_key = Guid.NewGuid();
}
/// <summary>
@@ -30,6 +30,7 @@ namespace Umbraco.Core.Models
_alias = alias;
_name = name;
_sortOrder = sortOrder;
_key = Guid.NewGuid();
//try to get the new mapped parameter editor
var mapped = LegacyParameterEditorAliasConverter.GetNewAliasFromLegacyAlias(editorAlias, false);
@@ -45,16 +46,18 @@ namespace Umbraco.Core.Models
/// Ctor for creating an existing property
/// </summary>
/// <param name="id"></param>
/// <param name="key"></param>
/// <param name="alias"></param>
/// <param name="name"></param>
/// <param name="sortOrder"></param>
/// <param name="editorAlias"></param>
internal MacroProperty(int id, string @alias, string name, int sortOrder, string editorAlias)
internal MacroProperty(int id, Guid key, string @alias, string name, int sortOrder, string editorAlias)
{
_id = id;
_alias = alias;
_name = name;
_sortOrder = sortOrder;
_key = key;
//try to get the new mapped parameter editor
var mapped = LegacyParameterEditorAliasConverter.GetNewAliasFromLegacyAlias(editorAlias, false);
@@ -66,6 +69,7 @@ namespace Umbraco.Core.Models
_editorAlias = editorAlias;
}
private Guid _key;
private string _alias;
private string _name;
private int _sortOrder;
@@ -76,6 +80,7 @@ namespace Umbraco.Core.Models
private class PropertySelectors
{
public readonly PropertyInfo KeySelector = ExpressionHelper.GetPropertyInfo<MacroProperty, Guid>(x => x.Key);
public readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo<MacroProperty, string>(x => x.Alias);
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<MacroProperty, string>(x => x.Name);
public readonly PropertyInfo SortOrderSelector = ExpressionHelper.GetPropertyInfo<MacroProperty, int>(x => x.SortOrder);
@@ -83,6 +88,16 @@ namespace Umbraco.Core.Models
public readonly PropertyInfo PropertyTypeSelector = ExpressionHelper.GetPropertyInfo<MacroProperty, string>(x => x.EditorAlias);
}
/// <summary>
/// Gets or sets the Key of the Property
/// </summary>
[DataMember]
public Guid Key
{
get { return _key; }
set { SetPropertyValueAndDetectChanges(value, ref _key, Ps.Value.KeySelector); }
}
/// <summary>
/// Gets or sets the Alias of the Property
/// </summary>