| 1 | // 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. |
| 2 | |
| 3 | namespace WixToolset.Extensibility.Data |
| 4 | { |
| 5 | using System; |
| 6 | using System.Collections.Generic; |
| 7 | using System.Threading; |
| 8 | using System.Xml.Linq; |
| 9 | using WixToolset.Data; |
| 10 | |
| 11 | /// <summary> |
| 12 | /// Context provided to the compiler. |
| 13 | /// </summary> |
| 14 | public interface ICompileContext |
| 15 | { |
| 16 | /// <summary> |
| 17 | /// Service provider made available to the compiler and its extensions. |
| 18 | /// </summary> |
| 19 | IServiceProvider ServiceProvider { get; } |
| 20 | |
| 21 | /// <summary> |
| 22 | /// Unique identifier for the compilation. |
| 23 | /// </summary> |
| 24 | string CompilationId { get; set; } |
| 25 | |
| 26 | /// <summary> |
| 27 | /// Set of extensions provided to the compiler. |
| 28 | /// </summary> |
| 29 | IReadOnlyCollection<ICompilerExtension> Extensions { get; set; } |
| 30 | |
| 31 | /// <summary> |
| 32 | /// Intermediate folder. |
| 33 | /// </summary> |
| 34 | string IntermediateFolder { get; set; } |
| 35 | |
| 36 | /// <summary> |
| 37 | /// Output path. |
| 38 | /// </summary> |
| 39 | string OutputPath { get; set; } |
| 40 | |
| 41 | /// <summary> |
| 42 | /// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements. |
| 43 | /// </summary> |
| 44 | /// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value> |
| 45 | Platform Platform { get; set; } |
| 46 | |
| 47 | /// <summary> |
| 48 | /// Calculates whether the target platform for the compilation is 64-bit or not. |
| 49 | /// </summary> |
| 50 | bool IsCurrentPlatform64Bit { get; } |
| 51 | |
| 52 | /// <summary> |
| 53 | /// Source document being compiled. |
| 54 | /// </summary> |
| 55 | XDocument Source { get; set; } |
| 56 | |
| 57 | /// <summary> |
| 58 | /// Cancellation token. |
| 59 | /// </summary> |
| 60 | CancellationToken CancellationToken { get; set; } |
| 61 | } |
| 62 | } |