コード例 #1
0
 /// <summary>
 /// Defines the property on the saga data to which the message property should be mapped.
 /// </summary>
 /// <param name="sagaEntityProperty">The property to map.</param>
 public void ToSaga(Expression<Func<TSagaData, object>> sagaEntityProperty)
 {
     Guard.AgainstNull(nameof(sagaEntityProperty), sagaEntityProperty);
     sagaMessageFindingConfiguration.ConfigureMapping(sagaEntityProperty, messageProperty);
 }
コード例 #2
0
        /// <summary>
        /// Publish the message to subscribers.
        /// </summary>
        /// <param name="context">The instance of <see cref="IPipelineContext" /> to use for the action.</param>
        /// <typeparam name="T">The message type.</typeparam>
        public static Task Publish<T>(this IPipelineContext context)
        {
            Guard.AgainstNull(nameof(context), context);

            return context.Publish<T>(_ => { }, new PublishOptions());
        }
コード例 #3
0
 public static void EnableCriticalTimePerformanceCounter(this EndpointConfiguration config)
 {
     Guard.AgainstNull(nameof(config), config);
     config.EnableFeature <CriticalTimeMonitoring>();
 }
コード例 #4
0
        /// <summary>
        /// Creates a new startable endpoint based on the provided configuration.
        /// </summary>
        /// <param name="configuration">Configuration.</param>
        public static Task<IStartableEndpoint> Create(EndpointConfiguration configuration)
        {
            Guard.AgainstNull(nameof(configuration), configuration);

            return HostCreator.CreateWithInternallyManagedContainer(configuration);
        }