示例#1
0
 protected object this[UserConfigurationPropertyId propertyID]
 {
     get
     {
         UserConfigurationPropertyDefinition propertyDefinition = this.Schema.GetPropertyDefinition(propertyID);
         object obj;
         if (this.OptionProperties.ContainsKey(propertyDefinition) && this.OptionProperties[propertyDefinition] != null)
         {
             obj = this.OptionProperties[propertyDefinition];
         }
         else
         {
             obj = propertyDefinition.GetValidatedProperty(null);
         }
         ExTraceGlobals.UserOptionsDataTracer.TraceDebug <string, object>((long)this.GetHashCode(), "Get property: '{0}'; value: '{1}'", propertyDefinition.PropertyName, obj);
         return(obj);
     }
     set
     {
         UserConfigurationPropertyDefinition propertyDefinition = this.Schema.GetPropertyDefinition(propertyID);
         object value2 = propertyDefinition.GetValidatedProperty(value);
         if (!this.OptionProperties.ContainsKey(propertyDefinition))
         {
             this.OptionProperties.Add(propertyDefinition, value2);
         }
         else
         {
             this.OptionProperties[propertyDefinition] = value2;
         }
         ExTraceGlobals.UserOptionsDataTracer.TraceDebug <string, object>((long)this.GetHashCode(), "Set property: '{0}'; value: '{1}'", propertyDefinition.PropertyName, this.OptionProperties[propertyDefinition]);
     }
 }
示例#2
0
        // Token: 0x06000840 RID: 2112 RVA: 0x0001B210 File Offset: 0x00019410
        internal UserConfigurationPropertyDefinition GetPropertyDefinition(UserConfigurationPropertyId id)
        {
            int index = id - this.PropertyDefinitionsBaseId;

            return(this.GetPropertyDefinition(index));
        }