Exemple #1
0
        /// <summary>
        /// Automatically called at load time by the ApplicationManager.  Or, can be manually called.  The parameter
        /// must be deserializable into type <typeparamref name="TConfigRoot"/>.
        /// </summary>
        /// <param name="config">
        /// The config.  Must be deserializable into type <typeparamref name="TConfigRoot"/>.
        /// </param>
#if SILVERLIGHT
        public void Configure(System.Xml.Linq.XElement config)
        {
            var serializer = new XmlSerializer(typeof(TConfigRoot));

            Configuration = serializer.Deserialize(config.CreateReader()) as TConfigRoot;
        }