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

C# Production类代码示例

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

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



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

示例1: Add

 public void Add()
 {
     Nonterminal nt = new Nonterminal();
     Production p = new Production();
     nt.Add(p);
     Assert.IsTrue(nt.Contains(p));
 }
开发者ID:ArsenShnurkov,项目名称:earley,代码行数:7,代码来源:TestNonterminal.cs


示例2: UpdateDisplay

        public void UpdateDisplay(ProductionShift shift, Production production, IEnumerable<ProductionStop> allStops)
        {
            productionStart = production.ProductionStart.ToString("g", System.Globalization.CultureInfo.CurrentUICulture);
            productionShiftStartDate = shift.ProductionStart.ToShortDateString();
            ClearDisplay();

            ClearChart(chartShift);
            ClearChart(chartProduction);
            if (production == null ||
                shift == null)
                return;

            team = shift.Team.Name;

            DisplayOrder(production.Order);
            DisplayProduct(production.Product);
            DisplayProductionStart(shift.ProductionStart, production.ProductionStart);
            DisplayProductionTime(shift.Duration, production.Duration);
            DisplayProducedItems(shift.ProducedItems, production.ProducedItems, production.ProducedItemsPerHour);
            DisplayDiscardedItems(shift.DiscardedItems, production.DiscardedItems);
            DisplayFactors(new FactorCalculator(shift), new FactorCalculator(production));

            DisplayStopRegistrationsOnChart(chartShift, shift.ProductionStopRegistrations, allStops, production.ValidatedStartTime);
            DisplayStopRegistrationsOnChart(chartProduction, production.ProductionStopRegistrations, allStops, production.ValidatedStartTime);
        }
开发者ID:mikkela,项目名称:oee,代码行数:25,代码来源:OEEDisplayControl.cs


示例3: InternalGenerate

		/// <summary>
		/// </summary>
		/// <param name="targetclasses"></param>
		/// <returns></returns>
		protected override IEnumerable<Production> InternalGenerate(IBSharpClass[] targetclasses){
			var genfactory = new Production{
				FileName = "Adapters/Model.cs",
				GetContent = () => new BaseModelWriter(Model).ToString()
			};
			yield return genfactory;
		}
开发者ID:Qorpent,项目名称:qorpent.sys,代码行数:11,代码来源:GenerateModel.cs


示例4: PrecedenceBasedParserAction

 public PrecedenceBasedParserAction(BnfTerm shiftTerm, ParserState newShiftState, Production reduceProduction)
 {
     _reduceAction = new ReduceParserAction(reduceProduction);
     var reduceEntry = new ConditionalEntry(CheckMustReduce, _reduceAction, "(Precedence comparison)");
     ConditionalEntries.Add(reduceEntry);
     DefaultAction = _shiftAction = new ShiftParserAction(shiftTerm, newShiftState);
 }
开发者ID:HyperSharp,项目名称:Hyperspace.DotLua,代码行数:7,代码来源:PrecedenceBasedParserAction.cs


示例5: IntermediateNode

		internal IntermediateNode(Item item, int startPosition, int endPosition) : base(startPosition, endPosition) {
			Item = item;

			// these two are used just for figuring out equality
			_production = item.Production;
			_currentPosition = item.CurrentPosition;
		}
开发者ID:ellisonch,项目名称:CFGLib,代码行数:7,代码来源:IntermediateNode.cs


示例6: Child

 /**
  * <summary>Called when adding a child to a parse tree
  * node.</summary>
  *
  * <param name='node'>the parent node</param>
  * <param name='child'>the child node, or null</param>
  *
  * <exception cref='ParseException'>if the node analysis
  * discovered errors</exception>
  */
 public override void Child(Production node, Node child)
 {
     switch (node.Id) {
     case (int) LogicalConstants.FORMULE:
         ChildFormule(node, child);
         break;
     case (int) LogicalConstants.FORMULE_PRED:
         ChildFormulePred(node, child);
         break;
     case (int) LogicalConstants.FORMULE_BIN:
         ChildFormuleBin(node, child);
         break;
     case (int) LogicalConstants.ATOM:
         ChildAtom(node, child);
         break;
     case (int) LogicalConstants.PREDICAT:
         ChildPredicat(node, child);
         break;
     case (int) LogicalConstants.PRED1:
         ChildPred1(node, child);
         break;
     case (int) LogicalConstants.PRED2:
         ChildPred2(node, child);
         break;
     case (int) LogicalConstants.PRED3:
         ChildPred3(node, child);
         break;
     }
 }
开发者ID:sandra-laduranti,项目名称:psar,代码行数:39,代码来源:LogicalAnalyzer.cs


示例7: Item

        private Item(Production production, int index, State parent, Item prevItem)
        {
            if (production == null || parent == null)
            {
                throw new ArgumentNullException();
            }

            if (index < 0 || index > production.Symbols.Count)
            {
                throw new ArgumentOutOfRangeException();
            }

            if (index == 0 && prevItem != null)
            {
                throw new ArgumentException();
            }

            if (index > 0 && prevItem == null)
            {
                throw new ArgumentNullException();
            }

            this.production = production;
            this.index = index;
            this.parent = parent;
            this.prevItem = prevItem;
            this.derivations = index == 0 ? null : new List<object>();
        }
开发者ID:ArsenShnurkov,项目名称:earley,代码行数:28,代码来源:Item.cs


示例8: Create

 public void Create()
 {
     Production p1 = new Production();
     Production p2 = new Production();
     Nonterminal nt = new Nonterminal(p1, p2);
     Assert.AreEqual(2, nt.Count);
     Assert.IsTrue(nt.Contains(p1) && nt.Contains(p2));
 }
开发者ID:ArsenShnurkov,项目名称:earley,代码行数:8,代码来源:TestNonterminal.cs


示例9: Grammar

 public Grammar(
     Production   startProduction,
     Production[] productionList,
     Token[]      tokenList)
 {
     _startProduction = startProduction;
     _productionList = productionList;
     _tokenList = tokenList;
 }
开发者ID:adamedx,项目名称:shango,代码行数:9,代码来源:Grammar.cs


示例10: TransitionAction

 public TransitionAction(ParserAction action, Production reduceByProduction)
     : this(action)
 {
     if (action != ParserAction.Reduce)
         throw new Exception("Can only define the production to reduce by for the reduce action.");
     if (reduceByProduction == null)
         throw new ArgumentNullException("reduceByProduction");
     ReduceByProduction = reduceByProduction;
 }
开发者ID:mattchamb,项目名称:MParse,代码行数:9,代码来源:TransitionAction.cs


示例11: PostSave

        public Production PostSave(Production production)
        {
            if (production.Id > 0)
                DatabaseContext.Database.Update(production);
            else
                DatabaseContext.Database.Save(production);

            return production;
        }
开发者ID:MerrittMelker,项目名称:UmbracoTest,代码行数:9,代码来源:ProductionsApiController.cs


示例12: Form1

 public Form1()
 {
     InitializeComponent();
     Production m = new Production("AMC", "01");
     cbProductions.Items.Add(m);
     m = new Production("Showtime", "02");
     cbProductions.Items.Add(m);
     m = new Production("HBO", "03");
     cbProductions.Items.Add(m);
 }
开发者ID:AtanasK,项目名称:VP,代码行数:10,代码来源:Form1.cs


示例13: Child

 /**
  * <summary>Called when adding a child to a parse tree
  * node.</summary>
  *
  * <param name='node'>the parent node</param>
  * <param name='child'>the child node, or null</param>
  *
  * <exception cref='ParseException'>if the node analysis
  * discovered errors</exception>
  */
 public override void Child(Production node, Node child)
 {
     switch (node.Id) {
     case (int) GrammarConstants.DOCUMENT:
         ChildDocument(node, child);
         break;
     case (int) GrammarConstants.TEXT:
         ChildText(node, child);
         break;
     }
 }
开发者ID:pldcanfly,项目名称:demonhunter,代码行数:21,代码来源:GrammarAnalyzer.cs


示例14: AddTwoProductionsWithSameOrder

        public void AddTwoProductionsWithSameOrder()
        {
            Production production1 = new Production("Machine A", product1, order1, 1000, 100);
            Production production2 = new Production("Machine A", product1, order1, 1000, 100);

            using (IEntityRepository<Production> repository = factory.CreateEntityRepository<Production>())
            {
                repository.Save(production1);
                repository.Save(production2);
            }
        }
开发者ID:mikkela,项目名称:oee,代码行数:11,代码来源:ProductionRepositoryTest.cs


示例15: Add

        public override void Add(Production item)
        {
            if (Productions.Count == 0)
            {
                var initialProduction = new Production(new NonTerminal(INITAL_SYMBOL_NAME), item.Symbol, null)
                                            {ID = INITAL_SYMBOL_ID};
                Productions.Add(initialProduction);
            }

            base.Add(item);
        }
开发者ID:onirtuen,项目名称:scopus,代码行数:11,代码来源:AugmentedGrammar.cs


示例16: AddChild

		internal void AddChild(int i, Production production) {
			if (i >= _families.Count) {
				throw new Exception();
			}
			if (_families[i].Production != null) {
				if (production != _families[i].Production) {
					throw new Exception();
				}
			}
			_families[i].Production = production;
		}
开发者ID:ellisonch,项目名称:CFGLib,代码行数:11,代码来源:InteriorNode.cs


示例17: GetClassName

 protected string GetClassName(Production prod)
 {
     var sb = new StringBuilder();
     sb.Append('_');
     sb.Append(prod.Head.Name);
     foreach (var v in prod.Tail)
     {
         sb.Append('_');
         sb.Append(v.Name);
     }
     return sb.ToString();
 }
开发者ID:mattchamb,项目名称:MParse,代码行数:12,代码来源:ParserCodeGenBase.cs


示例18: btnAdd_Click

 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (!ValidateChildren())
     {
         return;
     }
     Production = new Production();
     Production.Name = tbName.Text;
     Production.Code = mtbCode.Text;
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.Close();
 }
开发者ID:AtanasK,项目名称:VP,代码行数:12,代码来源:NewProduction.cs


示例19: AddDuplicate

        public void AddDuplicate()
        {
            State state = new State();
            Production p = new Production(new Terminal('x', 'y'));
            Item itemA = new Item(p, state);
            itemA.Add('x');
            state.Add(itemA);

            Item itemB = new Item(p, state);
            itemB.Add('y');
            state.Add(itemB);
        }
开发者ID:ArsenShnurkov,项目名称:earley,代码行数:12,代码来源:TestState.cs


示例20: AddShift

        public void AddShift()
        {
            Production production = new Production("Machine A", new ProductNumber("11232"), new OrderNumber("1234"), 1000, 124);

            ProductionTeam team = new ProductionTeam("Team 1");

            DateTime start = new DateTime(2008, 10, 12, 8, 30, 0);

            ProductionShift shift = production.AddProductionShift(team, start);

            CollectionAssert.AreEquivalent(new [] { shift }, new List<ProductionShift>(production.Shifts));
        }
开发者ID:mikkela,项目名称:oee,代码行数:12,代码来源:ProductionTest.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Products类代码示例发布时间:2022-05-24
下一篇:
C# ProductViewModel类代码示例发布时间: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