Carrotware.CMS.UI.Components.LogoutInfo.ReconstructSettings C# (CSharp) Метод

ReconstructSettings() публичный Метод

public ReconstructSettings ( ) : void
Результат void
        public void ReconstructSettings()
        {
            this.Settings = null;

            if (!String.IsNullOrEmpty(this.EncodedSettings)) {
                string sXML = CMSConfigHelper.DecodeBase64(this.EncodedSettings);
                XmlSerializer xmlSerializer = new XmlSerializer(typeof(LogoutInfoSettings));
                using (StringReader stringReader = new StringReader(sXML)) {
                    this.Settings = (LogoutInfoSettings)xmlSerializer.Deserialize(stringReader);
                }
            }

            this.IsLoggedIn = SecurityData.IsAuthenticated;
        }

Usage Example

		public ActionResult Logout(LogoutInfo model) {
			model.ReconstructSettings();
			this.ViewData[LogoutInfo.Key] = model;
			LoadPage(model.Settings.Uri);

			if (ModelState.IsValid) {
				ModelState.Clear();
			}

			securityHelper.AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);

			return PartialView(model.Settings.PostPartialName);
		}