Esempio n. 1
0
        private static ActivityView BuildDelayView(Delay source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string duration = ExpressionConvert.ToString(source.Duration);

            var view = new DelayView(activityId)
            {
                ActivityName = source.DisplayName,
                Duration     = duration,
            };

            return(view);
        }
Esempio n. 2
0
        private static ActivityView BuildWriteLineView(WriteLine source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string text = ExpressionConvert.ToString(source.Text);

            var view = new WriteLineView(activityId)
            {
                ActivityName = source.DisplayName,
                Text         = text,
            };

            return(view);
        }
Esempio n. 3
0
        private static ActivityView BuildWhileView(While source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string condition = ExpressionConvert.ToString(source.Condition);

            var view = new WhileView(activityId)
            {
                ActivityName = source.DisplayName,
                Condition    = condition,
            };

            return(view);
        }
Esempio n. 4
0
        private static ActivityView BuildCorrelationScopeView(CorrelationScope source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string correlatesWidth = ExpressionConvert.ToString(source.CorrelatesWith);

            var view = new CorrelationScopeView(activityId)
            {
                ActivityName   = source.DisplayName,
                CorrelatesWith = correlatesWidth,
            };

            return(view);
        }
Esempio n. 5
0
        private static ActivityView BuildAssignView <T>(Assign <T> source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string to    = ExpressionConvert.ToString(source.To);
            string value = ExpressionConvert.ToString(source.Value);

            var view = new AssignView(activityId)
            {
                ActivityName = source.DisplayName,
                To           = to,
                Value        = value,
            };

            return(view);
        }
Esempio n. 6
0
        private static ActivityView BuildParallelForEachView <T>(ParallelForEach <T> source)
        {
            string activityId = ObjectIdManager.GetId(source);

            string values   = ExpressionConvert.ToString(source.Values);
            string argument = string.Empty;

            if (source.Body != null)
            {
                argument = source.Body.Argument.Name;
            }

            var view = new ForEachView(activityId)
            {
                ActivityName = source.DisplayName,
                Values       = values,
                Argument     = argument,
            };

            return(view);
        }