summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs')
-rw-r--r--src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs b/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs
index 55909c85fd..45521f2397 100644
--- a/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs
+++ b/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs
@@ -24,7 +24,6 @@ namespace System.Runtime.Serialization
using System.Security;
using System.Runtime.CompilerServices;
- [System.Runtime.InteropServices.ComVisible(true)]
public sealed class SerializationInfo
{
private const int defaultSize = 4;
@@ -146,49 +145,10 @@ namespace System.Runtime.Serialization
}
}
- private static bool Compare(byte[] a, byte[] b)
- {
- // if either or both assemblies do not have public key token, we should demand, hence, returning false will force a demand
- if (a == null || b == null || a.Length == 0 || b.Length == 0 || a.Length != b.Length)
- {
- return false;
- }
- else
- {
- for (int i = 0; i < a.Length; i++)
- {
- if (a[i] != b[i]) return false;
- }
-
- return true;
- }
- }
-
internal static void DemandForUnsafeAssemblyNameAssignments(string originalAssemblyName, string newAssemblyName)
{
}
- internal static bool IsAssemblyNameAssignmentSafe(string originalAssemblyName, string newAssemblyName)
- {
- if (originalAssemblyName == newAssemblyName)
- {
- return true;
- }
-
- AssemblyName originalAssembly = new AssemblyName(originalAssemblyName);
- AssemblyName newAssembly = new AssemblyName(newAssemblyName);
-
- // mscorlib will get loaded by the runtime regardless of its string casing or its public key token,
- // so setting the assembly name to mscorlib must always be protected by a demand
- if (string.Equals(newAssembly.Name, s_mscorlibAssemblySimpleName, StringComparison.OrdinalIgnoreCase) ||
- string.Equals(newAssembly.Name, s_mscorlibFileName, StringComparison.OrdinalIgnoreCase))
- {
- return false;
- }
-
- return Compare(originalAssembly.GetPublicKeyToken(), newAssembly.GetPublicKeyToken());
- }
-
public int MemberCount
{
get
@@ -467,7 +427,6 @@ namespace System.Runtime.Serialization
return m_data[index];
}
- [System.Runtime.InteropServices.ComVisible(true)]
private Object GetElementNoThrow(String name, out Type foundType)
{
int index = FindElement(name);
@@ -518,7 +477,6 @@ namespace System.Runtime.Serialization
return m_converter.Convert(value, type);
}
- [System.Runtime.InteropServices.ComVisible(true)]
internal Object GetValueNoThrow(String name, Type type)
{
Type foundType;
@@ -741,22 +699,5 @@ namespace System.Runtime.Serialization
return m_converter.ToString(value);
}
- internal string[] MemberNames
- {
- get
- {
- return m_members;
- }
-
- }
-
- internal object[] MemberValues
- {
- get
- {
- return m_data;
- }
- }
-
}
}