public EFCoreOrchestrationService(
     IOptions <EFCoreOrchestrationOptions> options,
     Func <OrchestrationDbContext> dbContextFactory,
     OrchestrationDbContextExtensions dbContextExtensions,
     OrchestrationMessageMapper orchestrationMessageMapper,
     ActivityMessageMapper activityMessageMapper,
     InstanceMapper instanceMapper,
     ExecutionMapper executionMapper,
     ILogger <EFCoreOrchestrationService> logger)
 {
     _options                    = options.Value;
     _dbContextFactory           = dbContextFactory;
     _dbContextExtensions        = dbContextExtensions;
     _orchestrationMessageMapper = orchestrationMessageMapper;
     _activityMessageMapper      = activityMessageMapper;
     _instanceMapper             = instanceMapper;
     _executionMapper            = executionMapper;
     _logger = logger;
 }
Example #2
0
 /// <summary>
 /// Returns a mapper instance for specified types.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <returns>A mapper instance for specified types.</returns>
 public IInstanceMapper <TSource, TTarget> GetMapper <TSource, TTarget>()
 {
     return(InstanceMapper <TSource, TTarget> .GetInstance(this));
 }
Example #3
0
 /// <summary>
 /// Execute a mapping from the source object to the existing target object.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <param name="source">Source object to map from.</param>
 /// <param name="target">Target object to map into.</param>
 public void Map <TSource, TTarget>(TSource source, TTarget target)
 {
     InstanceMapper <TSource, TTarget> .GetInstance(this).Map(source, target);
 }
Example #4
0
 /// <summary>
 /// Execute a mapping from the source object to a new target object.
 /// </summary>
 /// <typeparam name="TSource">The type of source object.</typeparam>
 /// <typeparam name="TTarget">The type of target object.</typeparam>
 /// <param name="source">Source object to map from.</param>
 /// <returns>Mapped target object.</returns>
 public TTarget Map <TSource, TTarget>(TSource source)
 {
     return(InstanceMapper <TSource, TTarget> .GetInstance(this).Map(source));
 }