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

                if (attributes != null && attributes.Length > 0)
                {
                    this.Attributes = string.Join(",", attributes.Select(x => PluginStepConfig <T> .GetMemberName(x))).ToLower();
                }
                else
                {
                    this.Attributes = null;
                }
            }
예제 #2
0
        protected PluginStepConfig <T> RegisterPluginStep <T>(
            EventOperation eventOperation, ExecutionStage executionStage, Action <LocalPluginContext> action)
            where T : Entity
        {
            PluginStepConfig <T> stepConfig = new PluginStepConfig <T>(eventOperation, executionStage);

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

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

            return(stepConfig);
        }