Exemplo n.º 1
0
        /// <summary>
        /// Processes a <see cref="PropertyInfo"/> and adds <see cref="PropertyInfoPreprocessed"/> to the two data structures concerned: <see cref="ListOfProperties"/> and <see cref="NameToPropertyDictionary"/>
        /// </summary>
        /// <param name="propertyInfo">The <see cref="PropertyInfo"/> to be processed.</param>
        private void Add(PropertyInfo propertyInfo)
        {
            if (PropertyInfoHelper.PropertyIsIgnore(propertyInfo))
            {
                return;
            }

            PropertyInfoPreprocessed propertyInfoPreprocessed = new PropertyInfoPreprocessed(propertyInfo);

            this.ListOfProperties.Add(propertyInfoPreprocessed);
            NameToPropertyDictionary.Add(propertyInfoPreprocessed.Name, propertyInfoPreprocessed);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a <see cref="PropertyInfoPreprocessed"/> by calculating the needed fields of <see cref="PropertyInfo"/>.
 /// </summary>
 /// <param name="propertyInfo"></param>
 public PropertyInfoPreprocessed(PropertyInfo propertyInfo)
 {
     this.propertyInfo = propertyInfo;
     this.Name         = PropertyInfoHelper.PropertySerializationName(propertyInfo);
     this.Order        = PropertyInfoHelper.GetOrderFromProperty(propertyInfo);
 }