1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | /*============================================================ |
6 | ** |
7 | ** Header: WeakReferenceNative.h |
8 | ** |
9 | ** |
10 | ===========================================================*/ |
11 | |
12 | #ifndef _WEAKREFERENCENATIVE_H |
13 | #define _WEAKREFERENCENATIVE_H |
14 | |
15 | // |
16 | // The implementations of WeakReferenceNative and WeakReferenceOfTNative are identical, but the managed signatures |
17 | // are different. WeakReferenceOfTNative has strongly typed signatures. It is necessary for correct security transparancy |
18 | // annotations without compromising inlining (security critical code cannot be inlined into security neutral code). |
19 | // |
20 | |
21 | class WeakReferenceNative |
22 | { |
23 | public: |
24 | static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection); |
25 | static FCDECL1(void, Finalize, WeakReferenceObject * pThis); |
26 | static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis); |
27 | static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget); |
28 | static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis); |
29 | static FCDECL1(FC_BOOL_RET, IsAlive, WeakReferenceObject * pThis); |
30 | }; |
31 | |
32 | class WeakReferenceOfTNative |
33 | { |
34 | public: |
35 | static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection); |
36 | static FCDECL1(void, Finalize, WeakReferenceObject * pThis); |
37 | static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis); |
38 | static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget); |
39 | static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis); |
40 | }; |
41 | |
42 | #endif // _WEAKREFERENCENATIVE_H |
43 | |