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


C# Production类代码示例

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


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


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