-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathIEnvironmentContext.cs
More file actions
58 lines (48 loc) · 2.07 KB
/
IEnvironmentContext.cs
File metadata and controls
58 lines (48 loc) · 2.07 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
using Microsoft.Extensions.Hosting;
using ModularPipelines.FileSystem;
namespace ModularPipelines.Context;
/// <summary>
/// Provides context about the current pipeline environment.
/// </summary>
public interface IEnvironmentContext
{
/// <summary>
/// Gets the name of the environment that this Pipeline is running in
/// e.g. Development or Production.
/// </summary>
public string EnvironmentName { get; }
/// <summary>
/// Gets the current operating system.
/// </summary>
public OperatingSystemIdentifier OperatingSystem { get; }
/// <summary>
/// Gets the version of the current operating system.
/// </summary>
public Version OperatingSystemVersion { get; }
/// <summary>
/// Gets a value indicating whether whether the current operating system is 64 bit.
/// </summary>
public bool Is64BitOperatingSystem { get; }
/// <inheritdoc cref="System.AppDomain.BaseDirectory"/>
public Folder AppDomainDirectory { get; }
/// <inheritdoc cref="IHostEnvironment.ContentRootPath"/>
/// <remarks>
/// This property is immutable after pipeline initialization.
/// If you need to change the working directory for command execution,
/// use command options or <see cref="System.Environment.CurrentDirectory"/> directly.
/// </remarks>
public Folder ContentDirectory { get; }
/// <inheritdoc cref="Environment.CurrentDirectory"/>
/// <remarks>
/// This property captures the working directory at pipeline initialization time and is immutable.
/// If you need to change the working directory for command execution,
/// use command options or <see cref="System.Environment.CurrentDirectory"/> directly.
/// </remarks>
public Folder WorkingDirectory { get; }
/// <inheritdoc cref="Environment.GetFolderPath(System.Environment.SpecialFolder)"/>
public Folder? GetFolder(Environment.SpecialFolder specialFolder);
/// <summary>
/// Gets the Environment Variables available to this Pipeline.
/// </summary>
public IEnvironmentVariables EnvironmentVariables { get; }
}