Exemplo n.º 1
0
 public IEnumerable <ISettingsPropertyDefinition> GetProperties(object @object)
 {
     foreach (var propertyDefinition in GetPropertiesInternal(@object))
     {
         SettingsUtils.CheckIsValid(propertyDefinition, @object);
         yield return(propertyDefinition);
     }
 }
        public IEnumerable <ISettingsPropertyDefinition> GetProperties(BaseSettings settings)
        {
            var obj = settings switch
            {
                IWrapper wrapper => wrapper.Object,
                _ => settings
            };

            foreach (var propertyDefinition in GetPropertiesInternal(obj))
            {
                SettingsUtils.CheckIsValid(propertyDefinition, obj);
                yield return(propertyDefinition);
            }
        }