Ejemplo n.º 1
0
        public void SetUp()
        {
            _typeLeft = new C.Type {
                Description = "type left",
                Name        = "NameLeft",
                TypeName    = "TypeNameLeft",
                WorkflowActivityGroupName = "wf left",
                Id = Guid.NewGuid()
            };
            _typeRight = new C.Type {
                Description = "type right",
                Name        = "NameRight",
                TypeName    = "TypeNameRight",
                WorkflowActivityGroupName = "wf right",
                Id = Guid.NewGuid()
            };

            _leftStep = new Step
            {
                Id   = Guid.NewGuid(),
                Name = "StepName",
                PrimaryEntityName = "contact",
                Stage             = SdkMessageProcessingStep_Stage.Preoperation
            };

            _typeLeft.Steps = new List <Step>()
            {
                _leftStep,
                new Step
                {
                    Id   = Guid.NewGuid(),
                    Name = "StepName2",
                    PrimaryEntityName = "contact",
                    Stage             = SdkMessageProcessingStep_Stage.Postoperation
                }
            };

            _rightStep = new Step
            {
                Id   = Guid.NewGuid(),
                Name = "StepName",
                PrimaryEntityName = "contact",
                Stage             = SdkMessageProcessingStep_Stage.Preoperation
            };

            _typeRight.Steps = new List <Step>()
            {
                _rightStep
            };
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            _assemblyLeft = new C.Assembly
            {
                Id            = Guid.NewGuid(),
                IsolationMode = PluginAssembly_IsolationMode.Sandbox,
                Name          = "lhs",
                SourceType    = PluginAssembly_SourceType.Database
            };

            _assemblyRight = new C.Assembly
            {
                Id            = Guid.NewGuid(),
                IsolationMode = PluginAssembly_IsolationMode.None,
                Name          = "rhs",
                SourceType    = PluginAssembly_SourceType.Disk
            };

            _typeLeft = new C.Type {
                Description = "type left", Name = "Name", TypeName = "TypeName", Id = Guid.NewGuid()
            };
            _assemblyLeft.PluginTypes = new List <C.Type>
            {
                _typeLeft, new C.Type {
                    Description = "type left 2", Id = Guid.NewGuid()
                }
            };

            _typeRight = new C.Type {
                Description = "type right", Name = "Name", TypeName = "TypeName", Id = Guid.NewGuid()
            };
            _assemblyRight.PluginTypes = new List <C.Type>()
            {
                _typeRight
            };
        }
        private void UploadSplitAssembly(AssemblyInfo assemblyInfo, PluginRegistrationHelper pluginRegistrationHelper, Xrm.Framework.CI.Common.Type type)
        {
            var temp             = new FileInfo(ProjectFilePath);
            var splitAssembly    = AssemblyInfo.GetAssemblyInfo(assemblyInfo.AssemblyDirectory.Replace(temp.DirectoryName, temp.DirectoryName + type.Name) + "\\" + type.Name + ".dll");
            var pluginAssemblyId = pluginRegistrationHelper.UpsertPluginAssembly(null, splitAssembly, SolutionName, RegistrationType);

            WriteVerbose($"UpsertPluginAssembly {pluginAssemblyId} completed");

            pluginRegistrationHelper.UpsertPluginTypeAndSteps(pluginAssemblyId, type, SolutionName, RegistrationType);
        }