Repository navigation
Expand file tree
/
Copy pathScriptModuleDeployment.cs
More file actions
71 lines (61 loc) · 2.58 KB
/
Copy pathScriptModuleDeployment.cs
File metadata and controls
71 lines (61 loc) · 2.58 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
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Inno.Extensibility.Modules;
namespace Inno.Scripting.Compiler;
/// <summary>
/// Describes the immutable assembly artifacts and dependency topology of one compiled script module.
/// The receiving host chooses how these artifacts enter its module catalog.
/// </summary>
public sealed class ScriptModuleDeployment
{
internal ScriptModuleDeployment(
string moduleName,
string mainAssemblyPath,
AssemblyDomain domain,
AssemblyScope scope,
IReadOnlyList<string> preloadAssemblyPaths,
IReadOnlyList<string> upstreamModuleNames,
IReadOnlyDictionary<string, AssemblyScope>? assemblyScopes = null
) {
this.moduleName = moduleName;
this.mainAssemblyPath = mainAssemblyPath;
this.domain = domain;
this.scope = scope;
this.preloadAssemblyPaths = Array.AsReadOnly(preloadAssemblyPaths.ToArray());
this.upstreamModuleNames = Array.AsReadOnly(upstreamModuleNames.ToArray());
this.assemblyScopes = new ReadOnlyDictionary<string, AssemblyScope>(
assemblyScopes is null
? new Dictionary<string, AssemblyScope>(StringComparer.OrdinalIgnoreCase)
: new Dictionary<string, AssemblyScope>(assemblyScopes, StringComparer.OrdinalIgnoreCase));
}
/// <summary>
/// Gets the logical module name used to resolve dependencies within this compiled generation.
/// </summary>
public string moduleName { get; }
/// <summary>
/// Gets the absolute path of the module's primary assembly artifact.
/// </summary>
public string mainAssemblyPath { get; }
/// <summary>
/// Gets the ownership domain of this module's assemblies.
/// </summary>
public AssemblyDomain domain { get; }
/// <summary>
/// Gets the dependency scope used for assemblies without an explicit scope override.
/// </summary>
public AssemblyScope scope { get; }
/// <summary>
/// Gets the additional assembly artifacts that belong to this same module generation.
/// </summary>
public IReadOnlyList<string> preloadAssemblyPaths { get; }
/// <summary>
/// Gets the logical names of modules that supply managed dependencies to this module.
/// </summary>
public IReadOnlyList<string> upstreamModuleNames { get; }
/// <summary>
/// Gets explicit scopes keyed by assembly simple name, with case-insensitive lookup.
/// </summary>
public IReadOnlyDictionary<string, AssemblyScope> assemblyScopes { get; }
}