Esempio n. 1
0
        public ActivityContainer(CodeActivityContext activityContext)
        {
            ActivityContext = activityContext;
            WorkflowContext = ActivityContext.GetExtension <IWorkflowContext>();

            // Reset values of entities, if they was already used —
            // this move will set fresh values for cached loggers and services
            logger  = new Lazy <ITracingService>(() => ActivityContext.GetExtension <ITracingService>());
            service = new Lazy <IOrganizationService>(() => ActivityContext.GetOrganizationService(WorkflowContext.UserId));

            Values = new ExpandoObject();
            Values.IndentationLevel = 0;
        }