aboutsummaryrefslogtreecommitdiff
path: root/src/wix/WixToolset.Core/CompileContext.cs
blob: d84d7aac4b890051ad23b401dabd04a7474d6462 (plain)
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
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.

namespace WixToolset.Core
{
    using System;
    using System.Collections.Generic;
    using System.Threading;
    using System.Xml.Linq;
    using WixToolset.Data;
    using WixToolset.Extensibility;
    using WixToolset.Extensibility.Data;

    internal class CompileContext : ICompileContext
    {
        internal CompileContext(IServiceProvider serviceProvider)
        {
            this.ServiceProvider = serviceProvider;
        }

        public IServiceProvider ServiceProvider { get; }

        public string CompilationId { get; set; }

        public IReadOnlyCollection<ICompilerExtension> Extensions { get; set; }

        public Platform Platform { get; set; }

        public bool IsCurrentPlatform64Bit => this.Platform == Platform.ARM64 || this.Platform == Platform.X64;

        public XDocument Source { get; set; }

        public CancellationToken CancellationToken { get; set; }
    }
}