From ff3b3ee961e82d811b94ebfbaee523c9fc2b2449 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Fri, 2 Aug 2024 21:20:35 +0300 Subject: [PATCH] Rename UserData to Attribute. --- Dashboard/Controls/UIBase.cs | 6 +++--- Dashboard/{IDbUserdata.cs => IDbAttribute.cs} | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) rename Dashboard/{IDbUserdata.cs => IDbAttribute.cs} (63%) diff --git a/Dashboard/Controls/UIBase.cs b/Dashboard/Controls/UIBase.cs index d411718..a083cf7 100644 --- a/Dashboard/Controls/UIBase.cs +++ b/Dashboard/Controls/UIBase.cs @@ -9,7 +9,7 @@ namespace Dashboard.Controls /// /// Bases for all UI elements. /// - public abstract class UIBase : IDbUserdata + public abstract class UIBase : IDbAttribute { private Vector2 size; @@ -60,7 +60,7 @@ namespace Dashboard.Controls public bool IsMaximumSizeSet => MaximumSize != new Vector2(-1, -1); public bool IsMinimumSizeSet => MinimumSize != new Vector2(-1, -1); - public Dictionary Userdata { get; } = new Dictionary(); + public Dictionary Attributes { get; } = new Dictionary(); public virtual void NotifyEvent(object? sender, EventArgs args) { @@ -95,7 +95,7 @@ namespace Dashboard.Controls protected virtual void Dispose(bool disposing) { - foreach (object userdata in Userdata.Values) + foreach (object userdata in Attributes.Values) { if (userdata is IDisposable disposable) disposable.Dispose(); diff --git a/Dashboard/IDbUserdata.cs b/Dashboard/IDbAttribute.cs similarity index 63% rename from Dashboard/IDbUserdata.cs rename to Dashboard/IDbAttribute.cs index d27f8a7..8c8fc58 100644 --- a/Dashboard/IDbUserdata.cs +++ b/Dashboard/IDbAttribute.cs @@ -5,17 +5,17 @@ using System.Collections.Generic; namespace Dashboard { /// - /// Common interface for Dashboard objects that accept userdata. + /// Common interface for Dashboard objects that accept attributes. /// /// /// Dashboard will call dispose on any and all objects which implement IDisposable. /// If this is an issue, please guard your object against this using a wrapper. /// - /// Userdata dictionary. + /// Attribute dictionary. /// - public Dictionary Userdata { get; } + public Dictionary Attributes { get; } } } \ No newline at end of file