scripts
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
/// <summary>Represents the runtime state of a dynamically generated method.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0200004B RID: 75
|
||||
public class ExecutionScope
|
||||
{
|
||||
// Token: 0x0600044D RID: 1101 RVA: 0x00014648 File Offset: 0x00012848
|
||||
private ExecutionScope(CompilationContext context, int compilation_unit)
|
||||
{
|
||||
this.context = context;
|
||||
this.compilation_unit = compilation_unit;
|
||||
this.Globals = context.GetGlobals();
|
||||
}
|
||||
|
||||
// Token: 0x0600044E RID: 1102 RVA: 0x00014678 File Offset: 0x00012878
|
||||
internal ExecutionScope(CompilationContext context)
|
||||
: this(context, 0)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600044F RID: 1103 RVA: 0x00014684 File Offset: 0x00012884
|
||||
internal ExecutionScope(CompilationContext context, int compilation_unit, ExecutionScope parent, object[] locals)
|
||||
: this(context, compilation_unit)
|
||||
{
|
||||
this.Parent = parent;
|
||||
this.Locals = locals;
|
||||
}
|
||||
|
||||
/// <summary>Creates a delegate that can be used to execute a dynamically generated method.</summary>
|
||||
/// <returns>A <see cref="T:System.Delegate" /> that can execute a dynamically generated method.</returns>
|
||||
/// <param name="indexLambda">The index of the object that stores information about associated lambda expression of the dynamic method.</param>
|
||||
/// <param name="locals">An array that contains the hoisted local variables from the parent context.</param>
|
||||
// Token: 0x06000450 RID: 1104 RVA: 0x000146A0 File Offset: 0x000128A0
|
||||
public Delegate CreateDelegate(int indexLambda, object[] locals)
|
||||
{
|
||||
return this.context.CreateDelegate(indexLambda, new ExecutionScope(this.context, indexLambda, this, locals));
|
||||
}
|
||||
|
||||
/// <summary>Creates an array to store the hoisted local variables.</summary>
|
||||
/// <returns>An array to store hoisted local variables.</returns>
|
||||
// Token: 0x06000451 RID: 1105 RVA: 0x000146BC File Offset: 0x000128BC
|
||||
public object[] CreateHoistedLocals()
|
||||
{
|
||||
return this.context.CreateHoistedLocals(this.compilation_unit);
|
||||
}
|
||||
|
||||
/// <summary>Frees a specified expression tree of external parameter references by replacing the parameter with its current value.</summary>
|
||||
/// <returns>An expression tree that does not contain external parameter references.</returns>
|
||||
/// <param name="expression">An expression tree to free of external parameter references.</param>
|
||||
/// <param name="locals">An array that contains the hoisted local variables.</param>
|
||||
// Token: 0x06000452 RID: 1106 RVA: 0x000146D0 File Offset: 0x000128D0
|
||||
public Expression IsolateExpression(Expression expression, object[] locals)
|
||||
{
|
||||
return this.context.IsolateExpression(this, locals, expression);
|
||||
}
|
||||
|
||||
/// <summary>Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method.</summary>
|
||||
// Token: 0x040000FD RID: 253
|
||||
public object[] Globals;
|
||||
|
||||
/// <summary>Represents the hoisted local variables from the parent context.</summary>
|
||||
// Token: 0x040000FE RID: 254
|
||||
public object[] Locals;
|
||||
|
||||
/// <summary>Represents the execution scope of the calling delegate.</summary>
|
||||
// Token: 0x040000FF RID: 255
|
||||
public ExecutionScope Parent;
|
||||
|
||||
// Token: 0x04000100 RID: 256
|
||||
internal CompilationContext context;
|
||||
|
||||
// Token: 0x04000101 RID: 257
|
||||
internal int compilation_unit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
/// <summary>Indicates that a method is an extension method, or that a class or assembly contains extension methods.</summary>
|
||||
// Token: 0x02000002 RID: 2
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
|
||||
public sealed class ExtensionAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
/// <summary>Defines a property for accessing the value that an object references.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0200004C RID: 76
|
||||
public interface IStrongBox
|
||||
{
|
||||
/// <summary>Gets or sets the value that an object references.</summary>
|
||||
/// <returns>The value that the object references.</returns>
|
||||
// Token: 0x17000046 RID: 70
|
||||
// (get) Token: 0x06000453 RID: 1107
|
||||
// (set) Token: 0x06000454 RID: 1108
|
||||
object Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
/// <summary>Holds a reference to a value.</summary>
|
||||
/// <typeparam name="T">The type of the value that the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> references.</typeparam>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0200004D RID: 77
|
||||
public class StrongBox<T> : IStrongBox
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> class by using the supplied value. </summary>
|
||||
/// <param name="value">A value that the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> will reference.</param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000455 RID: 1109 RVA: 0x000146E0 File Offset: 0x000128E0
|
||||
public StrongBox(T value)
|
||||
{
|
||||
this.Value = value;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value that the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> references.</summary>
|
||||
/// <returns>The value that the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> references.</returns>
|
||||
// Token: 0x17000047 RID: 71
|
||||
// (get) Token: 0x06000456 RID: 1110 RVA: 0x000146F0 File Offset: 0x000128F0
|
||||
// (set) Token: 0x06000457 RID: 1111 RVA: 0x00014700 File Offset: 0x00012900
|
||||
object IStrongBox.Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.Value = (T)((object)value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Represents the value that the <see cref="T:System.Runtime.CompilerServices.StrongBox`1" /> references.</summary>
|
||||
// Token: 0x04000102 RID: 258
|
||||
public T Value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user