Ejemplo n.º 1
0
 public void WriteToConfiguration(IConfigurationObject configurationObject)
 {
     for (int index = 0; index < this.Items.Count; ++index)
     {
         ExpandoListItemModel expandoListItemModel = this.Items[index] as ExpandoListItemModel;
         if (expandoListItemModel != null)
         {
             IConfigurationObject configurationObject1 = (IConfigurationObject)configurationObject.GetProperty(expandoListItemModel.Identifier);
             if (configurationObject1 == null)
             {
                 configurationObject1 = configurationObject.CreateConfigurationObject();
                 configurationObject.SetProperty(expandoListItemModel.Identifier, (object)configurationObject1);
             }
             expandoListItemModel.WriteToConfiguration(configurationObject1);
         }
     }
 }
Ejemplo n.º 2
0
        private IConfigurationObject GetConfigurationObject()
        {
            IConfigurationObject           solutionSettings = this.Solution.SolutionSettingsManager.SolutionSettings;
            IConfigurationObjectCollection orCreateConfigurationObjectCollectionProperty = solutionSettings.GetOrCreateConfigurationObjectCollectionProperty(ProjectConverterBase.SuoUpgraderCollection);
            IConfigurationObject           configurationObject = null;

            foreach (IConfigurationObject configurationObject1 in orCreateConfigurationObjectCollectionProperty)
            {
                if (string.CompareOrdinal(this.Identifier, configurationObject1.GetPropertyOrDefault <string>(ProjectConverterBase.SuoUpgraderIdentifier)) != 0)
                {
                    continue;
                }
                configurationObject = configurationObject1;
                break;
            }
            if (configurationObject == null)
            {
                configurationObject = solutionSettings.CreateConfigurationObject();
                configurationObject.SetProperty(ProjectConverterBase.SuoUpgraderIdentifier, this.Identifier);
                orCreateConfigurationObjectCollectionProperty.Add(configurationObject);
            }
            return(configurationObject);
        }