本文整理汇总了C#中System.ServiceModel.Dispatcher.Opcode.DetachFromParent方法的典型用法代码示例。如果您正苦于以下问题:C# Opcode.DetachFromParent方法的具体用法?C# Opcode.DetachFromParent怎么用?C# Opcode.DetachFromParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ServiceModel.Dispatcher.Opcode
的用法示例。
在下文中一共展示了Opcode.DetachFromParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
internal Opcode Add(object item, Opcode ops)
{
List<SubExpr> list = new List<SubExpr>();
this.removalMapping.Add(item, list);
while (ops.Next != null)
{
ops = ops.Next;
}
Opcode opcode = ops;
while (ops != null)
{
if (IsExprStarter(ops))
{
SubExprOpcode opcode4;
Opcode op = ops;
Opcode prev = ops.Prev;
ops.DetachFromParent();
ops = ops.Next;
while (ops.ID == OpcodeID.Select)
{
ops = ops.Next;
}
ops.DetachFromParent();
SubExpr expr = null;
for (int i = 0; i < this.exprList.Count; i++)
{
if (this.exprList[i].FirstOp.Equals(op))
{
expr = this.exprList[i];
break;
}
}
if (expr == null)
{
expr = new SubExpr(null, op, this.NewVarID());
this.exprList.Add(expr);
opcode4 = new SubExprOpcode(expr);
}
else
{
opcode4 = expr.Add(op, this);
}
opcode4.Expr.IncRef();
list.Add(opcode4.Expr);
opcode4.Attach(ops);
ops = opcode4;
if (prev != null)
{
prev.Attach(ops);
}
}
opcode = ops;
ops = ops.Prev;
}
return opcode;
}
示例2: 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;
}
示例3: Add
internal SubExprOpcode Add(Opcode opseq, SubExprEliminator elim)
{
Opcode start = this.FirstOp;
Opcode ops = opseq;
while (start != null && ops != null && start.Equals(ops))
{
start = start.Next;
ops = ops.Next;
}
if (ops == null)
{
if (start == null)
{
return new SubExprOpcode(this);
}
else
{
SubExpr e = this.BranchAt(start, elim);
return new SubExprOpcode(e);
}
}
else
{
if (start == null)
{
ops.DetachFromParent();
for (int i = 0; i < this.children.Count; ++i)
{
if (this.children[i].FirstOp.Equals(ops))
{
return this.children[i].Add(ops, elim);
}
}
SubExpr e = new SubExpr(this, ops, elim.NewVarID());
this.AddChild(e);
return new SubExprOpcode(e);
}
else
{
SubExpr e = this.BranchAt(start, elim);
ops.DetachFromParent();
SubExpr ee = new SubExpr(e, ops, elim.NewVarID());
e.AddChild(ee);
return new SubExprOpcode(ee);
}
}
}