• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IPlace类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IPlace的典型用法代码示例。如果您正苦于以下问题:C# IPlace类的具体用法?C# IPlace怎么用?C# IPlace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IPlace类属于命名空间,在下文中一共展示了IPlace类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: AddFigurePoint

        internal void AddFigurePoint(IPlace place)
        {
            TreeNode parent;
            var pnt = new Linepoint(place.RA * 15 - 180, place.Dec, PointType.Line, place.Name != Language.GetLocalizedText(90, "No Object") ? place.Name : null);
            if (figureTree.SelectedNode.Tag is Linepoint)
            {
                parent = figureTree.SelectedNode.Parent;

                var ls = (Lineset)parent.Tag;

                var lp = (Linepoint)figureTree.SelectedNode.Tag;

                var index = ls.Points.FindIndex(delegate(Linepoint target) { return target == lp; }) + 1;

                ls.Points.Insert(index, pnt);

                TreeNode child;
                if (index >= parent.Nodes.Count)
                {
                    child = parent.Nodes.Add(pnt.ToString());
                }
                else
                {
                    child = parent.Nodes.Insert(index, pnt.ToString());
                }
                child.Tag = pnt;
                child.Checked = pnt.PointType != PointType.Move;
                figureTree.SelectedNode = child;
                Earth3d.MainWindow.constellationsFigures.ResetConstellation(ls.Name);
            }
            else
            {
                parent = figureTree.SelectedNode;
                var ls = (Lineset)figureTree.SelectedNode.Tag;
                ls.Points.Add( pnt);
                var child = parent.Nodes.Add( pnt.ToString());
                child.Tag = pnt;
                child.Checked = pnt.PointType != PointType.Move;
                figureTree.SelectedNode = child;
                Earth3d.MainWindow.constellationsFigures.ResetConstellation(ls.Name);
            }
        }
开发者ID:bluephoton,项目名称:wwt-windows-client,代码行数:42,代码来源:ConstellationFigureEditor.cs


示例17: EmitArgFullPreCall

		public static void EmitArgFullPreCall(ILEmitter/*!*/ il, IPlace/*!*/ stack, bool argsAware,
		  int formalParamCount, int formalTypeParamCount, out LocalBuilder locArgsCount)
		{
			if (argsAware)
			{
				locArgsCount = il.DeclareLocal(typeof(int));

				// locArgsCount = stack.MakeArgsAware(<formal tpye param count | formal param count>);
				stack.EmitLoad(il);
				il.LdcI4((formalTypeParamCount << 16) | formalParamCount);
				il.Emit(OpCodes.Call, Methods.PhpStack.MakeArgsAware);
				il.Stloc(locArgsCount);
			}
			else
			{
				locArgsCount = null;

				// CALL stack.RemoveFrame();
				stack.EmitLoad(il);
				il.Emit(OpCodes.Call, Methods.PhpStack.RemoveFrame);
			}
		}
开发者ID:tiaohai,项目名称:Phalanger,代码行数:22,代码来源:PhpStackBuilder.cs


示例18: SelectDrivingStrategy

        private IDrivingStrategy SelectDrivingStrategy(IPlace place)
        {
            IDrivingStrategy drivingStrategy = null;

            if (place is IRoadStretch)
            {
                if (_roadDrivingStrategy == null)
                {
                    _roadDrivingStrategy = new RoadDrivingStrategy();
                }
                drivingStrategy = _roadDrivingStrategy;
            }
            else if (place is ITrafficLight)
            {
                if (_traficLightDrivingStrategy == null)
                {
                    _traficLightDrivingStrategy = new TrafficLightDrivingStrategy();
                }
                drivingStrategy = _traficLightDrivingStrategy;
            }

            return drivingStrategy;
        }
开发者ID:abhishek18383,项目名称:Code,代码行数:23,代码来源:Driver.cs


示例19: TweetObj

        public TweetObj(string text, string creatorName, string screenName, DateTime time, ICoordinates coords, IPlace place, List<IHashtagEntity> hashtags)
        {
            this.text = text;
            if (creatorName == ""){
                this.creatorName = " ";
            } else {
                this.creatorName = creatorName;
            }
            if (screenName == "")
            {
                this.screenName = " ";
            }
            else {
                this.screenName = screenName;
            }
            this.time = time;

            if (coords != null)
            {
                this.coords = coords;
            }
            else
            {
                this.coords = new Coordinates(0.0,0.0);
            }
            if (place != null) { 
                this.country = place.Country;
            } else{
                country = " ";
            }
            this.hashtags = new List<String>();
            for (int i= 0; i < hashtags.Count; i++)
            {
                this.hashtags.Add(hashtags[i].Text);
            }
        }
开发者ID:imjackyan,项目名称:TweetSpace,代码行数:36,代码来源:TweetObj.cs


示例20: LoadBoxed

		/// <summary>
		/// Loads a value from a specified place on the evaluation stack and boxes it if it is of a value type.
		/// </summary>
		/// <param name="place">The place where to load a value from.</param>
		public void LoadBoxed(IPlace/*!*/ place)
		{
			Type type = place.PlaceType;

			place.EmitLoad(this);
			if (type.IsValueType)
				il.Emit(OpCodes.Box, type);
		}
开发者ID:dw4dev,项目名称:Phalanger,代码行数:12,代码来源:ILEmitter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IPlatform类代码示例发布时间:2022-05-24
下一篇:
C# IPipelines类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap