summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs')
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs b/src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs
index 5b36e0e372..aaaffc0df6 100644
--- a/src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs
@@ -11,6 +11,7 @@ namespace System.Reflection.Emit
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
+ using System.Diagnostics;
using System.Diagnostics.Contracts;
internal sealed class MethodOnTypeBuilderInstantiation : MethodInfo
@@ -30,7 +31,7 @@ namespace System.Reflection.Emit
#region Constructor
internal MethodOnTypeBuilderInstantiation(MethodInfo method, TypeBuilderInstantiation type)
{
- Contract.Assert(method is MethodBuilder || method is RuntimeMethodInfo);
+ Debug.Assert(method is MethodBuilder || method is RuntimeMethodInfo);
m_method = method;
m_type = type;
@@ -60,7 +61,7 @@ namespace System.Reflection.Emit
return mb.MetadataTokenInternal;
else
{
- Contract.Assert(m_method is RuntimeMethodInfo);
+ Debug.Assert(m_method is RuntimeMethodInfo);
return m_method.MetadataToken;
}
}
@@ -122,7 +123,7 @@ namespace System.Reflection.Emit
#region Constructor
internal ConstructorOnTypeBuilderInstantiation(ConstructorInfo constructor, TypeBuilderInstantiation type)
{
- Contract.Assert(constructor is ConstructorBuilder || constructor is RuntimeConstructorInfo);
+ Debug.Assert(constructor is ConstructorBuilder || constructor is RuntimeConstructorInfo);
m_ctor = constructor;
m_type = type;
@@ -157,7 +158,7 @@ namespace System.Reflection.Emit
return cb.MetadataTokenInternal;
else
{
- Contract.Assert(m_ctor is RuntimeConstructorInfo);
+ Debug.Assert(m_ctor is RuntimeConstructorInfo);
return m_ctor.MetadataToken;
}
}
@@ -231,7 +232,7 @@ namespace System.Reflection.Emit
#region Constructor
internal FieldOnTypeBuilderInstantiation(FieldInfo field, TypeBuilderInstantiation type)
{
- Contract.Assert(field is FieldBuilder || field is RuntimeFieldInfo);
+ Debug.Assert(field is FieldBuilder || field is RuntimeFieldInfo);
m_field = field;
m_type = type;
@@ -258,7 +259,7 @@ namespace System.Reflection.Emit
return fb.MetadataTokenInternal;
else
{
- Contract.Assert(m_field is RuntimeFieldInfo);
+ Debug.Assert(m_field is RuntimeFieldInfo);
return m_field.MetadataToken;
}
}