Esempio n. 1
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(InputExecutionSlotDefinition);
     newSlots.Add(ConditionSlotDefinition);
     newSlots.Add(TrueSlotDefinition);
     newSlots.Add(FalseSlotDefinition);
 }
Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 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]);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
                }
            }
        }
Esempio n. 7
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
 }
Esempio n. 8
0
 /// <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);
Esempio n. 9
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(new Slot(SlotDirection.Output, SlotKind.Execution, StartSlotName, SlotFlags.AutoflowExecution));
 }
Esempio n. 10
0
 public override void GenerateSlots(IList <Slot> newSlots, SlotGeneratorContext context)
 {
     newSlots.Add(new Slot(SlotDirection.Output, SlotKind.Value));
 }