Struct ComponentBaseExtensions.PropertyTagRestore<T>
A structure returned by PushTagAndRestore<T>(ComponentBase, PropertyKey<T?>, T) that saves the value of a tag property of an object and, once finished, can restore its value to the previous one.
public readonly struct ComponentBaseExtensions.PropertyTagRestore<T> : IDisposable
Type Parameters
TThe type of the tag.
- Implements
- Inherited Members
- Extension Methods
Constructors
PropertyTagRestore(ComponentBase, PropertyKey<T?>)
Initializes a new instance of the ComponentBaseExtensions.PropertyTagRestore<T> structure.
public PropertyTagRestore(ComponentBase container, PropertyKey<T?> key)
Parameters
containerComponentBaseThe Component that contains the tag to set and restore.
keyPropertyKey<T>The key that identifies the tag to set and restore.
Exceptions
- ArgumentNullException
containeris null.- ArgumentNullException
keyis null.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()