private void InitializePropertyState(StyleCopAddIn addIn, BooleanProperty property) { BooleanProperty setting = addIn.GetSetting(this.tabControl.MergedSettings, property.PropertyName) as BooleanProperty; if (setting == null) { property.Value = property.DefaultValue; } else { property.Value = setting.Value; } }
/// <summary> /// Sets the check state for the given property. /// </summary> /// <param name="addIn">The addin that owns the property.</param> /// <param name="property">The property.</param> private void InitializePropertyState(StyleCopAddIn addIn, BooleanProperty property) { Param.AssertNotNull(addIn, "addIn"); Param.AssertNotNull(property, "property"); BooleanProperty mergedProperty = addIn.GetSetting(this.tabControl.MergedSettings, property.PropertyName) as BooleanProperty; if (mergedProperty == null) { property.Value = property.DefaultValue; } else { property.Value = mergedProperty.Value; } }