1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Added a method to remove all decorators from a decoratable

This commit is contained in:
Darth Affe 2017-09-25 21:10:10 +02:00
parent 252f47de5f
commit b4c10aa0f4
2 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,13 @@ namespace RGB.NET.Core
decorator.OnDetached(this);
}
/// <inheritdoc />
public void RemoveAllDecorators()
{
foreach (T decorator in Decorators.ToList())
RemoveDecorator(decorator);
}
#endregion
}
}

View File

@ -25,5 +25,10 @@
/// </summary>
/// <param name="decorator">The <see cref="IDecorator"/> to be removed.</param>
void RemoveDecorator(T decorator);
/// <summary>
/// Removes all <see cref="IDecorator"/> from the <see cref="IDecoratable"/>.
/// </summary>
void RemoveAllDecorators();
}
}