Example #1
0
        public static StepExecutionStatusDetailUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new StepExecutionStatusDetailUnmarshaller();
            }

            return(instance);
        }
Example #2
0
        public StepDetail Unmarshall(UnmarshallerContext context)
        {
            StepDetail stepDetail    = new StepDetail();
            int        originalDepth = context.CurrentDepth;
            int        targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("StepConfig", targetDepth))
                    {
                        stepDetail.StepConfig = StepConfigUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ExecutionStatusDetail", targetDepth))
                    {
                        stepDetail.ExecutionStatusDetail = StepExecutionStatusDetailUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(stepDetail);
                }
            }

            return(stepDetail);
        }