当前位置: 首页>>代码示例>>C#>>正文


C# IPlace类代码示例

本文整理汇总了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));
		}
开发者ID:tiaohai,项目名称:Phalanger,代码行数:26,代码来源:PhpStackBuilder.cs

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:7,代码来源:PetriNet.cs

示例3: Arc

 public Arc(int id,ITransition transition,IPlace place)
     : base(id,transition,place)
 {
     this.place=place;
     this.transition=transition;
     this.isInputArc=false;
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:7,代码来源:Arc.cs

示例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;
 }
开发者ID:NigelThorne,项目名称:ndependencyinjection,代码行数:7,代码来源:PetriNet.cs

示例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];
		}
开发者ID:dw4dev,项目名称:Phalanger,代码行数:8,代码来源:ClrStubBuilder.cs

示例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;
 }
开发者ID:NigelThorne,项目名称:ndependencyinjection,代码行数:8,代码来源:Arc.cs

示例7: LegoStoragePlace

 public LegoStoragePlace(IPlace placeInFront)
 {
     Above = LegoStoragePlace.None;
     Underneath = LegoStoragePlace.None;
     PlaceInFront = placeInFront;
     Empty = true;
     Container = null;
     Level = 1;
 }
开发者ID:ubuntuuser,项目名称:harboursim,代码行数:9,代码来源:LegoStoragePlace.cs

示例8: Location

 public Location(int x, int y, IPlace o)
 {
     X = x;
     Y = y;
     Block = o;
     Visible = false;
     Script = null;
     symbol = Block.Symbol();
 }
开发者ID:janoskaz,项目名称:game,代码行数:9,代码来源:Location.cs

示例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);
		}
开发者ID:jdluzen,项目名称:Phalanger,代码行数:11,代码来源:LinqBuilder.cs

示例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);
			}
		}
开发者ID:tiaohai,项目名称:Phalanger,代码行数:11,代码来源:PhpStackBuilder.cs

示例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);
        }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:13,代码来源:Database.cs

示例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;
 }
开发者ID:abhishek18383,项目名称:Code,代码行数:13,代码来源:TrafficLightDrivingStrategy.cs

示例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();
     }
 }
开发者ID:jdmclark,项目名称:nullunit,代码行数:15,代码来源:PresenterMapper.cs

示例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();
         }
     }
 }
开发者ID:ngonzalezromero,项目名称:wwt-windows-client,代码行数:16,代码来源:LocationSearch.cs

示例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);
             }
         }
     }
 }
开发者ID:bluephoton,项目名称:wwt-windows-client,代码行数:16,代码来源:Search.cs


注:本文中的IPlace类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。