コード例 #1
0
        public PluginActivityOptionsBuilder HasActivity <T>(string name, string group) where T : CodeActivity
        {
            var typeReg = new PluginTypeRegistration(PluginAssemblyRegistration, typeof(T), name, group);

            PluginAssemblyRegistration.PluginTypeRegistrations.Add(typeReg);
            return(new PluginActivityOptionsBuilder(this, typeReg));
        }
コード例 #2
0
 public PluginStepRegistration(PluginTypeRegistration pluginTypeRegistration, string sdkMessageName, string primaryEntityName, string secondaryEntityName = "")
 {
     PluginTypeRegistration   = pluginTypeRegistration;
     SdkMessageProcessingStep = new SdkMessageProcessingStep();
     SdkMessageName           = sdkMessageName;
     PluginTypeRegistration.PluginType.PropertyChanged             += PluginType_PropertyChanged;
     SdkMessageProcessingStep.plugintype_sdkmessageprocessingstep   = pluginTypeRegistration.PluginType;
     SdkMessageProcessingStep.plugintypeid_sdkmessageprocessingstep = pluginTypeRegistration.PluginType;
     PrimaryEntityName   = primaryEntityName;
     SecondaryEntityName = secondaryEntityName;
 }
コード例 #3
0
        public PluginTypeOptionsBuilder HasPlugin <T>() where T : IPlugin
        {
            //var assy = PluginAssemblyRegistration.Assembly;
            //var types = assy.GetTypes().Where(i => i.IsClass && typeof(IPlugin).IsAssignableFrom(i));
            var typeReg = new PluginTypeRegistration(PluginAssemblyRegistration, typeof(T));

            PluginAssemblyRegistration.PluginTypeRegistrations.Add(typeReg);
            var builder = new PluginTypeOptionsBuilder(this, typeReg);

            return(builder);
        }
コード例 #4
0
 public PluginStepRegistration(PluginTypeRegistration pluginTypeRegistration, string sdkMessageName, string primaryEntityName, string secondaryEntityName = "", string config = "")
 {
     PluginTypeRegistration = pluginTypeRegistration;
     SdkMessageProcessingStep = new SdkMessageProcessingStep();
     SdkMessageName = sdkMessageName;
     PluginTypeRegistration.PluginType.PropertyChanged += PluginType_PropertyChanged;
     SdkMessageProcessingStep.plugintype_sdkmessageprocessingstep = pluginTypeRegistration.PluginType;
     SdkMessageProcessingStep.plugintypeid_sdkmessageprocessingstep = pluginTypeRegistration.PluginType;
     SdkMessageProcessingStep.Name = primaryEntityName == "none"
         ? $"{sdkMessageName}"
         : $"{sdkMessageName} on {primaryEntityName}";
     PrimaryEntityName = primaryEntityName;
     SecondaryEntityName = secondaryEntityName;
     Config = config;
 }
コード例 #5
0
        public PluginAssemblyOptionsBuilder DiscoverPluginTypes()
        {
            var assy  = PluginAssemblyRegistration.Assembly;
            var types = assy.GetTypes().Where(i => i.IsClass && typeof(IPlugin).IsAssignableFrom(i));

            foreach (var type in types)
            {
                var typeReg = new PluginTypeRegistration(PluginAssemblyRegistration, type);
                this.PluginAssemblyRegistration.PluginTypeRegistrations.Add(typeReg);
            }

            return(this);

            //  return true;
        }
コード例 #6
0
        public PluginAssemblyOptionsBuilder DiscoverPluginTypes(Action <PluginTypeOptionsBuilder, Type> configurePluginTypeCallback)
        {
            var assy  = PluginAssemblyRegistration.Assembly;
            var types = assy.GetTypes().Where(i => i.IsClass && typeof(IPlugin).IsAssignableFrom(i));

            foreach (var type in types)
            {
                var typeReg = new PluginTypeRegistration(PluginAssemblyRegistration, type);
                this.PluginAssemblyRegistration.PluginTypeRegistrations.Add(typeReg);
                if (configurePluginTypeCallback != null)
                {
                    var builder = new PluginTypeOptionsBuilder(this, typeReg);
                    configurePluginTypeCallback(builder, typeReg.Type);
                }
            }

            return(this);

            //  return true;
        }
コード例 #7
0
 public PluginStepRegistration(PluginTypeRegistration pluginTypeRegistration, SdkMessageNames sdkMessageName, string primaryEntityName, string secondaryEntityName = "", string config = "")
     : this(pluginTypeRegistration, sdkMessageName.ToString(), primaryEntityName, secondaryEntityName, config)
 {
 }
コード例 #8
0
 public PluginTypeOptionsBuilder(PluginAssemblyOptionsBuilder pluginAssemblyOptionsBuilder, PluginTypeRegistration pluginTypeRegistration)
 {
     PluginAssemblyOptions  = pluginAssemblyOptionsBuilder;
     PluginTypeRegistration = pluginTypeRegistration;
 }
コード例 #9
0
 public PluginStepRegistration(PluginTypeRegistration pluginTypeRegistration, SdkMessageNames sdkMessageName, string primaryEntityName, string secondaryEntityName = "")
     : this(pluginTypeRegistration, sdkMessageName.ToString(), primaryEntityName, secondaryEntityName)
 {
 }
コード例 #10
0
 public PluginStepRegistration(PluginTypeRegistration pluginTypeRegistration, StepConfiguration configuration)
     : this(pluginTypeRegistration, configuration.SdkMessageNames.ToString(), configuration.PrimaryEntityName, configuration.SecondaryEntityName)
 {
     SdkMessageProcessingStep.FilteringAttributes = configuration.FilteringAttributes;
 }
コード例 #11
0
 public PluginTypeOptionsBuilder(PluginAssemblyOptionsBuilder pluginAssemblyOptionsBuilder, PluginTypeRegistration pluginTypeRegistration)
 {
     PluginAssemblyOptions = pluginAssemblyOptionsBuilder;
     PluginTypeRegistration = pluginTypeRegistration;
 }