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 namespace System.Runtime.CompilerServices
6 {
7     // Types used in Custom Modifier to specify calling conventions.
8     public class CallConvCdecl
9     {
10     }
11 
12     public class CallConvStdcall
13     {
14     }
15 
16     public class CallConvThiscall
17     {
18     }
19 
20     public class CallConvFastcall
21     {
22     }
23 
24     // Indicates that the modified instance is pinned in memory.
25     public static class IsPinned
26     {
27     }
28 
29     public static partial class IsBoxed
30     {
31     }
32 
33     public static partial class IsByValue
34     {
35     }
36 
37     public static partial class IsCopyConstructed
38     {
39     }
40 
41     public static partial class IsExplicitlyDereferenced
42     {
43     }
44 
45     public static partial class IsImplicitlyDereferenced
46     {
47     }
48 
49     public static partial class IsJitIntrinsic
50     {
51     }
52 
53     public static partial class IsLong
54     {
55     }
56 
57     public static partial class IsSignUnspecifiedByte
58     {
59     }
60 
61     public static partial class IsUdtReturn
62     {
63     }
64 
65     [Serializable]
66     [AttributeUsage(AttributeTargets.Struct)]
67     public sealed class HasCopySemanticsAttribute : Attribute
68     {
HasCopySemanticsAttribute()69         public HasCopySemanticsAttribute() { }
70     }
71 
72     [Serializable]
73     [AttributeUsage(AttributeTargets.Enum)]
74     public sealed class ScopelessEnumAttribute : Attribute
75     {
ScopelessEnumAttribute()76         public ScopelessEnumAttribute() { }
77     }
78 
79     [Serializable]
80     [AttributeUsage(AttributeTargets.Struct, Inherited = true)]
81     public sealed class NativeCppClassAttribute : Attribute
82     {
NativeCppClassAttribute()83         public NativeCppClassAttribute() { }
84     }
85 
86     [Serializable]
87     [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface,AllowMultiple=true, Inherited=false)]
88     public sealed class RequiredAttributeAttribute : Attribute
89     {
90         public RequiredAttributeAttribute(Type requiredContract) => RequiredContract = requiredContract;
91 
92         public Type RequiredContract { get; }
93     }
94 
95     // The CLR data marshaler has some behaviors that are incompatible with
96     // C++. Specifically, C++ treats boolean variables as byte size, whereas
97     // the marshaller treats them as 4-byte size.  Similarly, C++ treats
98     // wchar_t variables as 4-byte size, whereas the marshaller treats them
99     // as single byte size under certain conditions.  In order to work around
100     // such issues, the C++ compiler will emit a type that the marshaller will
101     // marshal using the correct sizes.  In addition, the compiler will place
102     // this modopt onto the variables to indicate that the specified type is
103     // not the true type.  Any compiler that needed to deal with similar
104     // marshalling incompatibilities could use this attribute as well.
105     //
106     // Indicates that the modified instance differs from its true type for
107     // correct marshalling.
108     public static class CompilerMarshalOverride
109     {
110     }
111 }
112