mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08: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);
|
decorator.OnDetached(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public void RemoveAllDecorators()
|
||||||
|
{
|
||||||
|
foreach (T decorator in Decorators.ToList())
|
||||||
|
RemoveDecorator(decorator);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,5 +25,10 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="decorator">The <see cref="IDecorator"/> to be removed.</param>
|
/// <param name="decorator">The <see cref="IDecorator"/> to be removed.</param>
|
||||||
void RemoveDecorator(T decorator);
|
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