Ejemplo 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);
            }
        }
Ejemplo 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));
     }
 }