public PluginTypeRegistration(PluginAssemblyRegistration pluginAssemblyRegistration, Type type, string name, string workflowActivityGroupName) { PluginAssemblyRegistration = pluginAssemblyRegistration; PluginType = new PluginType { TypeName = type.FullName, FriendlyName = type.FullName, Name = name, WorkflowActivityGroupName = workflowActivityGroupName }; Type = type; PluginStepRegistrations = new List<PluginStepRegistration>(); pluginAssemblyRegistration.PluginAssembly.PropertyChanged += PluginAssembly_PropertyChanged; }
public Guid RegisterType(PluginType pluginType) { try { using (var orgService = (OrganizationServiceContext)_ServiceProvider.GetOrganisationService()) { var response = (CreateResponse)orgService.Execute(new CreateRequest() { Target = pluginType }); return response.id; } } catch (FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>) { throw; } }