main
cs 30 lines 1.45 KB
Raw
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.Core
4 {
5 using WixToolset.Data;
6
7 internal static class LinkerWarnings
8 {
9 public static Message LayoutPayloadInContainer(SourceLineNumber sourceLineNumbers, string payloadId, string containerId)
10 {
11 return Message(sourceLineNumbers, Ids.LayoutPayloadInContainer, "The layout-only Payload '{0}' is being added to Container '{1}'. It will not be extracted during layout.", payloadId, containerId);
12 }
13
14 public static Message PayloadInMultipleContainers(SourceLineNumber sourceLineNumbers, string payloadId, string containerId1, string containerId2)
15 {
16 return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2);
17 }
18
19 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
20 {
21 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
22 }
23
24 public enum Ids
25 {
26 LayoutPayloadInContainer = 6900,
27 PayloadInMultipleContainers = 6901,
28 } // last available is 6999. 7000 is LinkerErrors.
29 }
30 }