44b42671181c0b881bc68457295bb5c8dab80ff5
[platform/upstream/dotnet/runtime.git] /
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 using System.Collections.Generic;
6
7 namespace System.Reflection.TypeLoading
8 {
9     //
10     // These sentinel instances are used only for lazy-evaluation latches when "null" is a valid value for that property.
11     //
12     internal static class Sentinels
13     {
14         public static readonly RoType RoType = new SentinelType();
15         public static readonly RoMethod RoMethod = new SentinelMethod();
16
17         private sealed class SentinelType : RoStubType
18         {
19             internal SentinelType() : base() { }
20         }
21
22         private sealed class SentinelAssembly : RoStubAssembly
23         {
24             internal SentinelAssembly() : base() { }
25         }
26
27         private sealed class SentinelMethod : RoMethod
28         {
29             internal SentinelMethod() : base(Sentinels.RoType) { }
30             internal sealed override RoType GetRoDeclaringType() => throw null;
31             internal sealed override RoModule GetRoModule() => throw null;
32             public sealed override int MetadataToken => throw null;
33             public sealed override IEnumerable<CustomAttributeData> CustomAttributes => throw null;
34             public sealed override bool IsConstructedGenericMethod => throw null;
35             public sealed override bool IsGenericMethodDefinition => throw null;
36             public sealed override bool Equals(object obj) => throw null;
37             public sealed override MethodInfo GetGenericMethodDefinition() => throw null;
38             public sealed override int GetHashCode() => throw null;
39             public sealed override MethodBody GetMethodBody() => throw null;
40             public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw null;
41             protected sealed override MethodAttributes ComputeAttributes() => throw null;
42             protected sealed override CallingConventions ComputeCallingConvention() => throw null;
43             protected sealed override RoType[] ComputeGenericArgumentsOrParameters() => throw null;
44             protected sealed override MethodImplAttributes ComputeMethodImplementationFlags() => throw null;
45             protected sealed override MethodSig<RoParameter> ComputeMethodSig() => throw null;
46             protected sealed override MethodSig<RoType> ComputeCustomModifiers() => throw null;
47             protected sealed override MethodSig<string> ComputeMethodSigStrings() => throw null;
48             protected sealed override string ComputeName() => throw null;
49             internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => throw null;
50             internal sealed override RoType[] GetGenericTypeParametersNoCopy() => throw null;
51             public sealed override TypeContext TypeContext => throw null;
52         }
53     }
54 }