本文整理汇总了C#中System.Reflection.Emit.Label.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Label.GetHashCode方法的具体用法?C# Label.GetHashCode怎么用?C# Label.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.Emit.Label
的用法示例。
在下文中一共展示了Label.GetHashCode方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarkLabel
public DynamicMethodBody MarkLabel(Label label)
{
#if DEBUG
Console.WriteLine("IL_{0}:", label.GetHashCode());
#endif
Emitter.MarkLabel(label);
return this;
}
示例2: PosTest1
public void PosTest1()
{
Label label1 = new Label();
Label label2 = new Label();
int la1hash = label1.GetHashCode();
int la2hash = label2.GetHashCode();
Assert.Equal(la1hash, 0);
Assert.Equal(la1hash, la2hash);
}
示例3: Emit
public DynamicMethodBody Emit(OpCode opcode, Label arg)
{
ExecutePreEmitActions();
#if DEBUG
Console.WriteLine("\t{0} IL_{1}", opcode, arg.GetHashCode());
#endif
Emitter.Emit(opcode, arg);
return this;
}
示例4: Bge
internal void Bge(Label label)
{
if (codeGenTrace != CodeGenTrace.None)
EmitSourceInstruction("Bge " + label.GetHashCode());
ilGen.Emit(OpCodes.Bge, label);
}
示例5: Brtrue
internal void Brtrue(Label label)
{
if (_codeGenTrace != CodeGenTrace.None)
EmitSourceInstruction("Brtrue " + label.GetHashCode());
_ilGen.Emit(OpCodes.Brtrue, label);
}
示例6: MarkLabel
internal void MarkLabel(Label label)
{
_ilGen.MarkLabel(label);
if (_codeGenTrace != CodeGenTrace.None)
EmitSourceLabel(label.GetHashCode() + ":");
}
示例7: Emit
private void Emit(OpCode opCode, Label label)
{
il.Emit(opCode, label);
stringBuilder.AppendLine(FormatOpCode(opCode) + " " + label.GetHashCode());
}
示例8: MarkLabel
public void MarkLabel(Label label)
{
il.MarkLabel(label);
stringBuilder.AppendLine("label " + label.GetHashCode());
}
示例9: Brfalse
internal void Brfalse(Label label)
{
if (this.codeGenTrace != CodeGenTrace.None)
{
this.EmitSourceInstruction("Brfalse " + label.GetHashCode());
}
this.ilGen.Emit(OpCodes.Brfalse, label);
}
示例10: MarkLabel
internal void MarkLabel(Label label)
{
this.ilGen.MarkLabel(label);
if (this.codeGenTrace != CodeGenTrace.None)
{
this.EmitSourceLabel(label.GetHashCode() + ":");
}
}
示例11: FormatLabel
public static string FormatLabel(Label label) => $"#{label.GetHashCode()}";