Example #1
0
            public PluginStepImage(string name, string entityAlias, PluginImageType PluginImageType, Expression <Func <T, object> >[] attributes)
            {
                this.Name            = name;
                this.EntityAlias     = entityAlias;
                this.PluginImageType = (int)PluginImageType;

                if (attributes != null && attributes.Length > 0)
                {
                    this.Attributes = string.Join(",", attributes.Select(x => PluginStepConfig <T> .GetMemberName(x))).ToLower();
                }
                else
                {
                    this.Attributes = null;
                }
            }
Example #2
0
        protected PluginStepConfig <Entity> RegisterPluginStep(
            string logicalName, PluginEventOperation PluginEventOperation, PluginExecutionStage PluginExecutionStage, Action <LocalPluginContext> action)
        {
            PluginStepConfig <Entity> stepConfig = new PluginStepConfig <Entity>(logicalName, PluginEventOperation, PluginExecutionStage);

            this.PluginStepConfigs.Add((IPluginStepConfig)stepConfig);

            this.RegisteredEvents.Add(
                new Tuple <int, string, string, Action <LocalPluginContext> >(
                    stepConfig._PluginExecutionStage,
                    stepConfig._PluginEventOperation,
                    stepConfig._LogicalName,
                    new Action <LocalPluginContext>(action)));

            return(stepConfig);
        }
Example #3
0
            public PluginTrigger(string operation, ExecutionStage stage,
                                 Action <MockupServiceProviderAndFactory> pluginExecute, PluginStepConfig stepConfig, Dictionary <string, EntityMetadata> metadata)
            {
                this.pluginExecute = pluginExecute;
                this.entityName    = stepConfig.StepConfig.LogicalName;
                this.operation     = operation.ToLower();
                this.stage         = stage;
                this.mode          = (ExecutionMode)stepConfig.ExtendedStepConfig.ExecutionMode;
                this.order         = stepConfig.ExtendedStepConfig.ExecutionOrder;
                if (stepConfig.ImageConfigs != null)
                {
                    this.images.AddRange(stepConfig.ImageConfigs);
                }
                this.metadata            = metadata;
                this.impersonatingUserId = stepConfig.ExtendedStepConfig.ImpersonatingUserId;

                var attrs = stepConfig.ExtendedStepConfig.FilteredAttributes ?? "";

                this.attributes = String.IsNullOrWhiteSpace(attrs) ? new HashSet <string>() : new HashSet <string>(attrs.Split(','));
            }