コード例 #1
0
        public static CobrandSettings CreateCobrandSettings(string cobrandSettingsXml)
        {
            CobrandSettings cobrandSettings = new CobrandSettings();

            if (!string.IsNullOrEmpty(cobrandSettingsXml))
            {
                cobrandSettings = MyProsperity.Framework.Xml.SerializationHelper.Deserialize <CobrandSettings>(cobrandSettingsXml);
            }

            if (cobrandSettings != null)
            {
                foreach (MobilePlatformType platformType in Enum.GetValues(typeof(MobilePlatformType)))
                {
                    if (cobrandSettings.MobileApps.All(a => a.Platform != platformType))
                    {
                        cobrandSettings.MobileApps.Add(new MobileAppSettings(platformType));
                    }
                }
            }

            return(cobrandSettings);
        }
コード例 #2
0
ファイル: Cobrand.cs プロジェクト: mastbaadshah/AdHoc-Scripts
 public void UpdateCobrandSettingsXmlFromCobrandSettings()
 {
     CobrandSettingsXml = CobrandSettings.GetCobrandSettingsXml();
     _CobrandSettings   = null;
 }