internal /*public*/ void FixupInheritance(IndividualDeviceConfig referrer, XmlNode configNode)
        {
            if (_fixup == FixupState.FixedUp)
            {
                return;
            }

            if (_fixup == FixupState.FixingUp)
            {
                Debug.Assert(referrer != null);

                // Circular reference
                throw new Exception(SR.GetString(SR.MobileControlsSectionHandler_CircularReference,
                                                 referrer.Name));
            }

            _fixup = FixupState.FixingUp;

            if (ParentConfigName != null)
            {
                Debug.Assert(ParentConfigName.Length != 0 && ParentConfig == null);

                ParentConfig = _controlsConfig.GetDeviceConfig(ParentConfigName);

                if (ParentConfig == null)
                {
                    throw new ConfigurationErrorsException(
                              SR.GetString(SR.MobileControlsSectionHandler_DeviceConfigNotFound,
                                           ParentConfigName),
                              configNode);
                }

                // Make sure parent is fixed up.

                ParentConfig.FixupInheritance(this, configNode);

                if (PageAdapterType == null)
                {
                    PageAdapterType = ParentConfig.PageAdapterType;
                }

                if (DeviceQualifiesPredicate == null)
                {
                    DeviceQualifiesPredicate = ParentConfig.DeviceQualifiesPredicate;
                }

                Debug.Assert(PageAdapterType != null);
                Debug.Assert(DeviceQualifiesPredicate != null);

                // Reset this since we don't need it any longer.
                ParentConfigName = null;
            }

            _fixup = FixupState.FixedUp;
        }
        internal /*public*/ void FixupInheritance(IndividualDeviceConfig referrer, XmlNode configNode)
        {
            if (_fixup == FixupState.FixedUp)
            {
                return;
            }

            if (_fixup == FixupState.FixingUp)
            {
                Debug.Assert(referrer != null);

                // Circular reference
                throw new Exception(SR.GetString(SR.MobileControlsSectionHandler_CircularReference, 
                                                 referrer.Name));
            }

            _fixup = FixupState.FixingUp;

            if (ParentConfigName != null)
            {
                Debug.Assert(ParentConfigName.Length != 0 && ParentConfig == null);
                    
                ParentConfig = _controlsConfig.GetDeviceConfig(ParentConfigName);

                if (ParentConfig == null)
                {
                    throw new ConfigurationErrorsException(
                        SR.GetString(SR.MobileControlsSectionHandler_DeviceConfigNotFound,
                                     ParentConfigName),
                        configNode);
                }

                // Make sure parent is fixed up.

                ParentConfig.FixupInheritance(this, configNode);

                if (PageAdapterType == null)
                {
                    PageAdapterType = ParentConfig.PageAdapterType;
                }

                if (DeviceQualifiesPredicate == null)
                {
                    DeviceQualifiesPredicate = ParentConfig.DeviceQualifiesPredicate;
                }

                Debug.Assert(PageAdapterType != null);
                Debug.Assert(DeviceQualifiesPredicate != null);

                // Reset this since we don't need it any longer. 
                ParentConfigName = null;
            }

            _fixup = FixupState.FixedUp;
        }