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

@ -46,11 +46,9 @@ namespace System.Runtime.Serialization
string assemblyName; // the assembly being serialized
string fullTypeName; // the type being serialized.
#if NET_4_0
Type objectType;
bool isAssemblyNameSetExplicit;
bool isFullTypeNameSetExplicit;
#endif
IFormatterConverter converter;
@ -60,9 +58,7 @@ namespace System.Runtime.Serialization
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
converter = new FormatterConverter ();
#if NET_4_0
objectType = type;
#endif
}
/* used by the runtime */
@ -73,9 +69,7 @@ namespace System.Runtime.Serialization
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
converter = new FormatterConverter ();
#if NET_4_0
objectType = type;
#endif
for (int i = 0; i < len; i++) {
serialized.Add (data [i].Name, data [i]);
@ -96,9 +90,7 @@ namespace System.Runtime.Serialization
this.converter = converter;
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
#if NET_4_0
objectType = type;
#endif
}
// Properties
@ -110,9 +102,7 @@ namespace System.Runtime.Serialization
if (value == null)
throw new ArgumentNullException ("Argument is null.");
assemblyName = value;
#if NET_4_0
isAssemblyNameSetExplicit = true;
#endif
}
}
@ -124,9 +114,7 @@ namespace System.Runtime.Serialization
if ( value == null)
throw new ArgumentNullException ("Argument is null.");
fullTypeName = value;
#if NET_4_0
isFullTypeNameSetExplicit = true;
#endif
}
}
@ -135,7 +123,6 @@ namespace System.Runtime.Serialization
get { return serialized.Count; }
}
#if NET_4_0
public bool IsAssemblyNameSetExplicit {
get {
return isAssemblyNameSetExplicit;
@ -153,7 +140,6 @@ namespace System.Runtime.Serialization
return objectType;
}
}
#endif
// Methods
public void AddValue (string name, object value, Type type)
@ -201,11 +187,9 @@ namespace System.Runtime.Serialization
fullTypeName = type.FullName;
assemblyName = type.Assembly.FullName;
#if NET_4_0
objectType = type;
isAssemblyNameSetExplicit = false;
isFullTypeNameSetExplicit = false;
#endif
}
public SerializationInfoEnumerator GetEnumerator ()