本文整理汇总了C#中System.ServiceModel.Dispatcher.Opcode类的典型用法代码示例。如果您正苦于以下问题:C# Opcode类的具体用法?C# Opcode怎么用?C# Opcode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Opcode类属于System.ServiceModel.Dispatcher命名空间,在下文中一共展示了Opcode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveJump
internal void RemoveJump(BlockEndOpcode jumpTo)
{
bool flag = base.IsReachableFromConditional();
if (flag)
{
base.prev.DelinkFromConditional(this);
}
if (this.jump.ID == OpcodeID.Branch)
{
BranchOpcode jump = (BranchOpcode) this.jump;
jumpTo.DeLinkJump(this);
jump.RemoveChild(jumpTo);
if (jump.Branches.Count == 0)
{
this.jump = null;
}
}
else
{
jumpTo.DeLinkJump(this);
this.jump = null;
}
if (flag && (this.jump != null))
{
base.prev.LinkToConditional(this);
}
}
示例2: Add
internal override void Add(Opcode opcode)
{
LiteralRelationOpcode opcode2 = this.ValidateOpcode(opcode);
if (opcode2 == null)
{
base.Add(opcode);
}
else
{
QueryBranch literalBranch = this.branchIndex[opcode2.Literal];
if (literalBranch == null)
{
this.nextID++;
literalBranch = new QueryBranch(opcode2, this.nextID);
opcode2.Prev = this;
this.branchIndex[opcode2.Literal] = literalBranch;
}
else
{
literalBranch.Branch.Next.Add(opcode2.Next);
}
opcode2.Flags |= OpcodeFlags.InConditional;
this.AddAlwaysBranch(literalBranch, opcode2.Next);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:QueryConditionalBranchOpcode.cs
示例3: AddAlwaysBranch
private void AddAlwaysBranch(QueryBranch literalBranch, Opcode next)
{
if (OpcodeID.Branch == next.ID)
{
BranchOpcode opcode = (BranchOpcode) next;
OpcodeList branches = opcode.Branches;
for (int i = 0; i < branches.Count; i++)
{
Opcode opcode2 = branches[i];
if (this.IsAlwaysBranch(opcode2))
{
this.AlwaysBranches.AddInOrder(new QueryBranch(opcode2, literalBranch.ID));
}
else
{
opcode2.Flags |= OpcodeFlags.NoContextCopy;
}
}
}
else if (this.IsAlwaysBranch(next))
{
this.AlwaysBranches.AddInOrder(new QueryBranch(next, literalBranch.ID));
}
else
{
next.Flags |= OpcodeFlags.NoContextCopy;
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:QueryConditionalBranchOpcode.cs
示例4: DelinkFromConditional
internal override void DelinkFromConditional(Opcode child)
{
if (base.prev != null)
{
base.prev.DelinkFromConditional(child);
}
}
示例5: AddJump
internal void AddJump(BlockEndOpcode jumpTo)
{
bool flag = base.IsReachableFromConditional();
if (flag)
{
base.prev.DelinkFromConditional(this);
}
if (this.jump == null)
{
this.jump = jumpTo;
}
else
{
BranchOpcode jump;
if (this.jump.ID == OpcodeID.Branch)
{
jump = (BranchOpcode) this.jump;
}
else
{
BlockEndOpcode opcode = (BlockEndOpcode) this.jump;
jump = new BranchOpcode();
jump.Branches.Add(opcode);
this.jump = jump;
}
jump.Branches.Add(jumpTo);
}
jumpTo.LinkJump(this);
if (flag && (this.jump != null))
{
base.prev.LinkToConditional(this);
}
}
示例6: DelinkFromConditional
internal virtual void DelinkFromConditional(Opcode child)
{
if (this.TestFlag(OpcodeFlags.InConditional))
{
((QueryConditionalBranchOpcode) this.prev).RemoveAlwaysBranch(child);
}
}
示例7: BranchAt
private SubExpr BranchAt(Opcode op, SubExprEliminator elim)
{
Opcode firstOp = this.FirstOp;
if (this.parent != null)
{
this.parent.RemoveChild(this);
}
else
{
elim.Exprs.Remove(this);
}
firstOp.DetachFromParent();
op.DetachFromParent();
SubExpr expr = new SubExpr(this.parent, firstOp, elim.NewVarID());
if (this.parent != null)
{
this.parent.AddChild(expr);
}
else
{
elim.Exprs.Add(expr);
}
expr.AddChild(this);
this.parent = expr;
this.ops = new InternalSubExprOpcode(expr);
this.ops.Attach(op);
return expr;
}
示例8: Equals
internal override bool Equals(Opcode op)
{
if (base.Equals(op))
{
return (this.op == ((RelationOpcode)op).op);
}
return false;
}
示例9: Equals
internal override bool Equals(Opcode op)
{
if (base.Equals(op))
{
NumberEqualsOpcode opcode = (NumberEqualsOpcode) op;
return (opcode.literal == this.literal);
}
return false;
}
示例10: Equals
internal override bool Equals(Opcode opcode)
{
if (!base.Equals(opcode))
{
return false;
}
NumberRelationOpcode opcode2 = (NumberRelationOpcode) opcode;
return ((opcode2.op == this.op) && (opcode2.literal == this.literal));
}
示例11: Equals
// Never used for inverse query, so don't need this
internal override bool Equals(Opcode op)
{
if (base.Equals (op))
{
return (this.ordinal == ((LiteralOrdinalOpcode) op).ordinal);
}
return false;
}
示例12: AddBranch
internal override void AddBranch(Opcode opcode)
{
this.branches.Add(opcode);
opcode.Prev = this;
if (this.IsInConditional())
{
this.LinkToConditional(opcode);
}
}
示例13: Equals
internal override bool Equals(Opcode op)
{
if (base.Equals(op))
{
StringPrefixOpcode opcode = (StringPrefixOpcode) op;
return (opcode.literal == this.literal);
}
return false;
}
示例14: Equals
internal override bool Equals(Opcode op)
{
if (base.Equals(op))
{
return (this.mathOp == ((MathOpcode) op).mathOp);
}
return false;
}
示例15: ValidateOpcode
internal override LiteralRelationOpcode ValidateOpcode(Opcode opcode)
{
StringEqualsOpcode opcode2 = opcode as StringEqualsOpcode;
if (opcode2 != null)
{
return opcode2;
}
return null;
}