Exemple #1
0
        private IPropertySetting MapProperty(
            PropertySettingCollection.InheritedSetting inheritedSetting,
            RadElement element)
        {
            if (element == null)
            {
                return((IPropertySetting)null);
            }
            RadProperty property = element.MapStyleProperty(inheritedSetting.property, inheritedSetting.settingType);

            if (property == null)
            {
                return((IPropertySetting)null);
            }
            PropertySettingCollection.InheritedSetting key = new PropertySettingCollection.InheritedSetting(inheritedSetting.settingType, property);
            IPropertySetting propertySetting;

            if (!this.mappedSettings.TryGetValue(key, out propertySetting))
            {
                lock (Locker.SyncObj)
                {
                    if (!this.mappedSettings.TryGetValue(key, out propertySetting))
                    {
                        propertySetting.Property = property;
                        this.mappedSettings[key] = propertySetting;
                    }
                }
            }
            return(propertySetting);
        }
Exemple #2
0
 public override bool Equals(object obj)
 {
     PropertySettingCollection.InheritedSetting inheritedSetting = (PropertySettingCollection.InheritedSetting)obj;
     if (this.settingType == inheritedSetting.settingType)
     {
         return(this.property == inheritedSetting.property);
     }
     return(false);
 }