Esempio n. 1
0
        private LocalVariableComponent CreateEscapeRegexFunctionComponent(object component, VariableType localVariable)
        {
            EscapeRegexFunctionType      escapeRegexFunctionType      = (EscapeRegexFunctionType)component;
            EscapeRegexFunctionComponent escapeRegexFunctionComponent = new EscapeRegexFunctionComponent(escapeRegexFunctionType);
            LocalVariableComponent       variableComponent            = this.InstantiateTheCorrectTypeOfComponent(escapeRegexFunctionType.Item, localVariable);

            escapeRegexFunctionComponent.AddComponent(variableComponent);
            return(escapeRegexFunctionComponent);
        }
Esempio n. 2
0
        private LocalVariableComponent CreateSubstringFunctionComponent(Object component, VariableType localVariable)
        {
            SubstringFunctionType      substringFunctionType      = (SubstringFunctionType)component;
            SubStringFunctionComponent subStringFunctionComponent = new SubStringFunctionComponent(substringFunctionType);
            LocalVariableComponent     variableComponent          = this.InstantiateTheCorrectTypeOfComponent(substringFunctionType.Item, localVariable);

            subStringFunctionComponent.AddComponent(variableComponent);
            return(subStringFunctionComponent);
        }
Esempio n. 3
0
        private LocalVariableComponent CreateRegexCaptureFunctionComponent(object component, VariableType localVariable)
        {
            RegexCaptureFunctionType      regexCaptureFunctionType      = (RegexCaptureFunctionType)component;
            RegexCaptureFunctionComponent regexCaptureFunctionComponent = new RegexCaptureFunctionComponent(regexCaptureFunctionType);
            LocalVariableComponent        variableComponent             = this.InstantiateTheCorrectTypeOfComponent(regexCaptureFunctionType.Item, localVariable);

            regexCaptureFunctionComponent.AddComponent(variableComponent);
            return(regexCaptureFunctionComponent);
        }
Esempio n. 4
0
        private LocalVariableComponent CreateSplitFunctionComponent(object component, VariableType localVariable)
        {
            SplitFunctionType      splitFunctionType      = (SplitFunctionType)component;
            SplitFunctionComponent splitFunctionComponent = new SplitFunctionComponent(splitFunctionType);
            LocalVariableComponent variableComponent      = this.InstantiateTheCorrectTypeOfComponent(splitFunctionType.Item, localVariable);

            splitFunctionComponent.AddComponent(variableComponent);
            return(splitFunctionComponent);
        }
Esempio n. 5
0
        private LocalVariableComponent CreateEndFunctionComponent(object component, VariableType localVariable)
        {
            EndFunctionType        endFunctionType        = (EndFunctionType)component;
            EndFunctionComponent   endFunctionComponent   = new EndFunctionComponent(endFunctionType);
            LocalVariableComponent localVariableComponent = this.InstantiateTheCorrectTypeOfComponent(endFunctionType.Item, localVariable);

            endFunctionComponent.AddComponent(localVariableComponent);
            return(endFunctionComponent);
        }
Esempio n. 6
0
        private LocalVariableComponent CreateBeginFunctionComponent(object component, VariableType localVariable)
        {
            BeginFunctionType      beginFunctionType      = (BeginFunctionType)component;
            BeginFunctionComponent beginFunctionComponent = new BeginFunctionComponent(beginFunctionType);
            LocalVariableComponent localVariableComponent = this.InstantiateTheCorrectTypeOfComponent(beginFunctionType.Item, localVariable);

            beginFunctionComponent.AddComponent(localVariableComponent);
            return(beginFunctionComponent);
        }
Esempio n. 7
0
        private LocalVariableComponent CreateTimeDifferenceComponent(object component, VariableType localVariable)
        {
            TimeDifferenceFunctionType      timeDifferenceType      = (TimeDifferenceFunctionType)component;
            TimeDifferenceFunctionComponent timeDifferenceComponent = new TimeDifferenceFunctionComponent(timeDifferenceType);

            for (int i = 0; i < timeDifferenceType.Items.Count(); i++)
            {
                LocalVariableComponent variableComponent = this.InstantiateTheCorrectTypeOfComponent(timeDifferenceType.Items[i], localVariable);
                timeDifferenceComponent.AddComponent(variableComponent);
            }
            return(timeDifferenceComponent);
        }
Esempio n. 8
0
        private LocalVariableComponent CreateArithmeticFunctionComponent(Object component, VariableType localVariable)
        {
            ArithmeticFunctionType      arithmeticFunctionType      = (ArithmeticFunctionType)component;
            ArithmeticFunctionComponent arithmeticFunctionComponent = new ArithmeticFunctionComponent(arithmeticFunctionType);

            for (int i = 0; i < arithmeticFunctionType.Items.Count(); i++)
            {
                LocalVariableComponent variableComponent = this.InstantiateTheCorrectTypeOfComponent(arithmeticFunctionType.Items[i], localVariable);
                arithmeticFunctionComponent.AddComponent(variableComponent);
            }
            return(arithmeticFunctionComponent);
        }
Esempio n. 9
0
        /// <summary>
        /// Creates the concat function component.
        /// </summary>
        /// <param name="component">The component.</param>
        /// <param name="localVariable">The local variable.</param>
        /// <returns></returns>
        private LocalVariableComponent CreateConcatFunctionComponent(Object component, VariableType localVariable)
        {
            ConcatFunctionType      concatFunctionType      = (ConcatFunctionType)component;
            ConcatFunctionComponent concatFunctionComponent = new ConcatFunctionComponent(concatFunctionType, this.variablesOfDefinitions, this.systemCharacteristics);

            for (int i = 0; i < concatFunctionType.Items.Count(); i++)
            {
                LocalVariableComponent variableComponent = this.InstantiateTheCorrectTypeOfComponent(concatFunctionType.Items[i], localVariable);
                concatFunctionComponent.AddComponent(variableComponent);
            }
            return(concatFunctionComponent);
        }
Esempio n. 10
0
        private LocalVariableComponent CreateUniqueFunctionComponent(object component, VariableType localVariable)
        {
            var uniqueFunctionType      = (UniqueFunctionType)component;
            var uniqueFunctionComponent = new UniqueFunctionComponent(uniqueFunctionType, this.variablesOfDefinitions, this.systemCharacteristics);

            for (int i = 0; i < uniqueFunctionType.Items.Count(); i++)
            {
                LocalVariableComponent variableComponent = this.InstantiateTheCorrectTypeOfComponent(uniqueFunctionType.Items[i], localVariable);
                uniqueFunctionComponent.AddComponent(variableComponent);
            }
            return(uniqueFunctionComponent);
        }
 /// <summary>
 /// Add other components in the function. Ex. LocalVariableObjectComponent, LocalVariableObjectComponent and other Functions
 /// </summary>
 /// <param name="component">The component.</param>
 public void AddComponent(LocalVariableComponent component)
 {
     this.components.Add(component);
 }