示例#1
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(InputExecutionSlotDefinition);
     newSlots.Add(ConditionSlotDefinition);
     newSlots.Add(TrueSlotDefinition);
     newSlots.Add(FalseSlotDefinition);
 }
示例#2
0
        public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
        {
            newSlots.Add(InputExecutionSlotDefinition);
            newSlots.Add(OutputExecutionSlotDefinition);

            // TODO: Guess type (from context.Compilation)?
            newSlots.Add(new Slot(SlotDirection.Input, SlotKind.Value));
        }
示例#3
0
        public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
        {
            newSlots.Add(InputExecutionSlotDefinition);
            newSlots.Add(CollectionSlotDefinition);
            //newSlots.Add(BreakSlotDefinition);

            newSlots.Add(LoopSlotDefinition);
            newSlots.Add(ItemSlotDefinition);
            newSlots.Add(CompletedSlotDefinition);
        }
示例#4
0
        public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
        {
            newSlots.Add(InputExecutionSlotDefinition);
            newSlots.Add(OutputExecutionSlotDefinition);

            // Keep old slots
            // We regenerate them based on user actions
            for (int index = 2; index < Slots.Count; index++)
            {
                newSlots.Add(Slots[index]);
            }
        }
示例#5
0
        public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
        {
            if (context.Compilation != null && !string.IsNullOrEmpty(Expression))
            {
                // Parse expression
                var expression = ParseExpression(Expression);

                // Create a block that returns this expression for further analysis
                var block = Block(
                    SingletonList <StatementSyntax>(
                        ReturnStatement(ParenthesizedExpression(expression))));

                RoslynHelper.AnalyzeBlockFlow(newSlots, context.Compilation, block);
            }
        }
示例#6
0
        public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
        {
            newSlots.Add(InputExecutionSlotDefinition);
            newSlots.Add(OutputExecutionSlotDefinition);

            if (context.Compilation != null && !string.IsNullOrEmpty(Code))
            {
                var statement = ParseStatement($"{{ {Code} }}");

                var block = statement as BlockSyntax;
                if (block != null)
                {
                    RoslynHelper.AnalyzeBlockFlow(newSlots, context.Compilation, block);
                }
            }
        }
示例#7
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
 }
示例#8
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(new Slot(SlotDirection.Output, SlotKind.Value));
 }
示例#9
0
文件: Block.cs 项目: Beefr/xenko-wd
 /// <summary>
 /// Generates a list of slot. This doesn't change any state in the <see cref="Block"/>.
 /// </summary>
 /// <param name="newSlots">List to which generated slots will be added.</param>
 /// <param name="context">The context that might be used to access additional information.</param>
 public abstract void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context);
示例#10
0
文件: Block.cs 项目: Beefr/xenko-wd
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(new Slot(SlotDirection.Output, SlotKind.Execution, StartSlotName, SlotFlags.AutoflowExecution));
 }