Removing MacroType enum as we only have one type - PartialView. Refactoring all its references and fixing tests

This commit is contained in:
elitsa
2020-02-25 13:38:36 +01:00
parent c3d3e6e27d
commit 0a130d6bbd
16 changed files with 36 additions and 92 deletions

View File

@@ -40,7 +40,7 @@ namespace Umbraco.Core.Models
/// <param name="cacheByMember"></param>
/// <param name="dontRender"></param>
/// <param name="macroSource"></param>
public Macro(IShortStringHelper shortStringHelper, int id, Guid key, bool useInEditor, int cacheDuration, string @alias, string name, bool cacheByPage, bool cacheByMember, bool dontRender, string macroSource, MacroTypes macroType)
public Macro(IShortStringHelper shortStringHelper, int id, Guid key, bool useInEditor, int cacheDuration, string @alias, string name, bool cacheByPage, bool cacheByMember, bool dontRender, string macroSource)
: this(shortStringHelper)
{
Id = id;
@@ -53,7 +53,6 @@ namespace Umbraco.Core.Models
CacheByMember = cacheByMember;
DontRender = dontRender;
MacroSource = macroSource;
MacroType = macroType;
}
/// <summary>
@@ -69,7 +68,6 @@ namespace Umbraco.Core.Models
/// <param name="macroSource"></param>
public Macro(IShortStringHelper shortStringHelper, string @alias, string name,
string macroSource,
MacroTypes macroType,
bool cacheByPage = false,
bool cacheByMember = false,
bool dontRender = true,
@@ -85,7 +83,6 @@ namespace Umbraco.Core.Models
CacheByMember = cacheByMember;
DontRender = dontRender;
MacroSource = macroSource;
MacroType = macroType;
}
private string _alias;
@@ -96,7 +93,6 @@ namespace Umbraco.Core.Models
private bool _cacheByMember;
private bool _dontRender;
private string _macroSource;
private MacroTypes _macroType = MacroTypes.Unknown;
private MacroPropertyCollection _properties;
private List<string> _addedProperties;
private List<string> _removedProperties;
@@ -247,16 +243,6 @@ namespace Umbraco.Core.Models
set => SetPropertyValueAndDetectChanges(value, ref _macroSource, nameof(MacroSource));
}
/// <summary>
/// Gets or set the path to the Partial View to render
/// </summary>
[DataMember]
public MacroTypes MacroType
{
get => _macroType;
set => SetPropertyValueAndDetectChanges(value, ref _macroType, nameof(MacroType));
}
/// <summary>
/// Gets or sets a list of Macro Properties
/// </summary>