本文整理汇总了C#中IPlace类的典型用法代码示例。如果您正苦于以下问题:C# IPlace类的具体用法?C# IPlace怎么用?C# IPlace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPlace类属于命名空间,在下文中一共展示了IPlace类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmitAddFrame
public static void EmitAddFrame(ILEmitter/*!*/ il, IPlace/*!*/ scriptContextPlace, int typeArgCount, int argCount,
Action<ILEmitter, int> typeArgEmitter, Action<ILEmitter, int>/*!*/ argEmitter)
{
Debug.Assert(typeArgCount == 0 || typeArgEmitter != null);
// type args:
if (typeArgCount > 0)
{
scriptContextPlace.EmitLoad(il);
il.Emit(OpCodes.Ldfld, Fields.ScriptContext_Stack);
il.EmitOverloadedArgs(Types.DTypeDesc[0], typeArgCount, Methods.PhpStack.AddTypeFrame.ExplicitOverloads, typeArgEmitter);
}
// args:
scriptContextPlace.EmitLoad(il);
il.Emit(OpCodes.Ldfld, Fields.ScriptContext_Stack);
il.EmitOverloadedArgs(Types.Object[0], argCount, Methods.PhpStack.AddFrame.ExplicitOverloads, argEmitter);
il.Emit(OpCodes.Call, Methods.PhpStack.AddFrame.Overload(argCount));
// AddFrame adds empty type frame by default, so if there are no type parameters, we can skip AddTypeFrame call:
if (typeArgCount > 0)
il.Emit(OpCodes.Call, Methods.PhpStack.AddTypeFrame.Overload(typeArgCount));
}
示例2: AddArc
public IArc AddArc(IPlace place, ITransition transition)
{
IArc arc=new Arc(version++,place,transition);
this.arcs.Add(arc);
this.graph.AddEdge(arc);
return arc;
}
示例3: Arc
public Arc(int id,ITransition transition,IPlace place)
: base(id,transition,place)
{
this.place=place;
this.transition=transition;
this.isInputArc=false;
}
示例4: AddArc
public IArc AddArc(ITransition transition, IPlace place)
{
IArc arc = new Arc(this.version++, transition, place);
this.arcs.Add(arc);
this.graph.AddEdge(transition, place);
return arc;
}
示例5: ClrStubBuilder
public ClrStubBuilder(ILEmitter/*!*/ il, IPlace/*!*/ scriptContextPlace, int paramCount, int paramOffset)
{
this.il = il;
this.scriptContextPlace = scriptContextPlace;
this.paramOffset = paramOffset;
this.referenceLocals = new LocalBuilder[paramCount];
}
示例6: Arc
public Arc(int id, ITransition transition, IPlace place)
: base(id, transition, place)
{
this.annotation = new IdentityExpression();
this.place = place;
this.transition = transition;
this.isInputArc = false;
}
示例7: LegoStoragePlace
public LegoStoragePlace(IPlace placeInFront)
{
Above = LegoStoragePlace.None;
Underneath = LegoStoragePlace.None;
PlaceInFront = placeInFront;
Empty = true;
Container = null;
Level = 1;
}
示例8: Location
public Location(int x, int y, IPlace o)
{
X = x;
Y = y;
Block = o;
Visible = false;
Script = null;
symbol = Block.Symbol();
}
示例9: LinqBuilder
public LinqBuilder(CodeGenerator/*!*/ cg)
{
this.cg = cg;
IPlace this_place = new IndexedPlace(PlaceHolder.Argument, 0);
this.rtVariablesPlace = new Place(this_place, Fields.LinqContext_variables);
this.scriptContextPlace = new Place(this_place, Fields.LinqContext_context);
this.classContextPlace = new Place(this_place, Fields.LinqContext_typeHandle);
this.selfPlace = new Place(this_place, Fields.LinqContext_outerType);
}
示例10: EmitArgFullPostCall
public static void EmitArgFullPostCall(ILEmitter/*!*/ il, IPlace/*!*/ stack, LocalBuilder locArgsCount)
{
// args-aware:
if (locArgsCount != null)
{
// CALL stack.RemoveArgsAwareFrame(count);
stack.EmitLoad(il);
il.Ldloc(locArgsCount);
il.Emit(OpCodes.Call, Methods.PhpStack.RemoveArgsAwareFrame);
}
}
示例11: AddPlace
public void AddPlace(IPlace place)
{
if (place == null)
{
throw new ArgumentNullException("The place connot be null.");
}
if (this.CheckExistingElement(place.Name))
{
throw new AlreadyExistingElementException("This name already exists.");
}
this.places.Add(place);
}
示例12: Execute
public double Execute(ICar car, IPlace place, double journeyDuration)
{
ITrafficLight trafficLight = (ITrafficLight)place;
double timetaken = 0;
double waitingTime = trafficLight.GetWaitingTime(journeyDuration);
if (waitingTime > 0)
{
timetaken += car.Stop();
timetaken += waitingTime;
timetaken += car.Start();
}
return timetaken;
}
示例13: GetPresenter
public IPresenter GetPresenter(IPlace place)
{
if (place is Empty.EmptyPlace)
{
return new Empty.EmptyPresenter((Empty.EmptyPlace)place, services);
}
else if (place is Test.TestPlace)
{
return new Test.TestPresenter((Test.TestPlace)place, services);
}
else
{
throw new ArgumentException();
}
}
示例14: OK_Click
private void OK_Click(object sender, EventArgs e)
{
if (searchMode)
{
RunSearch();
}
else
{
if (resultsListbox.SelectedIndex > -1)
{
Result = (IPlace)resultsListbox.SelectedItem;
DialogResult = DialogResult.OK;
Close();
}
}
}
示例15: AddParts
public static void AddParts(string key, IPlace place)
{
key = key.ToLower();
autoCompleteList.Add(key, place);
var parts = key.Split(new[] { ' ' });
if (parts.Length > 1)
{
foreach (var part in parts)
{
if (!string.IsNullOrEmpty(part))
{
autoCompleteList.Add(part, place);
}
}
}
}