Esempio n. 1
0
        /// <summary>
        /// Handles list properties.
        /// </summary>
        /// <param name="myItemProperty">The property of the item(edge, hyperedge, vertex).</param>
        /// <param name="myPropertyToFill">The schema property which is to fill.</param>
        private void HandleListProperties(ICollectionWrapper myItemProperty, ref Property myPropertyToFill)
        {
            Type propertyElementType = typeof(Object);

            foreach (var value in myItemProperty)
            {
                myPropertyToFill.Value += "[" + value.ToString() + "],";
                propertyElementType     = value.GetType();
            }

            var index = -1;

            if (myPropertyToFill.Value != null)
            {
                index = myPropertyToFill.Value.LastIndexOf(',');
            }

            if (index > -1)
            {
                myPropertyToFill.Value = myPropertyToFill.Value.Remove(index, 1);
            }

            myPropertyToFill.Type = myItemProperty.GetType().Name + "(" + propertyElementType.Name + ")";
        }
Esempio n. 2
0
        /// <summary>
        /// Handles list properties.
        /// </summary>
        /// <param name="myItemProperty">The property of the item(edge, hyperedge, vertex).</param>
        /// <param name="myPropertyToFill">The schema property which is to fill.</param>
        private void HandleListProperties(ICollectionWrapper myItemProperty, ref Property myPropertyToFill)
        {
            Type propertyElementType = typeof(Object);
            
            foreach (var value in myItemProperty)
            {
                myPropertyToFill.Value += "[" + value.ToString() + "],";
                propertyElementType = value.GetType();
            }

            var index = -1;

            if (myPropertyToFill.Value != null)
            {
                index = myPropertyToFill.Value.LastIndexOf(',');
            }

            if (index > -1)
            {
                myPropertyToFill.Value = myPropertyToFill.Value.Remove(index, 1);
            }

            myPropertyToFill.Type = myItemProperty.GetType().Name + "(" + propertyElementType.Name + ")";            
        }