protected override void Execute(CodeActivityContext executionContext)
        {
            ITracingService tracer = executionContext.GetExtension <ITracingService>();

            try
            {
                string stringToReverse = StringToReverse.Get(executionContext);

                char[] letters = stringToReverse.ToCharArray();
                Array.Reverse(letters);
                string reversedString = new string(letters);

                ReversedString.Set(executionContext, reversedString);
            }
            catch (Exception ex)
            {
                tracer.Trace("Exception: {0}", ex.ToString());
            }
        }
Beispiel #2
0
        protected override void ExecuteCrmWorkFlowActivity(CodeActivityContext context, LocalWorkflowContext localContext)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (localContext == null)
            {
                throw new ArgumentNullException(nameof(localContext));
            }

            string stringToReverse = StringToReverse.Get(context);

            char[] letters = stringToReverse.ToCharArray();
            Array.Reverse(letters);
            string reversedString = new string(letters);

            ReversedString.Set(context, reversedString);
        }