Esempio n. 1
0
        protected void SetEnvironment(ContextualObject view, Type type, string key, StyleAwareValue value)
        {
            if (value == null)
            {
                SetEnvironmentValue(view, type, key, null);
                return;
            }

            foreach (var pair in value.ToEnvironmentValues())
            {
                var newKey = pair.key == null ? key : $"{key}.{pair.key}";
                SetEnvironmentValue(view, type, newKey, pair.value);
            }
        }
Esempio n. 2
0
 protected void SetEnvironment(ContextualObject view, string styleId, string key, StyleAwareValue value, Func <object, object> getProperty)
 {
     if (value == null)
     {
         SetEnvironmentValue(view, styleId, key, null);
         return;
     }
     foreach (var pair in value.ToEnvironmentValues())
     {
         var newKey = pair.key == null ? key : $"{pair.key}.{key}";
         SetEnvironmentValue(view, styleId, newKey, getProperty(pair.value));
     }
 }