1cce665bd234b354cf4027db3cd73aa5e1a5d71c
[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     internal abstract partial class RoMethodBody : MethodBody
10     {
11         protected RoMethodBody()
12         {
13         }
14
15         public abstract override bool InitLocals { get; }
16         public abstract override int MaxStackSize { get; }
17         public abstract override int LocalSignatureMetadataToken { get; }
18
19         // Unlike most apis, this one does not copy the byte array.
20         public sealed override byte[] GetILAsByteArray() => _lazyIL ?? (_lazyIL = ComputeIL());
21         protected abstract byte[] ComputeIL();
22         private volatile byte[] _lazyIL;
23
24         public abstract override IList<LocalVariableInfo> LocalVariables { get; }
25         public abstract override IList<ExceptionHandlingClause> ExceptionHandlingClauses { get; }
26     }
27 }