示例#1
0
        private Guid UpsertSdkMessageProcessingStepImage(Guid parentId, Image image, string solutionName, RegistrationTypeEnum registrationType)
        {
            Guid Id = image.Id ?? Guid.Empty;

            if (Id == Guid.Empty)
            {
                Id = pluginRepository.GetSdkMessageProcessingStepImageId(parentId, image.EntityAlias, image.ImageType);
                logWarning?.Invoke($"Extracted id using plugin step image name {image.EntityAlias}");
            }

            var sdkMessageProcessingStepImage = new SdkMessageProcessingStepImage()
            {
                Attributes1                = image.Attributes,
                EntityAlias                = image.EntityAlias,
                MessagePropertyName        = image.MessagePropertyName,
                ImageTypeEnum              = image.ImageType,
                SdkMessageProcessingStepId = new EntityReference(SdkMessageProcessingStep.EntityLogicalName, parentId)
            };

            Id = ExecuteRequest(registrationType, Id, sdkMessageProcessingStepImage);

            return(Id);
        }