Esempio n. 1
0
 private string GetXmlNodeName(Type type, LinkedNode<object> ancestors, PropertyInfo sourceProperty, Type itemType)
 {
     return sourceProperty != null && itemType == null ? sourceProperty.GetXmlName() :
         (sourceProperty.GetXmlArrayItemName() ?? type.GetXmlName(_options.GenericTypeXmlNameFormat, _options.GenericListXmlNameFormat, !ancestors.Any()));
 }
Esempio n. 2
0
 private static string GetJsonNodeName(LinkedNode<object> ancestors, PropertyInfo sourceProperty, Type itemType)
 {
     return !ancestors.Any() ? "root" : (itemType != null ? "item" : sourceProperty.GetXmlName());
 }