[runtime] Actually clean up context-static data segments.
[mono.git] / mcs / class / System.ServiceModel.Web / System.Runtime.Serialization.Json / DataContractJsonSerializer.cs
index 8bb11605edff2177a61bb6bf05ea786ae54ddd6b..8077136394dedb755b886df4689ac4d8d3f71912 100644 (file)
@@ -87,7 +87,7 @@ namespace System.Runtime.Serialization.Json
 
                        var knownTypesFromAttributes = new List<Type> ();
 
-                       foreach (var attr in type.GetCustomAttributes (typeof(KnownTypeAttribute)))
+                       foreach (var attr in type.GetCustomAttributes (typeof (KnownTypeAttribute), false))
                                knownTypesFromAttributes.Add ((attr as KnownTypeAttribute).Type);
 
                        if (knownTypes != null)
@@ -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
 
        }
 }