namespace ShiroginSDK.Runtime.Services.Base { /// /// Base class for all SDK services. Provides basic lifecycle hooks. /// public abstract class ServiceBase : IShiroginService { public bool IsInitialized { get; private set; } // Called when the service starts up public virtual void Initialize() { if (IsInitialized) return; IsInitialized = true; OnInitialize(); } // Called when the service shuts down public virtual void Dispose() { if (!IsInitialized) return; IsInitialized = false; OnDispose(); } // Subclasses override these to define their behavior protected abstract void OnInitialize(); protected abstract void OnDispose(); } }