コード例 #1
0
ファイル: Serializer.cs プロジェクト: ChrisMissal/Bender
 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()));
 }
コード例 #2
0
ファイル: Serializer.cs プロジェクト: ChrisMissal/Bender
 private static string GetJsonNodeName(LinkedNode<object> ancestors, PropertyInfo sourceProperty, Type itemType)
 {
     return !ancestors.Any() ? "root" : (itemType != null ? "item" : sourceProperty.GetXmlName());
 }