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.
5 using System.Collections.Generic;
7 namespace System.Reflection.TypeLoading
9 internal abstract partial class RoMethodBody : MethodBody
11 protected RoMethodBody()
15 public abstract override bool InitLocals { get; }
16 public abstract override int MaxStackSize { get; }
17 public abstract override int LocalSignatureMetadataToken { get; }
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;
24 public abstract override IList<LocalVariableInfo> LocalVariables { get; }
25 public abstract override IList<ExceptionHandlingClause> ExceptionHandlingClauses { get; }