コード例 #1
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);
        }
コード例 #2
0
        public void Should_be_possible_to_instantiate_an_EndFunctionComponent()
        {
            var function = new EndFunctionType()
            {
                Item = new LiteralComponentType()
            };
            var localVariable = new VariablesTypeVariableLocal_variable()
            {
                Item = function
            };

            LocalVariableComponentsFactory factory = new LocalVariableComponentsFactory(null, null);
            var variableComponent = factory.GetLocalVariableComponent(localVariable);

            Assert.IsInstanceOfType(variableComponent, typeof(EndFunctionComponent));
            Assert.IsTrue(((EndFunctionComponent)variableComponent).QuantityOfComponents() == 1, "the quantity of component is not expected");
        }
コード例 #3
0
 public EndFunctionComponent(EndFunctionType endFunctionType)
 {
     this.endFunctionType = endFunctionType;
 }
コード例 #4
0
 public EndFunctionComponent(EndFunctionType endFunctionType)
 {
     this.endFunctionType = endFunctionType;
 }
コード例 #5
0
 public OvalEndBuilder(OvalLocalVariableBuilder localVariableBuilder)
 {
     this.localVariableBuilder = localVariableBuilder;
     this.endFunciton          = new EndFunctionType();
 }