private ValidationResult ValidateProperty(object target, ConfigurationPropertyModelBase propertyModelBase, ConfigurationIdentity configIdentity, IEnumerable <ConfigurationSet> configurationSets)
        {
            switch (propertyModelBase)
            {
            case ConfigurationPrimitivePropertyModel propertyModel:
                return(ValidateProperty(target, propertyModel));

            case IMultipleOptionPropertyDefinition propertyModel:
                return(ValidateProperty(target, propertyModel, configIdentity, configurationSets));

            case IOptionPropertyDefinition propertyModel:
                return(ValidateProperty(target, propertyModel, configIdentity, configurationSets));

            case ConfigurationCollectionPropertyDefinition propertyModel:
                return(ValidateProperty(target, propertyModel, configIdentity, configurationSets));

            default:
                return(ValidationResult.CreateValid());
            }
        }
        private ValidationResult ValidateProperty(object target, ConfigurationPropertyModelBase propertyModelBase)
        {
            switch (propertyModelBase)
            {
            case ConfigurationPrimitivePropertyModel propertyModel:
                return(ValidateProperty(target, propertyModel));

            case ConfigurationPropertyWithMultipleOptionsModelDefinition propertyModel:
                return(ValidateProperty(target, propertyModel));

            case ConfigurationPropertyWithOptionsModelDefinition propertyModel:
                return(ValidateProperty(target, propertyModel));

            case ConfigurationCollectionPropertyDefinition propertyModel:
                return(ValidateProperty(target, propertyModel));

            default:
                return(ValidationResult.CreateValid());
            }
        }
 /// <summary>
 /// Initializes Builder for ConfigurationPropertyModel
 /// </summary>
 /// <param name="model">ConfigurationPropertyModel to be modified by ConfigurationPropertyModelBuilder</param>
 protected ConfigurationPropertyModelBuilder(ConfigurationPropertyModelBase model)
 {
     this.model = model;
 }