Alba.Jaml.XamlGeneration.XamlGenerator.GetXAttrsShortProps C# (CSharp) Метод

GetXAttrsShortProps() приватный Метод

Get XAttributes returned by implementations of IPropertyShortcut.
private GetXAttrsShortProps ( Newtonsoft.Json.Linq.JObject jobj, List allProps ) : List
jobj Newtonsoft.Json.Linq.JObject Processed object.
allProps List [out] All properties except processed by shortcuts.
Результат List
        private List<XAttribute> GetXAttrsShortProps (JObject jobj, List<JProperty> allProps)
        {
            var shortPropNames = new List<string>();
            var xAttrsShortProps = new List<XAttribute>();
            foreach (JProperty prop in jobj.Properties()) {
                IPropertyShortcut shortcut = _propertyShortcuts.FirstOrDefault(ps => ps.IsPropertySupported(prop));
                if (shortcut != null) {
                    shortPropNames.Add(prop.Name);
                    xAttrsShortProps.AddRange(shortcut.GetAttributes(prop));
                }
            }
            allProps.AddRange(jobj.Properties().Where(p => !shortPropNames.Contains(p.Name)));
            return xAttrsShortProps;
        }