Esempio n. 1
0
        public static XElement CreateDataElement(IDictionary <string, object> row)
        {
            var entry = CreateEmptyEntryWithNamespaces();

            var properties = entry.Element(null, "content").Element("m", "properties");

            foreach (var prop in row)
            {
                EdmHelper.Write(properties, prop);
            }

            return(entry);
        }
Esempio n. 2
0
        private static IEnumerable <KeyValuePair <string, object> > GetProperties(XElement element)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }

            var properties = element.Element("m", "properties");

            if (properties == null)
            {
                yield break;
            }

            foreach (var property in properties.Elements())
            {
                yield return(EdmHelper.Read(property));
            }
        }