You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
41 lines
1.4 KiB
5 years ago
|
#if NET20 || NET30 || NET35 || !NET_4_6
|
||
|
|
||
|
// Copyright (c) Microsoft. All rights reserved.
|
||
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||
|
|
||
|
using System.ComponentModel;
|
||
|
using System.Diagnostics;
|
||
|
|
||
|
namespace System.Runtime.CompilerServices
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
|
||
|
/// Represents the runtime state of a dynamically generated method.
|
||
|
/// </summary>
|
||
|
[EditorBrowsable(EditorBrowsableState.Never), DebuggerStepThrough]
|
||
|
public sealed class Closure
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method.
|
||
|
/// </summary>
|
||
|
public readonly object[] Constants;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Represents the hoisted local variables from the parent context.
|
||
|
/// </summary>
|
||
|
public readonly object[] Locals;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Creates an object to hold state of a dynamically generated method.
|
||
|
/// </summary>
|
||
|
/// <param name="constants">The constant values used by the method.</param>
|
||
|
/// <param name="locals">The hoisted local variables from the parent context.</param>
|
||
|
public Closure(object[] constants, object[] locals)
|
||
|
{
|
||
|
Constants = constants;
|
||
|
Locals = locals;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif
|