本文整理汇总了C#中System.Linq.Expressions.Compiler.LambdaCompiler.GetNamedLocal方法的典型用法代码示例。如果您正苦于以下问题:C# LambdaCompiler.GetNamedLocal方法的具体用法?C# LambdaCompiler.GetNamedLocal怎么用?C# LambdaCompiler.GetNamedLocal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Linq.Expressions.Compiler.LambdaCompiler
的用法示例。
在下文中一共展示了LambdaCompiler.GetNamedLocal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LocalStorage
internal LocalStorage(LambdaCompiler compiler, ParameterExpression v)
: base(compiler, v) {
// ByRef variables are supported. This is used internally by
// the compiler when emitting an inlined lambda invoke, to
// handle ByRef parameters. BlockExpression prevents this
// from being exposed to user created trees.
_local = compiler.GetNamedLocal(v.IsByRef ? v.Type.MakeByRefType() : v.Type, v.Name);
}
示例2: LocalStorage
internal LocalStorage(LambdaCompiler compiler, ParameterExpression variable) : base(compiler, variable)
{
this._local = compiler.GetNamedLocal(variable.IsByRef ? variable.Type.MakeByRefType() : variable.Type, variable);
}
示例3: LocalBoxStorage
internal LocalBoxStorage(LambdaCompiler compiler, ParameterExpression variable) : base(compiler, variable)
{
this._boxType = typeof(StrongBox<>).MakeGenericType(new Type[] { variable.Type });
this._boxValueField = this._boxType.GetField("Value");
this._boxLocal = compiler.GetNamedLocal(this._boxType, variable);
}
示例4: LocalStorage
internal LocalStorage(LambdaCompiler compiler, ParameterExpression variable)
: base(compiler, variable) {
_local = compiler.GetNamedLocal(variable.Type, variable.Name);
}