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 //
8 
9 /*============================================================
10 **
11 **
12 **
13 ** Object is the class used for generating shared generics
14 **
15 **
16 ===========================================================*/
17 
18 using System.Runtime.InteropServices;
19 
20 namespace System
21 {
22     // CONTRACT with Compiler
23     // The __Canon type is one of the primitives understood by the compilers. This type
24     // must never be explicitly used by code.
25     [CLSCompliant(false)]
26     [System.Runtime.CompilerServices.DependencyReductionRoot]
27     public class __Canon
28     {
29     }
30 
31     // CONTRACT with Compiler
32     // The __UniversalCanon type is one of the primitives understood by the compilers. This type
33     // must never be explicitly used by code.
34     [CLSCompliant(false)]
35     public struct __UniversalCanon
36     {
37     }
38 
39     // CONTRACT with Compiler
40     // The __CanonAlike type is one of the primitives understood by the compilers. This type
41     // must never be explicitly used by code.
42     // TODO: Delete this type once normal __Canon templates are supported
43     [CLSCompliant(false)]
44     [System.Runtime.CompilerServices.DependencyReductionRoot]
45     public class __CanonAlike
46     {
47     }
48 
49     // CONTRACT with Compiler
50     // The __Boxed type is one of the primitives understood by the compilers. This type
51     // must never be explicitly used by code. It is used to simulate the shape of boxed types
52     [System.Runtime.CompilerServices.DependencyReductionRoot]
53     [System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)]
54     internal class __Boxed<T> where T : struct
55     {
56         [System.Runtime.CompilerServices.DependencyReductionRoot]
__Boxed()57         private __Boxed()
58         {
59             BoxedValue = default(T);
60         }
61 
62         [FieldOffset(0)]
63         private T BoxedValue;
64     }
65 }
66