diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs b/src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs index 5e7851bc57..82536ce3b4 100644 --- a/src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs +++ b/src/mscorlib/src/System/Runtime/Serialization/SerializationFieldInfo.cs @@ -21,11 +21,9 @@ namespace System.Runtime.Serialization { using System; using System.Reflection; using System.Globalization; + using System.Diagnostics; using System.Diagnostics.Contracts; using System.Threading; -#if FEATURE_REMOTING - using System.Runtime.Remoting.Metadata; -#endif //FEATURE_REMOTING internal sealed class SerializationFieldInfo : FieldInfo { @@ -38,8 +36,8 @@ namespace System.Runtime.Serialization { public override int MetadataToken { get { return m_field.MetadataToken; } } internal SerializationFieldInfo(RuntimeFieldInfo field, String namePrefix) { - Contract.Assert(field!=null, "[SerializationFieldInfo.ctor]field!=null"); - Contract.Assert(namePrefix!=null, "[SerializationFieldInfo.ctor]namePrefix!=null"); + Debug.Assert(field!=null, "[SerializationFieldInfo.ctor]field!=null"); + Debug.Assert(namePrefix!=null, "[SerializationFieldInfo.ctor]namePrefix!=null"); m_field = field; m_serializationName = String.Concat(namePrefix, FakeNameSeparatorString, m_field.Name); @@ -91,7 +89,6 @@ namespace System.Runtime.Serialization { return m_field.GetValue(obj); } - [System.Security.SecurityCritical] internal Object InternalGetValue(Object obj) { RtFieldInfo field = m_field as RtFieldInfo; if (field != null) @@ -107,7 +104,6 @@ namespace System.Runtime.Serialization { m_field.SetValue(obj, value, invokeAttr, binder, culture); } - [System.Security.SecurityCritical] internal void InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) { RtFieldInfo field = m_field as RtFieldInfo; if (field != null) @@ -136,31 +132,5 @@ namespace System.Runtime.Serialization { return m_field.Attributes; } } - -#if FEATURE_REMOTING - #region Legacy Remoting Cache - private RemotingFieldCachedData m_cachedData; - - internal RemotingFieldCachedData RemotingCache - { - get - { - // This grabs an internal copy of m_cachedData and uses - // that instead of looking at m_cachedData directly because - // the cache may get cleared asynchronously. This prevents - // us from having to take a lock. - RemotingFieldCachedData cache = m_cachedData; - if (cache == null) - { - cache = new RemotingFieldCachedData(this); - RemotingFieldCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null); - if (ret != null) - cache = ret; - } - return cache; - } - } - #endregion -#endif //FEATURE_REMOTING } } |