-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExampleContractsDependencyModule.cs
More file actions
55 lines (51 loc) · 2.51 KB
/
ExampleContractsDependencyModule.cs
File metadata and controls
55 lines (51 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using RapidField.SolidInstruments.EventAuthoring;
using RapidField.SolidInstruments.InversionOfControl.DotNetNative;
using RapidField.SolidInstruments.Messaging.DotNetNative.Extensions;
using RapidField.SolidInstruments.Messaging.EventMessages;
using System;
namespace RapidField.SolidInstruments.Example.DatabaseModel
{
/// <summary>
/// Encapsulates configuration for Example contracts dependencies.
/// </summary>
public sealed class ExampleContractsDependencyModule : DotNetNativeDependencyModule
{
/// <summary>
/// Initializes a new instance of the <see cref="ExampleContractsDependencyModule" /> class.
/// </summary>
/// <param name="applicationConfiguration">
/// Configuration information for the application.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="applicationConfiguration" /> is <see langword="null" />.
/// </exception>
public ExampleContractsDependencyModule(IConfiguration applicationConfiguration)
: base(applicationConfiguration)
{
return;
}
/// <summary>
/// Configures the module.
/// </summary>
/// <param name="configurator">
/// An object that configures containers.
/// </param>
/// <param name="applicationConfiguration">
/// Configuration information for the application.
/// </param>
protected override void Configure(ServiceCollection configurator, IConfiguration applicationConfiguration)
{
// Register event transmitters.
configurator.AddEventMessageTransmitter<ApplicationStartedEvent, ApplicationStartedEventMessage>();
configurator.AddEventMessageTransmitter<ApplicationStoppedEvent, ApplicationStoppedEventMessage>();
configurator.AddEventMessageTransmitter<ExceptionRaisedEvent, ExceptionRaisedEventMessage>();
// Register request transmitters.
configurator.AddPingRequestMessageTransmitter();
}
}
}