public void ConfigureConsumer(Type consumerType, IReceiveEndpointConfigurator configurator) { if (!Consumers.TryGetValue(consumerType, out var consumer)) { throw new ArgumentException($"The consumer type was not found: {TypeMetadataCache.GetShortName(consumerType)}", nameof(consumerType)); } consumer.Configure(configurator, this); }
public void ConfigureSaga(Type sagaType, IReceiveEndpointConfigurator configurator) { if (!Sagas.TryGetValue(sagaType, out var saga)) { throw new ArgumentException($"The saga type was not found: {TypeMetadataCache.GetShortName(sagaType)}", nameof(sagaType)); } saga.Configure(configurator, this); }
public void ConfigureActivity(Type activityType, IReceiveEndpointConfigurator executeEndpointConfigurator, IReceiveEndpointConfigurator compensateEndpointConfigurator) { if (!Activities.TryGetValue(activityType, out var activity)) { throw new ArgumentException($"The activity type was not found: {TypeMetadataCache.GetShortName(activityType)}", nameof(activityType)); } activity.Configure(executeEndpointConfigurator, compensateEndpointConfigurator, this); }
public void ConfigureFuture(Type futureType, IReceiveEndpointConfigurator configurator) { if (!Futures.TryGetValue(futureType, out var future)) { throw new ArgumentException($"The future type was not found: {TypeMetadataCache.GetShortName(futureType)}", nameof(futureType)); } future.Configure(configurator, this); _configuredTypes.Add(futureType); }