/// <summary>
        /// Default deserzialization perfectly works on .NET and mono for Windows, but not on any mono platforms other than windows. To prevent the mono framework on non Windows platforms to throw errors kick into the deserialization and override the default one.
        /// </summary>
        /// <param name="reader">Reader.</param>
        /// <param name="serializeCollectionKey">If set to <c>true</c> serialize collection key.</param>
        protected override void DeserializeElement(System.Xml.XmlReader reader, bool serializeCollectionKey)
        {
            if (reader.Name.ToLowerInvariant() == this.PluginConfigurationCollectionPropertyName.ToLowerInvariant() || reader.Name.ToLowerInvariant() == "plugins")
            {
                if (reader.Name.ToLowerInvariant() == this.PluginConfigurationCollectionPropertyName.ToLowerInvariant())
                {
                    Kohl.Framework.Logging.Log.Debug("Reading plugin options.");
                }

                if (reader.Name.ToLowerInvariant() == "plugins")
                {
                    Kohl.Framework.Logging.Log.Debug("Reading options for favorite.");
                }


                while (reader.Read())
                {
                    if (reader.Name.ToLowerInvariant() == PluginConfigurationPropertyName.ToLowerInvariant() || reader.Name.ToLowerInvariant() == "add")
                    {
                        if (!this.BaseGetAllKeys().Contains(reader[0].ToString()))
                        {
                            PluginConfiguration config = new PluginConfiguration(reader[0].ToString());

                            if (reader.AttributeCount == 3)
                            {
                                config.SetValue(reader[1].ToString(), reader[2].ToString());
                            }
                            else if (reader.AttributeCount == 2)
                            {
                                config.SetValue(reader[1].ToString());
                            }

                            this.Add(config);
                        }
                    }
                    if (reader.Name.ToLowerInvariant() == this.PluginConfigurationCollectionPropertyName.ToLowerInvariant() || reader.Name.ToLowerInvariant() == "plugins")
                    {
                        return;
                    }
                }
            }
        }
        /// <summary>
        /// Gets a value indicating whether an unknown element is encountered during deserialization.
        /// </summary>
        /// <param name="elementName">The name of the unknown subelement.</param>
        /// <param name="reader">The <see cref="global::System.Xml.XmlReader"/> being used for deserialization.</param>
        /// <returns>
        /// <see langword="true"/> when an unknown element is encountered while deserializing; otherwise, <see langword="false"/>.
        /// </returns>
        /// <exception cref="global::System.Configuration.ConfigurationErrorsException">The element identified by <paramref name="elementName"/> is locked.- or -One or more of the element's attributes is locked.- or -<paramref name="elementName"/> is unrecognized, or the element has an unrecognized attribute.- or -The element has a Boolean attribute with an invalid value.- or -An attempt was made to deserialize a property more than once.- or -An attempt was made to deserialize a property that is not a valid member of the element.- or -The element cannot contain a CDATA or text element.</exception>
        protected override bool OnDeserializeUnrecognizedElement(string elementName, global::System.Xml.XmlReader reader)
        {
            if (elementName == PluginConfigurationPropertyName && reader.AttributeCount > 0)
            {
                PluginConfiguration config = new PluginConfiguration(reader[0].ToString());

                if (reader.AttributeCount == 3)
                {
                    config.SetValue(reader[1].ToString(), reader[2].ToString());
                }
                else if (reader.AttributeCount == 2)
                {
                    config.SetValue(reader[1].ToString());
                }

                this.Add(config);
            }

            return(true);
        }