Example #1
0
        /// <summary>
        /// Ensures that the entity is registered to its registry.
        /// </summary>
        public void Synchronize()
        {
            if (Name == null)
            {
                throw new InvalidOperationException();
            }

            if (_registry != null)
            {
                if (!_registry.Contains(this))
                {
                    _registry.Enter(this);
                }
            }
        }