private void UpdateContext(IContext targetContext, OptionDefinition optionDefinition, string value) { var propertyInfo = targetContext.GetType().GetPropertyEx(optionDefinition.PropertyNameOnContext); if (optionDefinition.TrimQuotes) { if (!string.IsNullOrWhiteSpace(value)) { value = value.Trim('\"'); } } var finalValue = StringToObjectHelper.ToRightType(propertyInfo.PropertyType, value); propertyInfo.SetValue(targetContext, finalValue, null); }