- Saving paramters
This commit is contained in:
@@ -125,6 +125,18 @@ namespace Umbraco.Core.Collections
|
||||
|
||||
}
|
||||
|
||||
public void ReplaceAll(IEnumerable<TValue> values)
|
||||
{
|
||||
if (values == null) throw new ArgumentNullException(nameof(values));
|
||||
|
||||
Clear();
|
||||
|
||||
foreach (var value in values)
|
||||
{
|
||||
Add(value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
if (!Indecies.ContainsKey(key)) return false;
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
macro.UseInEditor = macroDisplay.UseInEditor;
|
||||
macro.MacroSource = macroDisplay.View;
|
||||
macro.MacroType = MacroTypes.PartialView;
|
||||
macro.Properties.ReplaceAll(macroDisplay.Parameters.Select((x,i) => new MacroProperty(x.Key, x.Label, i, x.Editor)));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -218,7 +219,7 @@
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds all the macro partials
|
||||
/// Finds all the macro partials
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The <see cref="IEnumerable"/>.
|
||||
|
||||
Reference in New Issue
Block a user