return __reftype(value).TypeHandle;
}
- // This may cause the type to be changed.
- [CLSCompliant(false)]
- public static unsafe void SetTypedReference(TypedReference target, object? value)
+ public static void SetTypedReference(TypedReference target, object? value)
{
- InternalSetTypedReference(&target, value);
+ throw new NotSupportedException();
}
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal static extern unsafe void InternalSetTypedReference(void* target, object? value);
}
}
FCFuncStart(gTypedReferenceFuncs)
FCFuncElement("InternalToObject", ReflectionInvocation::TypedReferenceToObject)
- FCFuncElement("InternalSetTypedReference", ReflectionInvocation::SetTypedReference)
FCFuncElement("InternalMakeTypedReference", ReflectionInvocation::MakeTypedReference)
FCFuncEnd()
}
FCIMPLEND
-FCIMPL2(void, ReflectionInvocation::SetTypedReference, TypedByRef * target, Object* objUNSAFE) {
- FCALL_CONTRACT;
-
- // <TODO>@TODO: We fixed serious bugs in this method very late in the endgame
- // for V1 RTM. So it was decided to disable this API (nobody would seem to
- // be using it anyway). If this API is enabled again, the implementation should
- // be similar to COMArrayInfo::SetValue.
- // </TODO>
- HELPER_METHOD_FRAME_BEGIN_0();
- COMPlusThrow(kNotSupportedException);
- HELPER_METHOD_FRAME_END();
-}
-FCIMPLEND
-
-
// This is an internal helper function to TypedReference class.
// It extracts the object from the typed reference.
FCIMPL1(Object*, ReflectionInvocation::TypedReferenceToObject, TypedByRef * value) {
// TypedReference functions, should go somewhere else
static FCDECL4(void, MakeTypedReference, TypedByRef * value, Object* targetUNSAFE, ArrayBase* fldsUNSAFE, ReflectClassBaseObject *pFieldType);
- static FCDECL2(void, SetTypedReference, TypedByRef * target, Object* objUNSAFE);
static FCDECL1(Object*, TypedReferenceToObject, TypedByRef * value);
#ifdef FEATURE_COMINTEROP