Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -117,13 +117,11 @@ namespace System.Runtime.Serialization.Json
{
}
#if NET_4_5
public DataContractJsonSerializer (Type type, DataContractJsonSerializerSettings settings)
: this (type, settings.RootName, settings.KnownTypes, settings.MaxItemsInObjectGraph, settings.IgnoreExtensionDataObject,
settings.DataContractSurrogate, false)
{
}
#endif
#endregion
@ -271,7 +269,6 @@ namespace System.Runtime.Serialization.Json
writer.WriteEndElement ();
}
#if NET_4_5
[MonoTODO]
public DateTimeFormat DateTimeFormat {
get { throw new NotImplementedException (); }
@ -291,7 +288,6 @@ namespace System.Runtime.Serialization.Json
public bool UseSimpleDictionaryFormat {
get { throw new NotImplementedException (); }
}
#endif
}
}

View File

@ -295,7 +295,9 @@ namespace System.Runtime.Serialization.Json
{
if (type.IsArray)
return type.GetElementType ();
if (type.IsGenericType && type.GetGenericTypeDefinition () == typeof (IEnumerable<>))
return type.GetGenericArguments () [0];
var inter = type.GetInterface ("System.Collections.Generic.IEnumerable`1", false);
if (inter != null)
return inter.GetGenericArguments () [0];