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:
parent
252f47de5f
commit
b4c10aa0f4
@ -37,6 +37,13 @@ namespace RGB.NET.Core
|
||||
decorator.OnDetached(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void RemoveAllDecorators()
|
||||
{
|
||||
foreach (T decorator in Decorators.ToList())
|
||||
RemoveDecorator(decorator);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user