diff options
Diffstat (limited to 'src/api/wix/WixToolset.Data/VerboseMessages.cs')
-rw-r--r-- | src/api/wix/WixToolset.Data/VerboseMessages.cs | 234 |
1 files changed, 234 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Data/VerboseMessages.cs b/src/api/wix/WixToolset.Data/VerboseMessages.cs new file mode 100644 index 00000000..8342aa5e --- /dev/null +++ b/src/api/wix/WixToolset.Data/VerboseMessages.cs | |||
@@ -0,0 +1,234 @@ | |||
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.Data | ||
4 | { | ||
5 | using System; | ||
6 | using System.Resources; | ||
7 | |||
8 | public static class VerboseMessages | ||
9 | { | ||
10 | public static Message BinderTempDirLocatedAt(string directory) | ||
11 | { | ||
12 | return Message(null, Ids.BinderTempDirLocatedAt, "Binder temporary directory located at '{0}'.", directory); | ||
13 | } | ||
14 | |||
15 | public static Message BundleGuid(string bundleGuid) | ||
16 | { | ||
17 | return Message(null, Ids.BundleGuid, "Assigning bundle GUID '{0}'.", bundleGuid); | ||
18 | } | ||
19 | |||
20 | public static Message CabFile(string fileId, string filePath) | ||
21 | { | ||
22 | return Message(null, Ids.CabFile, "Cabbing file {0} from '{1}'.", fileId, filePath); | ||
23 | } | ||
24 | |||
25 | public static Message CabinetsSplitInParallel() | ||
26 | { | ||
27 | return Message(null, Ids.CabinetsSplitInParallel, "Multiple Cabinets with Large Files are splitting simultaneously. This current cabinet is waiting on a shared resource and splitting will resume when the other splitting has completed."); | ||
28 | } | ||
29 | |||
30 | public static Message ConnectingMergeModule(string modulePath, string feature) | ||
31 | { | ||
32 | return Message(null, Ids.ConnectingMergeModule, "Connecting merge module '{0}' to feature '{1}'.", modulePath, feature); | ||
33 | } | ||
34 | |||
35 | public static Message CopyFile(string sourceFile, string destinationFile) | ||
36 | { | ||
37 | return Message(null, Ids.CopyFile, "Copying file '{0}' to '{1}'.", sourceFile, destinationFile); | ||
38 | } | ||
39 | |||
40 | public static Message CopyingExternalPayload(string payload, string outputDirectory) | ||
41 | { | ||
42 | return Message(null, Ids.CopyingExternalPayload, "Copying external payload from '{0}' to '{1}'.", payload, outputDirectory); | ||
43 | } | ||
44 | |||
45 | public static Message CreateCabinet(string cabinet) | ||
46 | { | ||
47 | return Message(null, Ids.CreateCabinet, "Creating cabinet '{0}'.", cabinet); | ||
48 | } | ||
49 | |||
50 | public static Message CreateDirectory(string directory) | ||
51 | { | ||
52 | return Message(null, Ids.CreateDirectory, "The directory '{0}' does not exist, creating it now.", directory); | ||
53 | } | ||
54 | |||
55 | public static Message CreatingCabinetFiles() | ||
56 | { | ||
57 | return Message(null, Ids.CreatingCabinetFiles, "Creating cabinet files."); | ||
58 | } | ||
59 | |||
60 | public static Message DecompilingTable(string tableName) | ||
61 | { | ||
62 | return Message(null, Ids.DecompilingTable, "Decompiling the {0} table.", tableName); | ||
63 | } | ||
64 | |||
65 | public static Message EmbeddingContainer(string container, long size, string compression) | ||
66 | { | ||
67 | return Message(null, Ids.EmbeddingContainer, "Embedding container '{0}' ({1} bytes) with '{2}' compression.", container, size, compression); | ||
68 | } | ||
69 | |||
70 | public static Message GeneratingBundle(string bundleFile, string stubFile) | ||
71 | { | ||
72 | return Message(null, Ids.GeneratingBundle, "Generating Burn bundle '{0}' from stub '{1}'.", bundleFile, stubFile); | ||
73 | } | ||
74 | |||
75 | public static Message GeneratingDatabase() | ||
76 | { | ||
77 | return Message(null, Ids.GeneratingDatabase, "Generating database."); | ||
78 | } | ||
79 | |||
80 | public static Message ImportBinaryStream(string streamSource) | ||
81 | { | ||
82 | return Message(null, Ids.ImportBinaryStream, "Importing binary stream from '{0}'.", streamSource); | ||
83 | } | ||
84 | |||
85 | public static Message ImportIconStream(string streamSource) | ||
86 | { | ||
87 | return Message(null, Ids.ImportIconStream, "Importing icon stream from '{0}'.", streamSource); | ||
88 | } | ||
89 | |||
90 | public static Message ImportingStreams() | ||
91 | { | ||
92 | return Message(null, Ids.ImportingStreams, "Importing streams."); | ||
93 | } | ||
94 | |||
95 | public static Message LayingOutMedia() | ||
96 | { | ||
97 | return Message(null, Ids.LayingOutMedia, "Laying out media."); | ||
98 | } | ||
99 | |||
100 | public static Message LoadingPayload(string payload) | ||
101 | { | ||
102 | return Message(null, Ids.LoadingPayload, "Loading payload '{0}' into container.", payload); | ||
103 | } | ||
104 | |||
105 | public static Message MergingMergeModule(string modulePath) | ||
106 | { | ||
107 | return Message(null, Ids.MergingMergeModule, "Merging merge module '{0}'.", modulePath); | ||
108 | } | ||
109 | |||
110 | public static Message MergingModules() | ||
111 | { | ||
112 | return Message(null, Ids.MergingModules, "Merging modules."); | ||
113 | } | ||
114 | |||
115 | public static Message MoveFile(string sourceFile, string destinationFile) | ||
116 | { | ||
117 | return Message(null, Ids.MoveFile, "Moving file '{0}' to '{1}'.", sourceFile, destinationFile); | ||
118 | } | ||
119 | |||
120 | public static Message OpeningMergeModule(string modulePath, Int16 language) | ||
121 | { | ||
122 | return Message(null, Ids.OpeningMergeModule, "Opening merge module '{0}' with language '{1}'.", modulePath, language); | ||
123 | } | ||
124 | |||
125 | public static Message RemoveDestinationFile(string destinationFile) | ||
126 | { | ||
127 | return Message(null, Ids.RemoveDestinationFile, "The destination file '{0}' already exists, attempting to remove it.", destinationFile); | ||
128 | } | ||
129 | |||
130 | public static Message ResequencingMergeModuleFiles() | ||
131 | { | ||
132 | return Message(null, Ids.ResequencingMergeModuleFiles, "Resequencing files from all merge modules."); | ||
133 | } | ||
134 | |||
135 | public static Message ResolvingManifest(string manifestFile) | ||
136 | { | ||
137 | return Message(null, Ids.ResolvingManifest, "Generating resolved manifest '{0}'.", manifestFile); | ||
138 | } | ||
139 | |||
140 | public static Message ReusingCabCache(SourceLineNumber sourceLineNumbers, string cabinetName, string source) | ||
141 | { | ||
142 | return Message(sourceLineNumbers, Ids.ReusingCabCache, "Reusing cabinet '{0}' from cabinet cache path: '{1}'.", cabinetName, source); | ||
143 | } | ||
144 | |||
145 | public static Message SetCabbingThreadCount(string threads) | ||
146 | { | ||
147 | return Message(null, Ids.SetCabbingThreadCount, "There will be '{0}' threads used to produce CAB files.", threads); | ||
148 | } | ||
149 | |||
150 | public static Message SwitchingToPerUserPackage(SourceLineNumber sourceLineNumbers, string path) | ||
151 | { | ||
152 | return Message(sourceLineNumbers, Ids.SwitchingToPerUserPackage, "Bundle switching from per-machine to per-user due to addition of per-user package '{0}'.", path); | ||
153 | } | ||
154 | |||
155 | public static Message UpdatingFileInformation() | ||
156 | { | ||
157 | return Message(null, Ids.UpdatingFileInformation, "Updating file information."); | ||
158 | } | ||
159 | |||
160 | public static Message ValidatedDatabase(long size) | ||
161 | { | ||
162 | return Message(null, Ids.ValidatedDatabase, "Validation complete: {0:N0}ms elapsed.", size); | ||
163 | } | ||
164 | |||
165 | public static Message ValidatingDatabase() | ||
166 | { | ||
167 | return Message(null, Ids.ValidatingDatabase, "Validating database."); | ||
168 | } | ||
169 | |||
170 | public static Message ValidationInfo(string ice, string message) | ||
171 | { | ||
172 | return Message(null, Ids.ValidationInfo, "{0}: {1}", ice, message); | ||
173 | } | ||
174 | |||
175 | public static Message ValidationSerialized() | ||
176 | { | ||
177 | return Message(null, Ids.ValidationSerialized, "Multiple packages cannot reliably be validated simultaneously. This validation will resume when the other package being validated has completed."); | ||
178 | } | ||
179 | |||
180 | public static Message ValidatorTempDirLocatedAt(string directory) | ||
181 | { | ||
182 | return Message(null, Ids.ValidatorTempDirLocatedAt, "Validator temporary directory located at '{0}'.", directory); | ||
183 | } | ||
184 | |||
185 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
186 | { | ||
187 | return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args); | ||
188 | } | ||
189 | |||
190 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
191 | { | ||
192 | return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args); | ||
193 | } | ||
194 | |||
195 | public enum Ids | ||
196 | { | ||
197 | ImportBinaryStream = 9000, | ||
198 | ImportIconStream = 9001, | ||
199 | CopyFile = 9002, | ||
200 | MoveFile = 9003, | ||
201 | CreateDirectory = 9004, | ||
202 | RemoveDestinationFile = 9005, | ||
203 | CabFile = 9006, | ||
204 | UpdatingFileInformation = 9007, | ||
205 | GeneratingDatabase = 9008, | ||
206 | MergingModules = 9009, | ||
207 | CreatingCabinetFiles = 9010, | ||
208 | ImportingStreams = 9011, | ||
209 | LayingOutMedia = 9012, | ||
210 | DecompilingTable = 9013, | ||
211 | ValidationInfo = 9014, | ||
212 | CreateCabinet = 9015, | ||
213 | ValidatingDatabase = 9016, | ||
214 | OpeningMergeModule = 9017, | ||
215 | MergingMergeModule = 9018, | ||
216 | ConnectingMergeModule = 9019, | ||
217 | ResequencingMergeModuleFiles = 9020, | ||
218 | BinderTempDirLocatedAt = 9021, | ||
219 | ValidatorTempDirLocatedAt = 9022, | ||
220 | GeneratingBundle = 9023, | ||
221 | ResolvingManifest = 9024, | ||
222 | LoadingPayload = 9025, | ||
223 | BundleGuid = 9026, | ||
224 | CopyingExternalPayload = 9027, | ||
225 | EmbeddingContainer = 9028, | ||
226 | SwitchingToPerUserPackage = 9029, | ||
227 | SetCabbingThreadCount = 9030, | ||
228 | ValidationSerialized = 9031, | ||
229 | ReusingCabCache = 9032, | ||
230 | CabinetsSplitInParallel = 9033, | ||
231 | ValidatedDatabase = 9034, | ||
232 | } | ||
233 | } | ||
234 | } | ||