예제 #1
0
        private Activity GetImplementation()
        {
            Variable <string> atBatResult = new Variable <string>
            {
                Name    = "outerAtBatResult",
                Default = "default at bat result"
            };
            Variable <int> pitchCount = new Variable <int>
            {
                Name    = "outerPitchCount",
                Default = 0
            };

            Activity stateMachine = CreateStateMachine(atBatResult, pitchCount);

            return(new Sequence
            {
                DisplayName = "OuterImplementation",
                Variables = { atBatResult, pitchCount },
                Activities =
                {
                    stateMachine,
                    new Assign <string>
                    {
                        To = new OutArgument <string>(ctx => AtBatResult.Get(ctx)),
                        Value = new InArgument <string>(ctx => atBatResult.Get(ctx))
                    },
                    new Assign <int>
                    {
                        To = new OutArgument <int>(ctx => PitchCount.Get(ctx)),
                        Value = new InArgument <int>(ctx => pitchCount.Get(ctx))
                    }
                }
            });
        }
예제 #2
0
 public AtBatRecord(Guid id, DateTime timeStamp, int pitches, AtBatResult atBatResult)
 {
     this.id = id;
     this.timeStamp = timeStamp;
     Pitches = pitches;
     AtBatResult = atBatResult;
 }