public IPipeline CreatePipeline(string assemblyOutputDirectory) { var remotionPipelineFactory = new RemotionPipelineFactory(); var defaultPipeline = SafeServiceLocator.Current.GetInstance <IPipelineRegistry>().DefaultPipeline; var participants = defaultPipeline.Participants.ToArray(); var participantTypeNames = participants.Select(p => p.GetType().Name).ToArray(); s_log.InfoFormat( "Using pipeline '{0}' with the following participants: {1}.", defaultPipeline.ParticipantConfigurationID, string.Join(", ", participantTypeNames)); Assertion.DebugAssert(participants.OfType <MixinParticipant>().Any(), "Mixin participant must be present."); var pipelineSettings = PipelineSettings.From(defaultPipeline.Settings) .SetAssemblyDirectory(assemblyOutputDirectory) .SetAssemblyNamePattern(_assemblyName) .SetDegreeOfParallelism(_degreeOfParallelism); var pipeline = remotionPipelineFactory.Create( defaultPipeline.ParticipantConfigurationID, pipelineSettings.Build(), participants); return(pipeline); }
public void Build_FromExisting_CopiesValues() { var settings = new PipelineSettings(true, "keyFile", true, "assemblyDirectory", "assemblyName_{counter}", 2); var newSettings = PipelineSettings.From(settings).Build(); Assert.That(newSettings.ForceStrongNaming, Is.True); Assert.That(newSettings.KeyFilePath, Is.EqualTo("keyFile")); Assert.That(newSettings.EnableSerializationWithoutAssemblySaving, Is.True); Assert.That(newSettings.AssemblyDirectory, Is.EqualTo("assemblyDirectory")); Assert.That(newSettings.AssemblyNamePattern, Is.EqualTo("assemblyName_{counter}")); Assert.That(newSettings.DegreeOfParallelism, Is.EqualTo(2)); }
protected IPipeline CreatePipelineWithIntegrationTestAssemblyLocation( string participantConfigurationID, PipelineSettings settings, params IParticipant[] participants) { var customSettings = PipelineSettings.From(settings) .SetAssemblyDirectory(SetupFixture.GeneratedFileDirectory) .SetAssemblyNamePattern(participantConfigurationID + "_{counter}") .Build(); return(CreatePipelineExactAssemblyLocation(participantConfigurationID, customSettings, participants)); }