-
-
Notifications
You must be signed in to change notification settings - Fork 344
Expand file tree
/
Copy pathDockerComposeConfiguration.cs
More file actions
71 lines (64 loc) · 2.88 KB
/
DockerComposeConfiguration.cs
File metadata and controls
71 lines (64 loc) · 2.88 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
namespace Testcontainers.DockerCompose;
/// <inheritdoc cref="ContainerConfiguration" />
[PublicAPI]
public sealed class DockerComposeConfiguration : ContainerConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="DockerComposeConfiguration" /> class.
/// </summary>
/// <param name="composeFilePath">The Docker Compose file path.</param>
/// <param name="mode">The Docker Compose mode.</param>
public DockerComposeConfiguration(
string composeFilePath = null,
DockerComposeMode? mode = null)
{
ComposeFilePath = composeFilePath;
Mode = mode;
}
/// <summary>
/// Initializes a new instance of the <see cref="DockerComposeConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public DockerComposeConfiguration(IResourceConfiguration<CreateContainerParameters> resourceConfiguration)
: base(resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}
/// <summary>
/// Initializes a new instance of the <see cref="DockerComposeConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public DockerComposeConfiguration(IContainerConfiguration resourceConfiguration)
: base(resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}
/// <summary>
/// Initializes a new instance of the <see cref="DockerComposeConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public DockerComposeConfiguration(DockerComposeConfiguration resourceConfiguration)
: this(new DockerComposeConfiguration(), resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}
/// <summary>
/// Initializes a new instance of the <see cref="DockerComposeConfiguration" /> class.
/// </summary>
/// <param name="oldValue">The old Docker resource configuration.</param>
/// <param name="newValue">The new Docker resource configuration.</param>
public DockerComposeConfiguration(DockerComposeConfiguration oldValue, DockerComposeConfiguration newValue)
: base(oldValue, newValue)
{
ComposeFilePath = BuildConfiguration.Combine(oldValue.ComposeFilePath, newValue.ComposeFilePath);
Mode = BuildConfiguration.Combine(oldValue.Mode, newValue.Mode);
}
/// <summary>
/// Gets the Docker Compose file path.
/// </summary>
public string ComposeFilePath { get; }
/// <summary>
/// Gets the Docker Compose mode.
/// </summary>
public DockerComposeMode? Mode { get; }
}