@joebigelow / wix / commits / b2e18715

Remove serialization classes and add Row.IsColumnNull.

Bob Arnson committed Aug 21, 2020 at 17:12 UTC b2e187154d8c89954a8659c3bd19c3dc89fdfbce
5 files changed +8 -58657
src/WixToolset.Data/Serialize/CodeDomInterfaces.cs deleted
-96
@@ -1,96 +0,0 @@
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.Serialize
4 -{
5 - using System;
6 - using System.Collections;
7 - using System.Xml;
8 -
9 - /// <summary>
10 - /// Interface for generated schema elements.
11 - /// </summary>
12 - public interface ISchemaElement
13 - {
14 - /// <summary>
15 - /// Gets and sets the parent of this element. May be null.
16 - /// </summary>
17 - /// <value>An ISchemaElement that has this element as a child.</value>
18 - ISchemaElement ParentElement
19 - {
20 - get;
21 - set;
22 - }
23 -
24 - /// <summary>
25 - /// Outputs xml representing this element, including the associated attributes
26 - /// and any nested elements.
27 - /// </summary>
28 - /// <param name="writer">XmlWriter to be used when outputting the element.</param>
29 - void OutputXml(XmlWriter writer);
30 - }
31 -
32 - /// <summary>
33 - /// Interface for generated schema elements. Implemented by elements that have child
34 - /// elements.
35 - /// </summary>
36 - public interface IParentElement
37 - {
38 - /// <summary>
39 - /// Gets an enumerable collection of the children of this element.
40 - /// </summary>
41 - /// <value>An enumerable collection of the children of this element.</value>
42 - IEnumerable Children
43 - {
44 - get;
45 - }
46 -
47 - /// <summary>
48 - /// Gets an enumerable collection of the children of this element, filtered
49 - /// by the passed in type.
50 - /// </summary>
51 - /// <param name="childType">The type of children to retrieve.</param>
52 - IEnumerable this[Type childType]
53 - {
54 - get;
55 - }
56 -
57 - /// <summary>
58 - /// Adds a child to this element.
59 - /// </summary>
60 - /// <param name="child">Child to add.</param>
61 - void AddChild(ISchemaElement child);
62 -
63 - /// <summary>
64 - /// Removes a child from this element.
65 - /// </summary>
66 - /// <param name="child">Child to remove.</param>
67 - void RemoveChild(ISchemaElement child);
68 - }
69 -
70 - /// <summary>
71 - /// Interface for generated schema elements. Implemented by classes with attributes.
72 - /// </summary>
73 - public interface ISetAttributes
74 - {
75 - /// <summary>
76 - /// Sets the attribute with the given name to the given value. The value here is
77 - /// a string, and is converted to the strongly-typed version inside this method.
78 - /// </summary>
79 - /// <param name="name">The name of the attribute to set.</param>
80 - /// <param name="value">The value to assign to the attribute.</param>
81 - void SetAttribute(string name, string value);
82 - }
83 -
84 - /// <summary>
85 - /// Interface for generated schema elements. Implemented by classes with children.
86 - /// </summary>
87 - public interface ICreateChildren
88 - {
89 - /// <summary>
90 - /// Creates an instance of the child with the passed in name.
91 - /// </summary>
92 - /// <param name="childName">String matching the element name of the child when represented in XML.</param>
93 - /// <returns>An instance of that child.</returns>
94 - ISchemaElement CreateChild(string childName);
95 - }
96 -}
src/WixToolset.Data/Serialize/CodeDomReader.cs deleted
-161
@@ -1,161 +0,0 @@
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.Serialize
4 -{
5 - using System;
6 - using System.Diagnostics.CodeAnalysis;
7 - using System.Globalization;
8 - using System.Reflection;
9 - using System.Xml;
10 -
11 - /// <summary>
12 - /// Class used for reading XML files in to the CodeDom.
13 - /// </summary>
14 - public class CodeDomReader
15 - {
16 - private Assembly[] assemblies;
17 -
18 - /// <summary>
19 - /// Creates a new CodeDomReader, using the current assembly.
20 - /// </summary>
21 - public CodeDomReader()
22 - {
23 - this.assemblies = new Assembly[] { Assembly.GetExecutingAssembly() };
24 - }
25 -
26 - /// <summary>
27 - /// Creates a new CodeDomReader, and takes in a list of assemblies in which to
28 - /// look for elements.
29 - /// </summary>
30 - /// <param name="assemblies">Assemblies in which to look for types that correspond
31 - /// to elements.</param>
32 - public CodeDomReader(Assembly[] assemblies)
33 - {
34 - this.assemblies = assemblies;
35 - }
36 -
37 - /// <summary>
38 - /// Loads an XML file into a strongly-typed code dom.
39 - /// </summary>
40 - /// <param name="filePath">File to load into the code dom.</param>
41 - /// <returns>The strongly-typed object at the root of the tree.</returns>
42 - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
43 - public ISchemaElement Load(string filePath)
44 - {
45 - XmlDocument document = new XmlDocument();
46 - document.Load(filePath);
47 - ISchemaElement schemaElement = null;
48 -
49 - foreach (XmlNode node in document.ChildNodes)
50 - {
51 - XmlElement element = node as XmlElement;
52 - if (element != null)
53 - {
54 - if (schemaElement != null)
55 - {
56 - throw new InvalidOperationException(WixDataStrings.EXP_MultipleRootElementsFoundInFile);
57 - }
58 -
59 - schemaElement = this.CreateObjectFromElement(element);
60 - this.ParseObjectFromElement(schemaElement, element);
61 - }
62 - }
63 - return schemaElement;
64 - }
65 -
66 - /// <summary>
67 - /// Sets an attribute on an ISchemaElement.
68 - /// </summary>
69 - /// <param name="schemaElement">Schema element to set attribute on.</param>
70 - /// <param name="name">Name of the attribute to set.</param>
71 - /// <param name="value">Value to set on the attribute.</param>
72 - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
73 - private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value)
74 - {
75 - ISetAttributes setAttributes = schemaElement as ISetAttributes;
76 - if (setAttributes == null)
77 - {
78 - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName));
79 - }
80 - else
81 - {
82 - setAttributes.SetAttribute(name, value);
83 - }
84 - }
85 -
86 - /// <summary>
87 - /// Parses an ISchemaElement from the XmlElement.
88 - /// </summary>
89 - /// <param name="schemaElement">ISchemaElement to fill in.</param>
90 - /// <param name="element">XmlElement to parse from.</param>
91 - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
92 - private void ParseObjectFromElement(ISchemaElement schemaElement, XmlElement element)
93 - {
94 - foreach (XmlAttribute attribute in element.Attributes)
95 - {
96 - SetAttributeOnObject(schemaElement, attribute.LocalName, attribute.Value);
97 - }
98 -
99 - foreach (XmlNode node in element.ChildNodes)
100 - {
101 - XmlElement childElement = node as XmlElement;
102 - if (childElement != null)
103 - {
104 - ISchemaElement childSchemaElement = null;
105 - ICreateChildren createChildren = schemaElement as ICreateChildren;
106 - if (createChildren == null)
107 - {
108 - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_ISchemaElementDoesnotImplementICreateChildren, element.LocalName));
109 - }
110 - else
111 - {
112 - childSchemaElement = createChildren.CreateChild(childElement.LocalName);
113 - }
114 -
115 - if (childSchemaElement == null)
116 - {
117 - childSchemaElement = this.CreateObjectFromElement(childElement);
118 - if (childSchemaElement == null)
119 - {
120 - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_XmlElementDoesnotHaveISchemaElement, childElement.LocalName));
121 - }
122 - }
123 -
124 - this.ParseObjectFromElement(childSchemaElement, childElement);
125 - IParentElement parentElement = (IParentElement)schemaElement;
126 - parentElement.AddChild(childSchemaElement);
127 - }
128 - else
129 - {
130 - XmlText childText = node as XmlText;
131 - if (childText != null)
132 - {
133 - SetAttributeOnObject(schemaElement, "Content", childText.Value);
134 - }
135 - }
136 - }
137 - }
138 -
139 - /// <summary>
140 - /// Creates an object from an XML element by digging through the assembly list.
141 - /// </summary>
142 - /// <param name="element">XML Element to create an ISchemaElement from.</param>
143 - /// <returns>A constructed ISchemaElement.</returns>
144 - private ISchemaElement CreateObjectFromElement(XmlElement element)
145 - {
146 - ISchemaElement schemaElement = null;
147 - foreach (Assembly assembly in this.assemblies)
148 - {
149 - foreach (Type type in assembly.GetTypes())
150 - {
151 - if (type.FullName.EndsWith(element.LocalName, StringComparison.Ordinal)
152 - && typeof(ISchemaElement).IsAssignableFrom(type))
153 - {
154 - schemaElement = (ISchemaElement)Activator.CreateInstance(type);
155 - }
156 - }
157 - }
158 - return schemaElement;
159 - }
160 - }
161 -}
src/WixToolset.Data/Serialize/ElementCollection.cs deleted
-617
@@ -1,617 +0,0 @@
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.Serialize
4 -{
5 - using System;
6 - using System.Collections;
7 - using System.Globalization;
8 -
9 - /// <summary>
10 - /// Collection used in the CodeDOM for the children of a given element. Provides type-checking
11 - /// on the allowed children to ensure that only allowed types are added.
12 - /// </summary>
13 - public class ElementCollection : ICollection, IEnumerable
14 - {
15 - private CollectionType collectionType;
16 - private int totalContainedItems;
17 - private int containersUsed;
18 - private ArrayList items;
19 -
20 - /// <summary>
21 - /// Creates a new element collection.
22 - /// </summary>
23 - /// <param name="collectionType">Type of the collection to create.</param>
24 - public ElementCollection(CollectionType collectionType)
25 - {
26 - this.collectionType = collectionType;
27 - this.items = new ArrayList();
28 - }
29 -
30 - /// <summary>
31 - /// Enum representing types of XML collections.
32 - /// </summary>
33 - public enum CollectionType
34 - {
35 - /// <summary>
36 - /// A choice type, corresponding to the XSD choice element.
37 - /// </summary>
38 - Choice,
39 -
40 - /// <summary>
41 - /// A sequence type, corresponding to the XSD sequence element.
42 - /// </summary>
43 - Sequence
44 - }
45 -
46 - /// <summary>
47 - /// Gets the type of collection.
48 - /// </summary>
49 - /// <value>The type of collection.</value>
50 - public CollectionType Type
51 - {
52 - get { return this.collectionType; }
53 - }
54 -
55 - /// <summary>
56 - /// Gets the count of child elements in this collection (counts ISchemaElements, not nested collections).
57 - /// </summary>
58 - /// <value>The count of child elements in this collection (counts ISchemaElements, not nested collections).</value>
59 - public int Count
60 - {
61 - get { return this.totalContainedItems; }
62 - }
63 -
64 - /// <summary>
65 - /// Gets the flag specifying whether this collection is synchronized. Always returns false.
66 - /// </summary>
67 - /// <value>The flag specifying whether this collection is synchronized. Always returns false.</value>
68 - public bool IsSynchronized
69 - {
70 - get { return false; }
71 - }
72 -
73 - /// <summary>
74 - /// Gets an object external callers can synchronize on.
75 - /// </summary>
76 - /// <value>An object external callers can synchronize on.</value>
77 - public object SyncRoot
78 - {
79 - get { return this; }
80 - }
81 -
82 - /// <summary>
83 - /// Adds a child element to this collection.
84 - /// </summary>
85 - /// <param name="element">The element to add.</param>
86 - /// <exception cref="ArgumentException">Thrown if the child is not of an allowed type.</exception>
87 - public void AddElement(ISchemaElement element)
88 - {
89 - foreach (object obj in this.items)
90 - {
91 - bool containerUsed;
92 -
93 - CollectionItem collectionItem = obj as CollectionItem;
94 - if (collectionItem != null)
95 - {
96 - containerUsed = collectionItem.Elements.Count != 0;
97 - if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
98 - {
99 - collectionItem.AddElement(element);
100 -
101 - if (!containerUsed)
102 - {
103 - this.containersUsed++;
104 - }
105 -
106 - this.totalContainedItems++;
107 - return;
108 - }
109 -
110 - continue;
111 - }
112 -
113 - ElementCollection collection = obj as ElementCollection;
114 - if (collection != null)
115 - {
116 - containerUsed = collection.Count != 0;
117 -
118 - try
119 - {
120 - collection.AddElement(element);
121 -
122 - if (!containerUsed)
123 - {
124 - this.containersUsed++;
125 - }
126 -
127 - this.totalContainedItems++;
128 - return;
129 - }
130 - catch (ArgumentException)
131 - {
132 - // Eat the exception and keep looking. We'll throw our own if we can't find its home.
133 - }
134 -
135 - continue;
136 - }
137 - }
138 -
139 - throw new ArgumentException(String.Format(
140 - CultureInfo.InvariantCulture,
141 - WixDataStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
142 - element.GetType().Name));
143 - }
144 -
145 - /// <summary>
146 - /// Removes a child element from this collection.
147 - /// </summary>
148 - /// <param name="element">The element to remove.</param>
149 - /// <exception cref="ArgumentException">Thrown if the element is not of an allowed type.</exception>
150 - public void RemoveElement(ISchemaElement element)
151 - {
152 - foreach (object obj in this.items)
153 - {
154 - CollectionItem collectionItem = obj as CollectionItem;
155 - if (collectionItem != null)
156 - {
157 - if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
158 - {
159 - if (collectionItem.Elements.Count == 0)
160 - {
161 - return;
162 - }
163 -
164 - collectionItem.RemoveElement(element);
165 -
166 - if (collectionItem.Elements.Count == 0)
167 - {
168 - this.containersUsed--;
169 - }
170 -
171 - this.totalContainedItems--;
172 - return;
173 - }
174 -
175 - continue;
176 - }
177 -
178 - ElementCollection collection = obj as ElementCollection;
179 - if (collection != null)
180 - {
181 - if (collection.Count == 0)
182 - {
183 - continue;
184 - }
185 -
186 - try
187 - {
188 - collection.RemoveElement(element);
189 -
190 - if (collection.Count == 0)
191 - {
192 - this.containersUsed--;
193 - }
194 -
195 - this.totalContainedItems--;
196 - return;
197 - }
198 - catch (ArgumentException)
199 - {
200 - // Eat the exception and keep looking. We'll throw our own if we can't find its home.
201 - }
202 -
203 - continue;
204 - }
205 - }
206 -
207 - throw new ArgumentException(String.Format(
208 - CultureInfo.InvariantCulture,
209 - WixDataStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
210 - element.GetType().Name));
211 - }
212 -
213 - /// <summary>
214 - /// Copies this collection to an array.
215 - /// </summary>
216 - /// <param name="array">Array to copy to.</param>
217 - /// <param name="index">Offset into the array.</param>
218 - public void CopyTo(Array array, int index)
219 - {
220 - int item = 0;
221 - foreach (ISchemaElement element in this)
222 - {
223 - array.SetValue(element, (long)(item + index));
224 - item++;
225 - }
226 - }
227 -
228 - /// <summary>
229 - /// Creates an enumerator for walking the elements in this collection.
230 - /// </summary>
231 - /// <returns>A newly created enumerator.</returns>
232 - public IEnumerator GetEnumerator()
233 - {
234 - return new ElementCollectionEnumerator(this);
235 - }
236 -
237 - /// <summary>
238 - /// Gets an enumerable collection of children of a given type.
239 - /// </summary>
240 - /// <param name="childType">Type of children to get.</param>
241 - /// <returns>A collection of children.</returns>
242 - /// <exception cref="ArgumentException">Thrown if the type isn't a valid child type.</exception>
243 - public IEnumerable Filter(Type childType)
244 - {
245 - foreach (object container in this.items)
246 - {
247 - CollectionItem collectionItem = container as CollectionItem;
248 - if (collectionItem != null)
249 - {
250 - if (collectionItem.ElementType.IsAssignableFrom(childType))
251 - {
252 - return collectionItem.Elements;
253 - }
254 -
255 - continue;
256 - }
257 -
258 - ElementCollection elementCollection = container as ElementCollection;
259 - if (elementCollection != null)
260 - {
261 - IEnumerable nestedFilter = elementCollection.Filter(childType);
262 - if (nestedFilter != null)
263 - {
264 - return nestedFilter;
265 - }
266 -
267 - continue;
268 - }
269 - }
270 -
271 - throw new ArgumentException(String.Format(
272 - CultureInfo.InvariantCulture,
273 - WixDataStrings.EXP_TypeIsNotValidForThisCollection,
274 - childType.Name));
275 - }
276 -
277 - /// <summary>
278 - /// Adds a type to this collection.
279 - /// </summary>
280 - /// <param name="collectionItem">CollectionItem representing the type to add.</param>
281 - public void AddItem(CollectionItem collectionItem)
282 - {
283 - this.items.Add(collectionItem);
284 - }
285 -
286 - /// <summary>
287 - /// Adds a nested collection to this collection.
288 - /// </summary>
289 - /// <param name="collection">ElementCollection to add.</param>
290 - public void AddCollection(ElementCollection collection)
291 - {
292 - this.items.Add(collection);
293 - }
294 -
295 - /// <summary>
296 - /// Class used to represent a given type in the child collection of an element. Abstract,
297 - /// has subclasses for choice and sequence (which can do cardinality checks).
298 - /// </summary>
299 - public abstract class CollectionItem
300 - {
301 - private Type elementType;
302 - private ArrayList elements;
303 -
304 - /// <summary>
305 - /// Creates a new CollectionItem for the given element type.
306 - /// </summary>
307 - /// <param name="elementType">Type of the element for this collection item.</param>
308 - protected CollectionItem(Type elementType)
309 - {
310 - this.elementType = elementType;
311 - this.elements = new ArrayList();
312 - }
313 -
314 - /// <summary>
315 - /// Gets the type of this collection's items.
316 - /// </summary>
317 - /// <value>The type of this collection's items.</value>
318 - public Type ElementType
319 - {
320 - get { return this.elementType; }
321 - }
322 -
323 - /// <summary>
324 - /// Gets the elements of this collection.
325 - /// </summary>
326 - /// <value>The elements of this collection.</value>
327 - public ArrayList Elements
328 - {
329 - get { return this.elements; }
330 - }
331 -
332 - /// <summary>
333 - /// Adds an element to this collection. Must be of an assignable type to the collection's
334 - /// type.
335 - /// </summary>
336 - /// <param name="element">The element to add.</param>
337 - /// <exception cref="ArgumentException">Thrown if the type isn't assignable to the collection's type.</exception>
338 - public void AddElement(ISchemaElement element)
339 - {
340 - if (!this.elementType.IsAssignableFrom(element.GetType()))
341 - {
342 - throw new ArgumentException(
343 - String.Format(
344 - CultureInfo.InvariantCulture,
345 - WixDataStrings.EXP_ElementIsSubclassOfDifferentType,
346 - this.elementType.Name,
347 - element.GetType().Name),
348 - "element");
349 - }
350 -
351 - this.elements.Add(element);
352 - }
353 -
354 - /// <summary>
355 - /// Removes an element from this collection.
356 - /// </summary>
357 - /// <param name="element">The element to remove.</param>
358 - /// <exception cref="ArgumentException">Thrown if the element's type isn't assignable to the collection's type.</exception>
359 - public void RemoveElement(ISchemaElement element)
360 - {
361 - if (!this.elementType.IsAssignableFrom(element.GetType()))
362 - {
363 - throw new ArgumentException(
364 - String.Format(
365 - CultureInfo.InvariantCulture,
366 - WixDataStrings.EXP_ElementIsSubclassOfDifferentType,
367 - this.elementType.Name,
368 - element.GetType().Name),
369 - "element");
370 - }
371 -
372 - this.elements.Remove(element);
373 - }
374 - }
375 -
376 - /// <summary>
377 - /// Class representing a choice item. Doesn't do cardinality checks.
378 - /// </summary>
379 - public class ChoiceItem : CollectionItem
380 - {
381 - /// <summary>
382 - /// Creates a new choice item.
383 - /// </summary>
384 - /// <param name="elementType">Type of the created item.</param>
385 - public ChoiceItem(Type elementType)
386 - : base(elementType)
387 - {
388 - }
389 - }
390 -
391 - /// <summary>
392 - /// Class representing a sequence item. Can do cardinality checks, if required.
393 - /// </summary>
394 - public class SequenceItem : CollectionItem
395 - {
396 - /// <summary>
397 - /// Creates a new sequence item.
398 - /// </summary>
399 - /// <param name="elementType">Type of the created item.</param>
400 - public SequenceItem(Type elementType)
401 - : base(elementType)
402 - {
403 - }
404 - }
405 -
406 - /// <summary>
407 - /// Enumerator for the ElementCollection.
408 - /// </summary>
409 - private class ElementCollectionEnumerator : IEnumerator
410 - {
411 - private ElementCollection collection;
412 - private Stack collectionStack;
413 -
414 - /// <summary>
415 - /// Creates a new ElementCollectionEnumerator.
416 - /// </summary>
417 - /// <param name="collection">The collection to create an enumerator for.</param>
418 - public ElementCollectionEnumerator(ElementCollection collection)
419 - {
420 - this.collection = collection;
421 - }
422 -
423 - /// <summary>
424 - /// Gets the current object from the enumerator.
425 - /// </summary>
426 - public object Current
427 - {
428 - get
429 - {
430 - if (this.collectionStack != null && this.collectionStack.Count > 0)
431 - {
432 - CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek();
433 - object container = symbol.Collection.items[symbol.ContainerIndex];
434 -
435 - CollectionItem collectionItem = container as CollectionItem;
436 - if (collectionItem != null)
437 - {
438 - return collectionItem.Elements[symbol.ItemIndex];
439 - }
440 -
441 - throw new InvalidOperationException(String.Format(
442 - CultureInfo.InvariantCulture,
443 - WixDataStrings.EXP_ElementMustBeChoiceItemOrSequenceItem,
444 - container.GetType().Name));
445 - }
446 -
447 - return null;
448 - }
449 - }
450 -
451 - /// <summary>
452 - /// Resets the enumerator to the beginning.
453 - /// </summary>
454 - public void Reset()
455 - {
456 - if (this.collectionStack != null)
457 - {
458 - this.collectionStack.Clear();
459 - this.collectionStack = null;
460 - }
461 - }
462 -
463 - /// <summary>
464 - /// Moves the enumerator to the next item.
465 - /// </summary>
466 - /// <returns>True if there is a next item, false otherwise.</returns>
467 - public bool MoveNext()
468 - {
469 - if (this.collectionStack == null)
470 - {
471 - if (this.collection.Count == 0)
472 - {
473 - return false;
474 - }
475 -
476 - this.collectionStack = new Stack();
477 - this.collectionStack.Push(new CollectionSymbol(this.collection));
478 - }
479 -
480 - CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek();
481 -
482 - if (this.FindNext(symbol))
483 - {
484 - return true;
485 - }
486 -
487 - this.collectionStack.Pop();
488 - if (this.collectionStack.Count == 0)
489 - {
490 - return false;
491 - }
492 -
493 - return this.MoveNext();
494 - }
495 -
496 - /// <summary>
497 - /// Pushes a collection onto the stack.
498 - /// </summary>
499 - /// <param name="elementCollection">The collection to push.</param>
500 - private void PushCollection(ElementCollection elementCollection)
501 - {
502 - if (elementCollection.Count <= 0)
503 - {
504 - throw new ArgumentException(String.Format(
505 - CultureInfo.InvariantCulture,
506 - WixDataStrings.EXP_CollectionMustHaveAtLeastOneElement,
507 - elementCollection.Count));
508 - }
509 -
510 - CollectionSymbol symbol = new CollectionSymbol(elementCollection);
511 - this.collectionStack.Push(symbol);
512 - this.FindNext(symbol);
513 - }
514 -
515 - /// <summary>
516 - /// Finds the next item from a given symbol.
517 - /// </summary>
518 - /// <param name="symbol">The symbol to start looking from.</param>
519 - /// <returns>True if a next element is found, false otherwise.</returns>
520 - private bool FindNext(CollectionSymbol symbol)
521 - {
522 - object container = symbol.Collection.items[symbol.ContainerIndex];
523 -
524 - CollectionItem collectionItem = container as CollectionItem;
525 - if (collectionItem != null)
526 - {
527 - if (symbol.ItemIndex + 1 < collectionItem.Elements.Count)
528 - {
529 - symbol.ItemIndex++;
530 - return true;
531 - }
532 - }
533 -
534 - ElementCollection elementCollection = container as ElementCollection;
535 - if (elementCollection != null && elementCollection.Count > 0 && symbol.ItemIndex == -1)
536 - {
537 - symbol.ItemIndex++;
538 - this.PushCollection(elementCollection);
539 - return true;
540 - }
541 -
542 - symbol.ItemIndex = 0;
543 -
544 - for (int i = symbol.ContainerIndex + 1; i < symbol.Collection.items.Count; ++i)
545 - {
546 - object nestedContainer = symbol.Collection.items[i];
547 -
548 - CollectionItem nestedCollectionItem = nestedContainer as CollectionItem;
549 - if (nestedCollectionItem != null)
550 - {
551 - if (nestedCollectionItem.Elements.Count > 0)
552 - {
553 - symbol.ContainerIndex = i;
554 - return true;
555 - }
556 - }
557 -
558 - ElementCollection nestedElementCollection = nestedContainer as ElementCollection;
559 - if (nestedElementCollection != null && nestedElementCollection.Count > 0)
560 - {
561 - symbol.ContainerIndex = i;
562 - this.PushCollection(nestedElementCollection);
563 - return true;
564 - }
565 - }
566 -
567 - return false;
568 - }
569 -
570 - /// <summary>
571 - /// Class representing a single point in the collection. Consists of an ElementCollection,
572 - /// a container index, and an index into the container.
573 - /// </summary>
574 - private class CollectionSymbol
575 - {
576 - private ElementCollection collection;
577 - private int containerIndex;
578 - private int itemIndex = -1;
579 -
580 - /// <summary>
581 - /// Creates a new CollectionSymbol.
582 - /// </summary>
583 - /// <param name="collection">The collection for the symbol.</param>
584 - public CollectionSymbol(ElementCollection collection)
585 - {
586 - this.collection = collection;
587 - }
588 -
589 - /// <summary>
590 - /// Gets the collection for the symbol.
591 - /// </summary>
592 - public ElementCollection Collection
593 - {
594 - get { return this.collection; }
595 - }
596 -
597 - /// <summary>
598 - /// Gets and sets the index of the container in the collection.
599 - /// </summary>
600 - public int ContainerIndex
601 - {
602 - get { return this.containerIndex; }
603 - set { this.containerIndex = value; }
604 - }
605 -
606 - /// <summary>
607 - /// Gets and sets the index of the item in the container.
608 - /// </summary>
609 - public int ItemIndex
610 - {
611 - get { return this.itemIndex; }
612 - set { this.itemIndex = value; }
613 - }
614 - }
615 - }
616 - }
617 -}
src/WixToolset.Data/Serialize/wix.cs deleted
-57782
@@ -1,57782 +0,0 @@
1 -//------------------------------------------------------------------------------
2 -// <auto-generated>
3 -// This code was generated by a tool.
4 -// Runtime Version:4.0.30319.42000
5 -//
6 -// Changes to this file may cause incorrect behavior and will be lost if
7 -// the code is regenerated.
8 -// </auto-generated>
9 -//------------------------------------------------------------------------------
10 -
11 -namespace WixToolset.Data.Serialize
12 -{
13 - using System;
14 - using System.CodeDom.Compiler;
15 - using System.Collections;
16 - using System.Diagnostics.CodeAnalysis;
17 - using System.Globalization;
18 - using System.Xml;
19 -
20 -
21 - /// <summary>
22 - /// Values of this type will either be "attached" or "detached".
23 - /// </summary>
24 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25 - public enum BurnContainerType
26 - {
27 -
28 - IllegalValue = int.MaxValue,
29 -
30 - NotSet = -1,
31 -
32 - attached,
33 -
34 - detached,
35 - }
36 -
37 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38 - public class Enums
39 - {
40 -
41 - /// <summary>
42 - /// Parses a BurnContainerType from a string.
43 - /// </summary>
44 - public static BurnContainerType ParseBurnContainerType(string value)
45 - {
46 - BurnContainerType parsedValue;
47 - Enums.TryParseBurnContainerType(value, out parsedValue);
48 - return parsedValue;
49 - }
50 -
51 - /// <summary>
52 - /// Tries to parse a BurnContainerType from a string.
53 - /// </summary>
54 - public static bool TryParseBurnContainerType(string value, out BurnContainerType parsedValue)
55 - {
56 - parsedValue = BurnContainerType.NotSet;
57 - if (string.IsNullOrEmpty(value))
58 - {
59 - return false;
60 - }
61 - if (("attached" == value))
62 - {
63 - parsedValue = BurnContainerType.attached;
64 - }
65 - else
66 - {
67 - if (("detached" == value))
68 - {
69 - parsedValue = BurnContainerType.detached;
70 - }
71 - else
72 - {
73 - parsedValue = BurnContainerType.IllegalValue;
74 - return false;
75 - }
76 - }
77 - return true;
78 - }
79 -
80 - /// <summary>
81 - /// Parses a BurnExeProtocolType from a string.
82 - /// </summary>
83 - public static BurnExeProtocolType ParseBurnExeProtocolType(string value)
84 - {
85 - BurnExeProtocolType parsedValue;
86 - Enums.TryParseBurnExeProtocolType(value, out parsedValue);
87 - return parsedValue;
88 - }
89 -
90 - /// <summary>
91 - /// Tries to parse a BurnExeProtocolType from a string.
92 - /// </summary>
93 - public static bool TryParseBurnExeProtocolType(string value, out BurnExeProtocolType parsedValue)
94 - {
95 - parsedValue = BurnExeProtocolType.NotSet;
96 - if (string.IsNullOrEmpty(value))
97 - {
98 - return false;
99 - }
100 - if (("none" == value))
101 - {
102 - parsedValue = BurnExeProtocolType.none;
103 - }
104 - else
105 - {
106 - if (("burn" == value))
107 - {
108 - parsedValue = BurnExeProtocolType.burn;
109 - }
110 - else
111 - {
112 - if (("netfx4" == value))
113 - {
114 - parsedValue = BurnExeProtocolType.netfx4;
115 - }
116 - else
117 - {
118 - parsedValue = BurnExeProtocolType.IllegalValue;
119 - return false;
120 - }
121 - }
122 - }
123 - return true;
124 - }
125 -
126 - /// <summary>
127 - /// Parses a YesNoType from a string.
128 - /// </summary>
129 - public static YesNoType ParseYesNoType(string value)
130 - {
131 - YesNoType parsedValue;
132 - Enums.TryParseYesNoType(value, out parsedValue);
133 - return parsedValue;
134 - }
135 -
136 - /// <summary>
137 - /// Tries to parse a YesNoType from a string.
138 - /// </summary>
139 - public static bool TryParseYesNoType(string value, out YesNoType parsedValue)
140 - {
141 - parsedValue = YesNoType.NotSet;
142 - if (string.IsNullOrEmpty(value))
143 - {
144 - return false;
145 - }
146 - if (("no" == value))
147 - {
148 - parsedValue = YesNoType.no;
149 - }
150 - else
151 - {
152 - if (("yes" == value))
153 - {
154 - parsedValue = YesNoType.yes;
155 - }
156 - else
157 - {
158 - parsedValue = YesNoType.IllegalValue;
159 - return false;
160 - }
161 - }
162 - return true;
163 - }
164 -
165 - /// <summary>
166 - /// Parses a YesNoButtonType from a string.
167 - /// </summary>
168 - public static YesNoButtonType ParseYesNoButtonType(string value)
169 - {
170 - YesNoButtonType parsedValue;
171 - Enums.TryParseYesNoButtonType(value, out parsedValue);
172 - return parsedValue;
173 - }
174 -
175 - /// <summary>
176 - /// Tries to parse a YesNoButtonType from a string.
177 - /// </summary>
178 - public static bool TryParseYesNoButtonType(string value, out YesNoButtonType parsedValue)
179 - {
180 - parsedValue = YesNoButtonType.NotSet;
181 - if (string.IsNullOrEmpty(value))
182 - {
183 - return false;
184 - }
185 - if (("no" == value))
186 - {
187 - parsedValue = YesNoButtonType.no;
188 - }
189 - else
190 - {
191 - if (("yes" == value))
192 - {
193 - parsedValue = YesNoButtonType.yes;
194 - }
195 - else
196 - {
197 - if (("button" == value))
198 - {
199 - parsedValue = YesNoButtonType.button;
200 - }
201 - else
202 - {
203 - parsedValue = YesNoButtonType.IllegalValue;
204 - return false;
205 - }
206 - }
207 - }
208 - return true;
209 - }
210 -
211 - /// <summary>
212 - /// Parses a YesNoDefaultType from a string.
213 - /// </summary>
214 - public static YesNoDefaultType ParseYesNoDefaultType(string value)
215 - {
216 - YesNoDefaultType parsedValue;
217 - Enums.TryParseYesNoDefaultType(value, out parsedValue);
218 - return parsedValue;
219 - }
220 -
221 - /// <summary>
222 - /// Tries to parse a YesNoDefaultType from a string.
223 - /// </summary>
224 - public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue)
225 - {
226 - parsedValue = YesNoDefaultType.NotSet;
227 - if (string.IsNullOrEmpty(value))
228 - {
229 - return false;
230 - }
231 - if (("default" == value))
232 - {
233 - parsedValue = YesNoDefaultType.@default;
234 - }
235 - else
236 - {
237 - if (("no" == value))
238 - {
239 - parsedValue = YesNoDefaultType.no;
240 - }
241 - else
242 - {
243 - if (("yes" == value))
244 - {
245 - parsedValue = YesNoDefaultType.yes;
246 - }
247 - else
248 - {
249 - parsedValue = YesNoDefaultType.IllegalValue;
250 - return false;
251 - }
252 - }
253 - }
254 - return true;
255 - }
256 -
257 - /// <summary>
258 - /// Parses a YesNoAlwaysType from a string.
259 - /// </summary>
260 - public static YesNoAlwaysType ParseYesNoAlwaysType(string value)
261 - {
262 - YesNoAlwaysType parsedValue;
263 - Enums.TryParseYesNoAlwaysType(value, out parsedValue);
264 - return parsedValue;
265 - }
266 -
267 - /// <summary>
268 - /// Tries to parse a YesNoAlwaysType from a string.
269 - /// </summary>
270 - public static bool TryParseYesNoAlwaysType(string value, out YesNoAlwaysType parsedValue)
271 - {
272 - parsedValue = YesNoAlwaysType.NotSet;
273 - if (string.IsNullOrEmpty(value))
274 - {
275 - return false;
276 - }
277 - if (("always" == value))
278 - {
279 - parsedValue = YesNoAlwaysType.always;
280 - }
281 - else
282 - {
283 - if (("no" == value))
284 - {
285 - parsedValue = YesNoAlwaysType.no;
286 - }
287 - else
288 - {
289 - if (("yes" == value))
290 - {
291 - parsedValue = YesNoAlwaysType.yes;
292 - }
293 - else
294 - {
295 - parsedValue = YesNoAlwaysType.IllegalValue;
296 - return false;
297 - }
298 - }
299 - }
300 - return true;
301 - }
302 -
303 - /// <summary>
304 - /// Parses a RegistryRootType from a string.
305 - /// </summary>
306 - public static RegistryRootType ParseRegistryRootType(string value)
307 - {
308 - RegistryRootType parsedValue;
309 - Enums.TryParseRegistryRootType(value, out parsedValue);
310 - return parsedValue;
311 - }
312 -
313 - /// <summary>
314 - /// Tries to parse a RegistryRootType from a string.
315 - /// </summary>
316 - public static bool TryParseRegistryRootType(string value, out RegistryRootType parsedValue)
317 - {
318 - parsedValue = RegistryRootType.NotSet;
319 - if (string.IsNullOrEmpty(value))
320 - {
321 - return false;
322 - }
323 - if (("HKMU" == value))
324 - {
325 - parsedValue = RegistryRootType.HKMU;
326 - }
327 - else
328 - {
329 - if (("HKCR" == value))
330 - {
331 - parsedValue = RegistryRootType.HKCR;
332 - }
333 - else
334 - {
335 - if (("HKCU" == value))
336 - {
337 - parsedValue = RegistryRootType.HKCU;
338 - }
339 - else
340 - {
341 - if (("HKLM" == value))
342 - {
343 - parsedValue = RegistryRootType.HKLM;
344 - }
345 - else
346 - {
347 - if (("HKU" == value))
348 - {
349 - parsedValue = RegistryRootType.HKU;
350 - }
351 - else
352 - {
353 - parsedValue = RegistryRootType.IllegalValue;
354 - return false;
355 - }
356 - }
357 - }
358 - }
359 - }
360 - return true;
361 - }
362 -
363 - /// <summary>
364 - /// Parses a ExitType from a string.
365 - /// </summary>
366 - public static ExitType ParseExitType(string value)
367 - {
368 - ExitType parsedValue;
369 - Enums.TryParseExitType(value, out parsedValue);
370 - return parsedValue;
371 - }
372 -
373 - /// <summary>
374 - /// Tries to parse a ExitType from a string.
375 - /// </summary>
376 - public static bool TryParseExitType(string value, out ExitType parsedValue)
377 - {
378 - parsedValue = ExitType.NotSet;
379 - if (string.IsNullOrEmpty(value))
380 - {
381 - return false;
382 - }
383 - if (("success" == value))
384 - {
385 - parsedValue = ExitType.success;
386 - }
387 - else
388 - {
389 - if (("cancel" == value))
390 - {
391 - parsedValue = ExitType.cancel;
392 - }
393 - else
394 - {
395 - if (("error" == value))
396 - {
397 - parsedValue = ExitType.error;
398 - }
399 - else
400 - {
401 - if (("suspend" == value))
402 - {
403 - parsedValue = ExitType.suspend;
404 - }
405 - else
406 - {
407 - parsedValue = ExitType.IllegalValue;
408 - return false;
409 - }
410 - }
411 - }
412 - }
413 - return true;
414 - }
415 -
416 - /// <summary>
417 - /// Parses a InstallUninstallType from a string.
418 - /// </summary>
419 - public static InstallUninstallType ParseInstallUninstallType(string value)
420 - {
421 - InstallUninstallType parsedValue;
422 - Enums.TryParseInstallUninstallType(value, out parsedValue);
423 - return parsedValue;
424 - }
425 -
426 - /// <summary>
427 - /// Tries to parse a InstallUninstallType from a string.
428 - /// </summary>
429 - public static bool TryParseInstallUninstallType(string value, out InstallUninstallType parsedValue)
430 - {
431 - parsedValue = InstallUninstallType.NotSet;
432 - if (string.IsNullOrEmpty(value))
433 - {
434 - return false;
435 - }
436 - if (("install" == value))
437 - {
438 - parsedValue = InstallUninstallType.install;
439 - }
440 - else
441 - {
442 - if (("uninstall" == value))
443 - {
444 - parsedValue = InstallUninstallType.uninstall;
445 - }
446 - else
447 - {
448 - if (("both" == value))
449 - {
450 - parsedValue = InstallUninstallType.both;
451 - }
452 - else
453 - {
454 - parsedValue = InstallUninstallType.IllegalValue;
455 - return false;
456 - }
457 - }
458 - }
459 - return true;
460 - }
461 -
462 - /// <summary>
463 - /// Parses a SequenceType from a string.
464 - /// </summary>
465 - public static SequenceType ParseSequenceType(string value)
466 - {
467 - SequenceType parsedValue;
468 - Enums.TryParseSequenceType(value, out parsedValue);
469 - return parsedValue;
470 - }
471 -
472 - /// <summary>
473 - /// Tries to parse a SequenceType from a string.
474 - /// </summary>
475 - public static bool TryParseSequenceType(string value, out SequenceType parsedValue)
476 - {
477 - parsedValue = SequenceType.NotSet;
478 - if (string.IsNullOrEmpty(value))
479 - {
480 - return false;
481 - }
482 - if (("both" == value))
483 - {
484 - parsedValue = SequenceType.both;
485 - }
486 - else
487 - {
488 - if (("first" == value))
489 - {
490 - parsedValue = SequenceType.first;
491 - }
492 - else
493 - {
494 - if (("execute" == value))
495 - {
496 - parsedValue = SequenceType.execute;
497 - }
498 - else
499 - {
500 - if (("ui" == value))
501 - {
502 - parsedValue = SequenceType.ui;
503 - }
504 - else
505 - {
506 - parsedValue = SequenceType.IllegalValue;
507 - return false;
508 - }
509 - }
510 - }
511 - }
512 - return true;
513 - }
514 -
515 - /// <summary>
516 - /// Parses a CompressionLevelType from a string.
517 - /// </summary>
518 - public static CompressionLevelType ParseCompressionLevelType(string value)
519 - {
520 - CompressionLevelType parsedValue;
521 - Enums.TryParseCompressionLevelType(value, out parsedValue);
522 - return parsedValue;
523 - }
524 -
525 - /// <summary>
526 - /// Tries to parse a CompressionLevelType from a string.
527 - /// </summary>
528 - public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue)
529 - {
530 - parsedValue = CompressionLevelType.NotSet;
531 - if (string.IsNullOrEmpty(value))
532 - {
533 - return false;
534 - }
535 - if (("high" == value))
536 - {
537 - parsedValue = CompressionLevelType.high;
538 - }
539 - else
540 - {
541 - if (("low" == value))
542 - {
543 - parsedValue = CompressionLevelType.low;
544 - }
545 - else
546 - {
547 - if (("medium" == value))
548 - {
549 - parsedValue = CompressionLevelType.medium;
550 - }
551 - else
552 - {
553 - if (("mszip" == value))
554 - {
555 - parsedValue = CompressionLevelType.mszip;
556 - }
557 - else
558 - {
559 - if (("none" == value))
560 - {
561 - parsedValue = CompressionLevelType.none;
562 - }
563 - else
564 - {
565 - parsedValue = CompressionLevelType.IllegalValue;
566 - return false;
567 - }
568 - }
569 - }
570 - }
571 - }
572 - return true;
573 - }
574 - }
575 -
576 - /// <summary>
577 - /// The list of communcation protocols with executable packages Burn supports.
578 - /// </summary>
579 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
580 - public enum BurnExeProtocolType
581 - {
582 -
583 - IllegalValue = int.MaxValue,
584 -
585 - NotSet = -1,
586 -
587 - /// <summary>
588 - /// The executable package does not support a communication protocol.
589 - /// </summary>
590 - none,
591 -
592 - /// <summary>
593 - /// The executable package is another Burn bundle and supports the Burn communication protocol.
594 - /// </summary>
595 - burn,
596 -
597 - /// <summary>
598 - /// The executable package implements the .NET Framework v4.0 communication protocol.
599 - /// </summary>
600 - netfx4,
601 - }
602 -
603 - /// <summary>
604 - /// Values of this type will either be "yes" or "no".
605 - /// </summary>
606 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
607 - public enum YesNoType
608 - {
609 -
610 - IllegalValue = int.MaxValue,
611 -
612 - NotSet = -1,
613 -
614 - no,
615 -
616 - yes,
617 - }
618 -
619 - /// <summary>
620 - /// Values of this type will either be "button", "yes" or "no".
621 - /// </summary>
622 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
623 - public enum YesNoButtonType
624 - {
625 -
626 - IllegalValue = int.MaxValue,
627 -
628 - NotSet = -1,
629 -
630 - no,
631 -
632 - yes,
633 -
634 - button,
635 - }
636 -
637 - /// <summary>
638 - /// Values of this type will either be "default", "yes", or "no".
639 - /// </summary>
640 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
641 - public enum YesNoDefaultType
642 - {
643 -
644 - IllegalValue = int.MaxValue,
645 -
646 - NotSet = -1,
647 -
648 - @default,
649 -
650 - no,
651 -
652 - yes,
653 - }
654 -
655 - /// <summary>
656 - /// Values of this type will either be "always", "yes", or "no".
657 - /// </summary>
658 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
659 - public enum YesNoAlwaysType
660 - {
661 -
662 - IllegalValue = int.MaxValue,
663 -
664 - NotSet = -1,
665 -
666 - always,
667 -
668 - no,
669 -
670 - yes,
671 - }
672 -
673 - /// <summary>
674 - /// Values of this type represent possible registry roots.
675 - /// </summary>
676 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
677 - public enum RegistryRootType
678 - {
679 -
680 - IllegalValue = int.MaxValue,
681 -
682 - NotSet = -1,
683 -
684 - /// <summary>
685 - /// A per-user installation will make the operation occur under HKEY_CURRENT_USER.
686 - /// A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE.
687 - /// </summary>
688 - HKMU,
689 -
690 - /// <summary>
691 - /// Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value
692 - /// from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems,
693 - /// the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations.
694 - /// </summary>
695 - HKCR,
696 -
697 - /// <summary>
698 - /// Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath='yes' attribute when setting this value for writing values
699 - /// in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer.
700 - /// </summary>
701 - HKCU,
702 -
703 - /// <summary>
704 - /// Operation occurs under HKEY_LOCAL_MACHINE.
705 - /// </summary>
706 - HKLM,
707 -
708 - /// <summary>
709 - /// Operation occurs under HKEY_USERS.
710 - /// </summary>
711 - HKU,
712 - }
713 -
714 - /// <summary>
715 - /// Value indicates that this action is executed if the installer returns the associated exit type. Each exit type can be used with no more than one action.
716 - /// Multiple actions can have exit types assigned, but every action and exit type must be different. Exit types are typically used with dialog boxes.
717 - /// </summary>
718 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
719 - public enum ExitType
720 - {
721 -
722 - IllegalValue = int.MaxValue,
723 -
724 - NotSet = -1,
725 -
726 - success,
727 -
728 - cancel,
729 -
730 - error,
731 -
732 - suspend,
733 - }
734 -
735 - /// <summary>
736 - /// Specifies whether an action occur on install, uninstall or both.
737 - /// </summary>
738 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
739 - public enum InstallUninstallType
740 - {
741 -
742 - IllegalValue = int.MaxValue,
743 -
744 - NotSet = -1,
745 -
746 - /// <summary>
747 - /// The action should happen during install (msiInstallStateLocal or msiInstallStateSource).
748 - /// </summary>
749 - install,
750 -
751 - /// <summary>
752 - /// The action should happen during uninstall (msiInstallStateAbsent).
753 - /// </summary>
754 - uninstall,
755 -
756 - /// <summary>
757 - /// The action should happen during both install and uninstall.
758 - /// </summary>
759 - both,
760 - }
761 -
762 - /// <summary>
763 - /// Controls which sequences the item assignment is sequenced in.
764 - /// </summary>
765 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
766 - public enum SequenceType
767 - {
768 -
769 - IllegalValue = int.MaxValue,
770 -
771 - NotSet = -1,
772 -
773 - /// <summary>
774 - /// Schedules the assignment in the InstallUISequence and the InstallExecuteSequence.
775 - /// </summary>
776 - both,
777 -
778 - /// <summary>
779 - /// Schedules the assignment to run in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped.
780 - /// </summary>
781 - first,
782 -
783 - /// <summary>
784 - /// Schedules the assignment only in the the InstallExecuteSequence.
785 - /// </summary>
786 - execute,
787 -
788 - /// <summary>
789 - /// Schedules the assignment only in the the InstallUISequence.
790 - /// </summary>
791 - ui,
792 - }
793 -
794 - /// <summary>
795 - /// Indicates the compression level for a cabinet.
796 - /// </summary>
797 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
798 - public enum CompressionLevelType
799 - {
800 -
801 - IllegalValue = int.MaxValue,
802 -
803 - NotSet = -1,
804 -
805 - high,
806 -
807 - low,
808 -
809 - medium,
810 -
811 - mszip,
812 -
813 - none,
814 - }
815 -
816 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
817 - public abstract class ActionModuleSequenceType : ISchemaElement, ISetAttributes
818 - {
819 -
820 - private string afterField;
821 -
822 - private bool afterFieldSet;
823 -
824 - private string beforeField;
825 -
826 - private bool beforeFieldSet;
827 -
828 - private YesNoType overridableField;
829 -
830 - private bool overridableFieldSet;
831 -
832 - private int sequenceField;
833 -
834 - private bool sequenceFieldSet;
835 -
836 - private YesNoType suppressField;
837 -
838 - private bool suppressFieldSet;
839 -
840 - private string contentField;
841 -
842 - private bool contentFieldSet;
843 -
844 - private ISchemaElement parentElement;
845 -
846 - /// <summary>
847 - /// The name of an action that this action should come after.
848 - /// </summary>
849 - public string After
850 - {
851 - get
852 - {
853 - return this.afterField;
854 - }
855 - set
856 - {
857 - this.afterFieldSet = true;
858 - this.afterField = value;
859 - }
860 - }
861 -
862 - /// <summary>
863 - /// The name of an action that this action should come before.
864 - /// </summary>
865 - public string Before
866 - {
867 - get
868 - {
869 - return this.beforeField;
870 - }
871 - set
872 - {
873 - this.beforeFieldSet = true;
874 - this.beforeField = value;
875 - }
876 - }
877 -
878 - /// <summary>
879 - /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere.
880 - /// </summary>
881 - public YesNoType Overridable
882 - {
883 - get
884 - {
885 - return this.overridableField;
886 - }
887 - set
888 - {
889 - this.overridableFieldSet = true;
890 - this.overridableField = value;
891 - }
892 - }
893 -
894 - /// <summary>
895 - /// A value used to indicate the position of this action in a sequence.
896 - /// </summary>
897 - public int Sequence
898 - {
899 - get
900 - {
901 - return this.sequenceField;
902 - }
903 - set
904 - {
905 - this.sequenceFieldSet = true;
906 - this.sequenceField = value;
907 - }
908 - }
909 -
910 - /// <summary>
911 - /// If yes, this action will not occur.
912 - /// </summary>
913 - public YesNoType Suppress
914 - {
915 - get
916 - {
917 - return this.suppressField;
918 - }
919 - set
920 - {
921 - this.suppressFieldSet = true;
922 - this.suppressField = value;
923 - }
924 - }
925 -
926 - /// <summary>
927 - /// Text node specifies the condition of the action.
928 - /// </summary>
929 - public string Content
930 - {
931 - get
932 - {
933 - return this.contentField;
934 - }
935 - set
936 - {
937 - this.contentFieldSet = true;
938 - this.contentField = value;
939 - }
940 - }
941 -
942 - public virtual ISchemaElement ParentElement
943 - {
944 - get
945 - {
946 - return this.parentElement;
947 - }
948 - set
949 - {
950 - this.parentElement = value;
951 - }
952 - }
953 -
954 - /// <summary>
955 - /// Processes this element and all child elements into an XmlWriter.
956 - /// </summary>
957 - public virtual void OutputXml(XmlWriter writer)
958 - {
959 - if ((null == writer))
960 - {
961 - throw new ArgumentNullException("writer");
962 - }
963 - if (this.afterFieldSet)
964 - {
965 - writer.WriteAttributeString("After", this.afterField);
966 - }
967 - if (this.beforeFieldSet)
968 - {
969 - writer.WriteAttributeString("Before", this.beforeField);
970 - }
971 - if (this.overridableFieldSet)
972 - {
973 - if ((this.overridableField == YesNoType.no))
974 - {
975 - writer.WriteAttributeString("Overridable", "no");
976 - }
977 - if ((this.overridableField == YesNoType.yes))
978 - {
979 - writer.WriteAttributeString("Overridable", "yes");
980 - }
981 - }
982 - if (this.sequenceFieldSet)
983 - {
984 - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
985 - }
986 - if (this.suppressFieldSet)
987 - {
988 - if ((this.suppressField == YesNoType.no))
989 - {
990 - writer.WriteAttributeString("Suppress", "no");
991 - }
992 - if ((this.suppressField == YesNoType.yes))
993 - {
994 - writer.WriteAttributeString("Suppress", "yes");
995 - }
996 - }
997 - if (this.contentFieldSet)
998 - {
999 - writer.WriteString(this.contentField);
1000 - }
1001 - }
1002 -
1003 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1004 - void ISetAttributes.SetAttribute(string name, string value)
1005 - {
1006 - if (String.IsNullOrEmpty(name))
1007 - {
1008 - throw new ArgumentNullException("name");
1009 - }
1010 - if (("After" == name))
1011 - {
1012 - this.afterField = value;
1013 - this.afterFieldSet = true;
1014 - }
1015 - if (("Before" == name))
1016 - {
1017 - this.beforeField = value;
1018 - this.beforeFieldSet = true;
1019 - }
1020 - if (("Overridable" == name))
1021 - {
1022 - this.overridableField = Enums.ParseYesNoType(value);
1023 - this.overridableFieldSet = true;
1024 - }
1025 - if (("Sequence" == name))
1026 - {
1027 - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1028 - this.sequenceFieldSet = true;
1029 - }
1030 - if (("Suppress" == name))
1031 - {
1032 - this.suppressField = Enums.ParseYesNoType(value);
1033 - this.suppressFieldSet = true;
1034 - }
1035 - if (("Content" == name))
1036 - {
1037 - this.contentField = value;
1038 - this.contentFieldSet = true;
1039 - }
1040 - }
1041 - }
1042 -
1043 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1044 - public abstract class ActionSequenceType : ISchemaElement, ISetAttributes
1045 - {
1046 -
1047 - private int sequenceField;
1048 -
1049 - private bool sequenceFieldSet;
1050 -
1051 - private YesNoType suppressField;
1052 -
1053 - private bool suppressFieldSet;
1054 -
1055 - private string contentField;
1056 -
1057 - private bool contentFieldSet;
1058 -
1059 - private ISchemaElement parentElement;
1060 -
1061 - /// <summary>
1062 - /// A value used to indicate the position of this action in a sequence.
1063 - /// </summary>
1064 - public int Sequence
1065 - {
1066 - get
1067 - {
1068 - return this.sequenceField;
1069 - }
1070 - set
1071 - {
1072 - this.sequenceFieldSet = true;
1073 - this.sequenceField = value;
1074 - }
1075 - }
1076 -
1077 - /// <summary>
1078 - /// If yes, this action will not occur.
1079 - /// </summary>
1080 - public YesNoType Suppress
1081 - {
1082 - get
1083 - {
1084 - return this.suppressField;
1085 - }
1086 - set
1087 - {
1088 - this.suppressFieldSet = true;
1089 - this.suppressField = value;
1090 - }
1091 - }
1092 -
1093 - public string Content
1094 - {
1095 - get
1096 - {
1097 - return this.contentField;
1098 - }
1099 - set
1100 - {
1101 - this.contentFieldSet = true;
1102 - this.contentField = value;
1103 - }
1104 - }
1105 -
1106 - public virtual ISchemaElement ParentElement
1107 - {
1108 - get
1109 - {
1110 - return this.parentElement;
1111 - }
1112 - set
1113 - {
1114 - this.parentElement = value;
1115 - }
1116 - }
1117 -
1118 - /// <summary>
1119 - /// Processes this element and all child elements into an XmlWriter.
1120 - /// </summary>
1121 - public virtual void OutputXml(XmlWriter writer)
1122 - {
1123 - if ((null == writer))
1124 - {
1125 - throw new ArgumentNullException("writer");
1126 - }
1127 - if (this.sequenceFieldSet)
1128 - {
1129 - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
1130 - }
1131 - if (this.suppressFieldSet)
1132 - {
1133 - if ((this.suppressField == YesNoType.no))
1134 - {
1135 - writer.WriteAttributeString("Suppress", "no");
1136 - }
1137 - if ((this.suppressField == YesNoType.yes))
1138 - {
1139 - writer.WriteAttributeString("Suppress", "yes");
1140 - }
1141 - }
1142 - if (this.contentFieldSet)
1143 - {
1144 - writer.WriteString(this.contentField);
1145 - }
1146 - }
1147 -
1148 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1149 - void ISetAttributes.SetAttribute(string name, string value)
1150 - {
1151 - if (String.IsNullOrEmpty(name))
1152 - {
1153 - throw new ArgumentNullException("name");
1154 - }
1155 - if (("Sequence" == name))
1156 - {
1157 - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1158 - this.sequenceFieldSet = true;
1159 - }
1160 - if (("Suppress" == name))
1161 - {
1162 - this.suppressField = Enums.ParseYesNoType(value);
1163 - this.suppressFieldSet = true;
1164 - }
1165 - if (("Content" == name))
1166 - {
1167 - this.contentField = value;
1168 - this.contentFieldSet = true;
1169 - }
1170 - }
1171 - }
1172 -
1173 - /// <summary>
1174 - /// This is the top-level container element for every wxs file. Among the possible children,
1175 - /// the Bundle, Product, Module, Patch, and PatchCreation elements are analogous to the main function in a C program.
1176 - /// There can only be one of these present when linking occurs. Product compiles into an msi file,
1177 - /// Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element
1178 - /// is an atomic unit which ultimately links into either a Product, Module, or PatchCreation. The
1179 - /// Fragment can either be completely included or excluded during linking.
1180 - /// </summary>
1181 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1182 - public class Wix : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1183 - {
1184 -
1185 - private ElementCollection children;
1186 -
1187 - private string requiredVersionField;
1188 -
1189 - private bool requiredVersionFieldSet;
1190 -
1191 - private ISchemaElement parentElement;
1192 -
1193 - public Wix()
1194 - {
1195 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1196 - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
1197 - ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Choice);
1198 - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Bundle)));
1199 - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Product)));
1200 - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Module)));
1201 - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Patch)));
1202 - childCollection1.AddCollection(childCollection2);
1203 - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(Fragment)));
1204 - childCollection0.AddCollection(childCollection1);
1205 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCreation)));
1206 - this.children = childCollection0;
1207 - }
1208 -
1209 - public virtual IEnumerable Children
1210 - {
1211 - get
1212 - {
1213 - return this.children;
1214 - }
1215 - }
1216 -
1217 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1218 - public virtual IEnumerable this[System.Type childType]
1219 - {
1220 - get
1221 - {
1222 - return this.children.Filter(childType);
1223 - }
1224 - }
1225 -
1226 - /// <summary>
1227 - /// Required version of the WiX toolset to compile this input file.
1228 - /// </summary>
1229 - public string RequiredVersion
1230 - {
1231 - get
1232 - {
1233 - return this.requiredVersionField;
1234 - }
1235 - set
1236 - {
1237 - this.requiredVersionFieldSet = true;
1238 - this.requiredVersionField = value;
1239 - }
1240 - }
1241 -
1242 - public virtual ISchemaElement ParentElement
1243 - {
1244 - get
1245 - {
1246 - return this.parentElement;
1247 - }
1248 - set
1249 - {
1250 - this.parentElement = value;
1251 - }
1252 - }
1253 -
1254 - public virtual void AddChild(ISchemaElement child)
1255 - {
1256 - if ((null == child))
1257 - {
1258 - throw new ArgumentNullException("child");
1259 - }
1260 - this.children.AddElement(child);
1261 - child.ParentElement = this;
1262 - }
1263 -
1264 - public virtual void RemoveChild(ISchemaElement child)
1265 - {
1266 - if ((null == child))
1267 - {
1268 - throw new ArgumentNullException("child");
1269 - }
1270 - this.children.RemoveElement(child);
1271 - child.ParentElement = null;
1272 - }
1273 -
1274 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1275 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1276 - ISchemaElement ICreateChildren.CreateChild(string childName)
1277 - {
1278 - if (String.IsNullOrEmpty(childName))
1279 - {
1280 - throw new ArgumentNullException("childName");
1281 - }
1282 - ISchemaElement childValue = null;
1283 - if (("Bundle" == childName))
1284 - {
1285 - childValue = new Bundle();
1286 - }
1287 - if (("Product" == childName))
1288 - {
1289 - childValue = new Product();
1290 - }
1291 - if (("Module" == childName))
1292 - {
1293 - childValue = new Module();
1294 - }
1295 - if (("Patch" == childName))
1296 - {
1297 - childValue = new Patch();
1298 - }
1299 - if (("Fragment" == childName))
1300 - {
1301 - childValue = new Fragment();
1302 - }
1303 - if (("PatchCreation" == childName))
1304 - {
1305 - childValue = new PatchCreation();
1306 - }
1307 - if ((null == childValue))
1308 - {
1309 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1310 - }
1311 - return childValue;
1312 - }
1313 -
1314 - /// <summary>
1315 - /// Processes this element and all child elements into an XmlWriter.
1316 - /// </summary>
1317 - public virtual void OutputXml(XmlWriter writer)
1318 - {
1319 - if ((null == writer))
1320 - {
1321 - throw new ArgumentNullException("writer");
1322 - }
1323 - writer.WriteStartElement("Wix", "http://wixtoolset.org/schemas/v4/wxs");
1324 - if (this.requiredVersionFieldSet)
1325 - {
1326 - writer.WriteAttributeString("RequiredVersion", this.requiredVersionField);
1327 - }
1328 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1329 - {
1330 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1331 - childElement.OutputXml(writer);
1332 - }
1333 - writer.WriteEndElement();
1334 - }
1335 -
1336 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1337 - void ISetAttributes.SetAttribute(string name, string value)
1338 - {
1339 - if (String.IsNullOrEmpty(name))
1340 - {
1341 - throw new ArgumentNullException("name");
1342 - }
1343 - if (("RequiredVersion" == name))
1344 - {
1345 - this.requiredVersionField = value;
1346 - this.requiredVersionFieldSet = true;
1347 - }
1348 - }
1349 - }
1350 -
1351 - /// <summary>
1352 - /// This is the top-level container element for every wxi file.
1353 - /// </summary>
1354 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1355 - public class Include : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1356 - {
1357 -
1358 - private ElementCollection children;
1359 -
1360 - private ISchemaElement parentElement;
1361 -
1362 - public Include()
1363 - {
1364 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1365 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1366 - this.children = childCollection0;
1367 - }
1368 -
1369 - public virtual IEnumerable Children
1370 - {
1371 - get
1372 - {
1373 - return this.children;
1374 - }
1375 - }
1376 -
1377 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1378 - public virtual IEnumerable this[System.Type childType]
1379 - {
1380 - get
1381 - {
1382 - return this.children.Filter(childType);
1383 - }
1384 - }
1385 -
1386 - public virtual ISchemaElement ParentElement
1387 - {
1388 - get
1389 - {
1390 - return this.parentElement;
1391 - }
1392 - set
1393 - {
1394 - this.parentElement = value;
1395 - }
1396 - }
1397 -
1398 - public virtual void AddChild(ISchemaElement child)
1399 - {
1400 - if ((null == child))
1401 - {
1402 - throw new ArgumentNullException("child");
1403 - }
1404 - this.children.AddElement(child);
1405 - child.ParentElement = this;
1406 - }
1407 -
1408 - public virtual void RemoveChild(ISchemaElement child)
1409 - {
1410 - if ((null == child))
1411 - {
1412 - throw new ArgumentNullException("child");
1413 - }
1414 - this.children.RemoveElement(child);
1415 - child.ParentElement = null;
1416 - }
1417 -
1418 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1419 - ISchemaElement ICreateChildren.CreateChild(string childName)
1420 - {
1421 - if (String.IsNullOrEmpty(childName))
1422 - {
1423 - throw new ArgumentNullException("childName");
1424 - }
1425 - ISchemaElement childValue = null;
1426 - if ((null == childValue))
1427 - {
1428 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1429 - }
1430 - return childValue;
1431 - }
1432 -
1433 - /// <summary>
1434 - /// Processes this element and all child elements into an XmlWriter.
1435 - /// </summary>
1436 - public virtual void OutputXml(XmlWriter writer)
1437 - {
1438 - if ((null == writer))
1439 - {
1440 - throw new ArgumentNullException("writer");
1441 - }
1442 - writer.WriteStartElement("Include", "http://wixtoolset.org/schemas/v4/wxs");
1443 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1444 - {
1445 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1446 - childElement.OutputXml(writer);
1447 - }
1448 - writer.WriteEndElement();
1449 - }
1450 -
1451 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1452 - void ISetAttributes.SetAttribute(string name, string value)
1453 - {
1454 - if (String.IsNullOrEmpty(name))
1455 - {
1456 - throw new ArgumentNullException("name");
1457 - }
1458 - }
1459 - }
1460 -
1461 - /// <summary>
1462 - /// The root element for creating bundled packages.
1463 - /// </summary>
1464 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1465 - public class Bundle : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1466 - {
1467 -
1468 - private ElementCollection children;
1469 -
1470 - private string aboutUrlField;
1471 -
1472 - private bool aboutUrlFieldSet;
1473 -
1474 - private string copyrightField;
1475 -
1476 - private bool copyrightFieldSet;
1477 -
1478 - private YesNoDefaultType compressedField;
1479 -
1480 - private bool compressedFieldSet;
1481 -
1482 - private YesNoButtonType disableModifyField;
1483 -
1484 - private bool disableModifyFieldSet;
1485 -
1486 - private YesNoType disableRemoveField;
1487 -
1488 - private bool disableRemoveFieldSet;
1489 -
1490 - private YesNoType disableRepairField;
1491 -
1492 - private bool disableRepairFieldSet;
1493 -
1494 - private string helpTelephoneField;
1495 -
1496 - private bool helpTelephoneFieldSet;
1497 -
1498 - private string helpUrlField;
1499 -
1500 - private bool helpUrlFieldSet;
1501 -
1502 - private string iconSourceFileField;
1503 -
1504 - private bool iconSourceFileFieldSet;
1505 -
1506 - private string manufacturerField;
1507 -
1508 - private bool manufacturerFieldSet;
1509 -
1510 - private string nameField;
1511 -
1512 - private bool nameFieldSet;
1513 -
1514 - private string parentNameField;
1515 -
1516 - private bool parentNameFieldSet;
1517 -
1518 - private string splashScreenSourceFileField;
1519 -
1520 - private bool splashScreenSourceFileFieldSet;
1521 -
1522 - private string tagField;
1523 -
1524 - private bool tagFieldSet;
1525 -
1526 - private string updateUrlField;
1527 -
1528 - private bool updateUrlFieldSet;
1529 -
1530 - private string upgradeCodeField;
1531 -
1532 - private bool upgradeCodeFieldSet;
1533 -
1534 - private string versionField;
1535 -
1536 - private bool versionFieldSet;
1537 -
1538 - private string conditionField;
1539 -
1540 - private bool conditionFieldSet;
1541 -
1542 - private ISchemaElement parentElement;
1543 -
1544 - public Bundle()
1545 - {
1546 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1547 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ApprovedExeForElevation)));
1548 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Log)));
1549 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Catalog)));
1550 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication)));
1551 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef)));
1552 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(OptionalUpdateRegistration)));
1553 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Chain)));
1554 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container)));
1555 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ContainerRef)));
1556 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup)));
1557 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
1558 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle)));
1559 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Update)));
1560 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable)));
1561 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
1562 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1563 - this.children = childCollection0;
1564 - }
1565 -
1566 - public virtual IEnumerable Children
1567 - {
1568 - get
1569 - {
1570 - return this.children;
1571 - }
1572 - }
1573 -
1574 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1575 - public virtual IEnumerable this[System.Type childType]
1576 - {
1577 - get
1578 - {
1579 - return this.children.Filter(childType);
1580 - }
1581 - }
1582 -
1583 - /// <summary>
1584 - /// A URL for more information about the bundle to display in Programs and Features (also
1585 - /// known as Add/Remove Programs).
1586 - /// </summary>
1587 - public string AboutUrl
1588 - {
1589 - get
1590 - {
1591 - return this.aboutUrlField;
1592 - }
1593 - set
1594 - {
1595 - this.aboutUrlFieldSet = true;
1596 - this.aboutUrlField = value;
1597 - }
1598 - }
1599 -
1600 - /// <summary>
1601 - /// The legal copyright found in the version resources of final bundle executable. If
1602 - /// this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.".
1603 - /// </summary>
1604 - public string Copyright
1605 - {
1606 - get
1607 - {
1608 - return this.copyrightField;
1609 - }
1610 - set
1611 - {
1612 - this.copyrightFieldSet = true;
1613 - this.copyrightField = value;
1614 - }
1615 - }
1616 -
1617 - /// <summary>
1618 - /// Whether Packages and Payloads not assigned to a container should be added to the default attached container or if they should be external. The default is yes.
1619 - /// </summary>
1620 - public YesNoDefaultType Compressed
1621 - {
1622 - get
1623 - {
1624 - return this.compressedField;
1625 - }
1626 - set
1627 - {
1628 - this.compressedFieldSet = true;
1629 - this.compressedField = value;
1630 - }
1631 - }
1632 -
1633 - /// <summary>
1634 - /// Determines whether the bundle can be modified via the Programs and Features (also known as
1635 - /// Add/Remove Programs). If the value is "button" then Programs and Features will show a single
1636 - /// "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show
1637 - /// the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown.
1638 - /// See the DisableRemove attribute for information how to not display the bundle in Programs
1639 - /// and Features.
1640 - /// </summary>
1641 - public YesNoButtonType DisableModify
1642 - {
1643 - get
1644 - {
1645 - return this.disableModifyField;
1646 - }
1647 - set
1648 - {
1649 - this.disableModifyFieldSet = true;
1650 - this.disableModifyField = value;
1651 - }
1652 - }
1653 -
1654 - /// <summary>
1655 - /// Determines whether the bundle can be removed via the Programs and Features (also
1656 - /// known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will
1657 - /// not be displayed. The default is "no" which ensures there is an "Uninstall" button to
1658 - /// remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the
1659 - /// bundle will not be displayed in Progams and Features and another mechanism (such as
1660 - /// registering as a related bundle addon) must be used to ensure the bundle can be removed.
1661 - /// </summary>
1662 - public YesNoType DisableRemove
1663 - {
1664 - get
1665 - {
1666 - return this.disableRemoveField;
1667 - }
1668 - set
1669 - {
1670 - this.disableRemoveFieldSet = true;
1671 - this.disableRemoveField = value;
1672 - }
1673 - }
1674 -
1675 - public YesNoType DisableRepair
1676 - {
1677 - get
1678 - {
1679 - return this.disableRepairField;
1680 - }
1681 - set
1682 - {
1683 - this.disableRepairFieldSet = true;
1684 - this.disableRepairField = value;
1685 - }
1686 - }
1687 -
1688 - /// <summary>
1689 - /// A telephone number for help to display in Programs and Features (also known as
1690 - /// Add/Remove Programs).
1691 - /// </summary>
1692 - public string HelpTelephone
1693 - {
1694 - get
1695 - {
1696 - return this.helpTelephoneField;
1697 - }
1698 - set
1699 - {
1700 - this.helpTelephoneFieldSet = true;
1701 - this.helpTelephoneField = value;
1702 - }
1703 - }
1704 -
1705 - /// <summary>
1706 - /// A URL to the help for the bundle to display in Programs and Features (also known as
1707 - /// Add/Remove Programs).
1708 - /// </summary>
1709 - public string HelpUrl
1710 - {
1711 - get
1712 - {
1713 - return this.helpUrlField;
1714 - }
1715 - set
1716 - {
1717 - this.helpUrlFieldSet = true;
1718 - this.helpUrlField = value;
1719 - }
1720 - }
1721 -
1722 - /// <summary>
1723 - /// Path to an icon that will replace the default icon in the final Bundle executable.
1724 - /// This icon will also be displayed in Programs and Features (also known as Add/Remove
1725 - /// Programs).
1726 - /// </summary>
1727 - public string IconSourceFile
1728 - {
1729 - get
1730 - {
1731 - return this.iconSourceFileField;
1732 - }
1733 - set
1734 - {
1735 - this.iconSourceFileFieldSet = true;
1736 - this.iconSourceFileField = value;
1737 - }
1738 - }
1739 -
1740 - /// <summary>
1741 - /// The publisher of the bundle to display in Programs and Features (also known as
1742 - /// Add/Remove Programs).
1743 - /// </summary>
1744 - public string Manufacturer
1745 - {
1746 - get
1747 - {
1748 - return this.manufacturerField;
1749 - }
1750 - set
1751 - {
1752 - this.manufacturerFieldSet = true;
1753 - this.manufacturerField = value;
1754 - }
1755 - }
1756 -
1757 - /// <summary>
1758 - /// The name of the bundle to display in Programs and Features (also known as Add/Remove
1759 - /// Programs). This name can be accessed and overwritten by a BootstrapperApplication
1760 - /// using the WixBundleName bundle variable.
1761 - /// </summary>
1762 - public string Name
1763 - {
1764 - get
1765 - {
1766 - return this.nameField;
1767 - }
1768 - set
1769 - {
1770 - this.nameFieldSet = true;
1771 - this.nameField = value;
1772 - }
1773 - }
1774 -
1775 - /// <summary>
1776 - /// The name of the parent bundle to display in Installed Updates (also known as Add/Remove
1777 - /// Programs). This name is used to nest or group bundles that will appear as updates.
1778 - /// If the parent name does not actually exist, a virtual parent is created automatically.
1779 - /// </summary>
1780 - public string ParentName
1781 - {
1782 - get
1783 - {
1784 - return this.parentNameField;
1785 - }
1786 - set
1787 - {
1788 - this.parentNameFieldSet = true;
1789 - this.parentNameField = value;
1790 - }
1791 - }
1792 -
1793 - /// <summary>
1794 - /// Path to a bitmap that will be shown as the bootstrapper application is being loaded. If this attribute is not specified, no splash screen will be displayed.
1795 - /// </summary>
1796 - public string SplashScreenSourceFile
1797 - {
1798 - get
1799 - {
1800 - return this.splashScreenSourceFileField;
1801 - }
1802 - set
1803 - {
1804 - this.splashScreenSourceFileFieldSet = true;
1805 - this.splashScreenSourceFileField = value;
1806 - }
1807 - }
1808 -
1809 - /// <summary>
1810 - /// Set this string to uniquely identify this bundle to its own BA, and to related bundles. The value of this string only matters to the BA, and its value has no direct effect on engine functionality.
1811 - /// </summary>
1812 - public string Tag
1813 - {
1814 - get
1815 - {
1816 - return this.tagField;
1817 - }
1818 - set
1819 - {
1820 - this.tagFieldSet = true;
1821 - this.tagField = value;
1822 - }
1823 - }
1824 -
1825 - /// <summary>
1826 - /// A URL for updates of the bundle to display in Programs and Features (also
1827 - /// known as Add/Remove Programs).
1828 - /// </summary>
1829 - public string UpdateUrl
1830 - {
1831 - get
1832 - {
1833 - return this.updateUrlField;
1834 - }
1835 - set
1836 - {
1837 - this.updateUrlFieldSet = true;
1838 - this.updateUrlField = value;
1839 - }
1840 - }
1841 -
1842 - /// <summary>
1843 - /// Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the
1844 - /// bundle with the highest version will be installed.
1845 - /// </summary>
1846 - public string UpgradeCode
1847 - {
1848 - get
1849 - {
1850 - return this.upgradeCodeField;
1851 - }
1852 - set
1853 - {
1854 - this.upgradeCodeFieldSet = true;
1855 - this.upgradeCodeField = value;
1856 - }
1857 - }
1858 -
1859 - /// <summary>
1860 - /// The version of the bundle. Newer versions upgrade earlier versions of the bundles
1861 - /// with matching UpgradeCodes. If the bundle is registered in Programs and Features
1862 - /// then this attribute will be displayed in the Programs and Features user interface.
1863 - /// </summary>
1864 - public string Version
1865 - {
1866 - get
1867 - {
1868 - return this.versionField;
1869 - }
1870 - set
1871 - {
1872 - this.versionFieldSet = true;
1873 - this.versionField = value;
1874 - }
1875 - }
1876 -
1877 - /// <summary>
1878 - /// The condition of the bundle. If the condition is not met, the bundle will
1879 - /// refuse to run. Conditions are checked before the bootstrapper application is loaded
1880 - /// (before detect), and thus can only reference built-in variables such as
1881 - /// variables which indicate the version of the OS.
1882 - /// </summary>
1883 - public string Condition
1884 - {
1885 - get
1886 - {
1887 - return this.conditionField;
1888 - }
1889 - set
1890 - {
1891 - this.conditionFieldSet = true;
1892 - this.conditionField = value;
1893 - }
1894 - }
1895 -
1896 - public virtual ISchemaElement ParentElement
1897 - {
1898 - get
1899 - {
1900 - return this.parentElement;
1901 - }
1902 - set
1903 - {
1904 - this.parentElement = value;
1905 - }
1906 - }
1907 -
1908 - public virtual void AddChild(ISchemaElement child)
1909 - {
1910 - if ((null == child))
1911 - {
1912 - throw new ArgumentNullException("child");
1913 - }
1914 - this.children.AddElement(child);
1915 - child.ParentElement = this;
1916 - }
1917 -
1918 - public virtual void RemoveChild(ISchemaElement child)
1919 - {
1920 - if ((null == child))
1921 - {
1922 - throw new ArgumentNullException("child");
1923 - }
1924 - this.children.RemoveElement(child);
1925 - child.ParentElement = null;
1926 - }
1927 -
1928 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1929 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1930 - ISchemaElement ICreateChildren.CreateChild(string childName)
1931 - {
1932 - if (String.IsNullOrEmpty(childName))
1933 - {
1934 - throw new ArgumentNullException("childName");
1935 - }
1936 - ISchemaElement childValue = null;
1937 - if (("ApprovedExeForElevation" == childName))
1938 - {
1939 - childValue = new ApprovedExeForElevation();
1940 - }
1941 - if (("Log" == childName))
1942 - {
1943 - childValue = new Log();
1944 - }
1945 - if (("Catalog" == childName))
1946 - {
1947 - childValue = new Catalog();
1948 - }
1949 - if (("BootstrapperApplication" == childName))
1950 - {
1951 - childValue = new BootstrapperApplication();
1952 - }
1953 - if (("BootstrapperApplicationRef" == childName))
1954 - {
1955 - childValue = new BootstrapperApplicationRef();
1956 - }
1957 - if (("OptionalUpdateRegistration" == childName))
1958 - {
1959 - childValue = new OptionalUpdateRegistration();
1960 - }
1961 - if (("Chain" == childName))
1962 - {
1963 - childValue = new Chain();
1964 - }
1965 - if (("Container" == childName))
1966 - {
1967 - childValue = new Container();
1968 - }
1969 - if (("ContainerRef" == childName))
1970 - {
1971 - childValue = new ContainerRef();
1972 - }
1973 - if (("PayloadGroup" == childName))
1974 - {
1975 - childValue = new PayloadGroup();
1976 - }
1977 - if (("PayloadGroupRef" == childName))
1978 - {
1979 - childValue = new PayloadGroupRef();
1980 - }
1981 - if (("RelatedBundle" == childName))
1982 - {
1983 - childValue = new RelatedBundle();
1984 - }
1985 - if (("Update" == childName))
1986 - {
1987 - childValue = new Update();
1988 - }
1989 - if (("Variable" == childName))
1990 - {
1991 - childValue = new Variable();
1992 - }
1993 - if (("WixVariable" == childName))
1994 - {
1995 - childValue = new WixVariable();
1996 - }
1997 - if ((null == childValue))
1998 - {
1999 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2000 - }
2001 - return childValue;
2002 - }
2003 -
2004 - /// <summary>
2005 - /// Processes this element and all child elements into an XmlWriter.
2006 - /// </summary>
2007 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2008 - public virtual void OutputXml(XmlWriter writer)
2009 - {
2010 - if ((null == writer))
2011 - {
2012 - throw new ArgumentNullException("writer");
2013 - }
2014 - writer.WriteStartElement("Bundle", "http://wixtoolset.org/schemas/v4/wxs");
2015 - if (this.aboutUrlFieldSet)
2016 - {
2017 - writer.WriteAttributeString("AboutUrl", this.aboutUrlField);
2018 - }
2019 - if (this.copyrightFieldSet)
2020 - {
2021 - writer.WriteAttributeString("Copyright", this.copyrightField);
2022 - }
2023 - if (this.compressedFieldSet)
2024 - {
2025 - if ((this.compressedField == YesNoDefaultType.@default))
2026 - {
2027 - writer.WriteAttributeString("Compressed", "default");
2028 - }
2029 - if ((this.compressedField == YesNoDefaultType.no))
2030 - {
2031 - writer.WriteAttributeString("Compressed", "no");
2032 - }
2033 - if ((this.compressedField == YesNoDefaultType.yes))
2034 - {
2035 - writer.WriteAttributeString("Compressed", "yes");
2036 - }
2037 - }
2038 - if (this.disableModifyFieldSet)
2039 - {
2040 - if ((this.disableModifyField == YesNoButtonType.no))
2041 - {
2042 - writer.WriteAttributeString("DisableModify", "no");
2043 - }
2044 - if ((this.disableModifyField == YesNoButtonType.yes))
2045 - {
2046 - writer.WriteAttributeString("DisableModify", "yes");
2047 - }
2048 - if ((this.disableModifyField == YesNoButtonType.button))
2049 - {
2050 - writer.WriteAttributeString("DisableModify", "button");
2051 - }
2052 - }
2053 - if (this.disableRemoveFieldSet)
2054 - {
2055 - if ((this.disableRemoveField == YesNoType.no))
2056 - {
2057 - writer.WriteAttributeString("DisableRemove", "no");
2058 - }
2059 - if ((this.disableRemoveField == YesNoType.yes))
2060 - {
2061 - writer.WriteAttributeString("DisableRemove", "yes");
2062 - }
2063 - }
2064 - if (this.disableRepairFieldSet)
2065 - {
2066 - if ((this.disableRepairField == YesNoType.no))
2067 - {
2068 - writer.WriteAttributeString("DisableRepair", "no");
2069 - }
2070 - if ((this.disableRepairField == YesNoType.yes))
2071 - {
2072 - writer.WriteAttributeString("DisableRepair", "yes");
2073 - }
2074 - }
2075 - if (this.helpTelephoneFieldSet)
2076 - {
2077 - writer.WriteAttributeString("HelpTelephone", this.helpTelephoneField);
2078 - }
2079 - if (this.helpUrlFieldSet)
2080 - {
2081 - writer.WriteAttributeString("HelpUrl", this.helpUrlField);
2082 - }
2083 - if (this.iconSourceFileFieldSet)
2084 - {
2085 - writer.WriteAttributeString("IconSourceFile", this.iconSourceFileField);
2086 - }
2087 - if (this.manufacturerFieldSet)
2088 - {
2089 - writer.WriteAttributeString("Manufacturer", this.manufacturerField);
2090 - }
2091 - if (this.nameFieldSet)
2092 - {
2093 - writer.WriteAttributeString("Name", this.nameField);
2094 - }
2095 - if (this.parentNameFieldSet)
2096 - {
2097 - writer.WriteAttributeString("ParentName", this.parentNameField);
2098 - }
2099 - if (this.splashScreenSourceFileFieldSet)
2100 - {
2101 - writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
2102 - }
2103 - if (this.tagFieldSet)
2104 - {
2105 - writer.WriteAttributeString("Tag", this.tagField);
2106 - }
2107 - if (this.updateUrlFieldSet)
2108 - {
2109 - writer.WriteAttributeString("UpdateUrl", this.updateUrlField);
2110 - }
2111 - if (this.upgradeCodeFieldSet)
2112 - {
2113 - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
2114 - }
2115 - if (this.versionFieldSet)
2116 - {
2117 - writer.WriteAttributeString("Version", this.versionField);
2118 - }
2119 - if (this.conditionFieldSet)
2120 - {
2121 - writer.WriteAttributeString("Condition", this.conditionField);
2122 - }
2123 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2124 - {
2125 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2126 - childElement.OutputXml(writer);
2127 - }
2128 - writer.WriteEndElement();
2129 - }
2130 -
2131 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2132 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2133 - void ISetAttributes.SetAttribute(string name, string value)
2134 - {
2135 - if (String.IsNullOrEmpty(name))
2136 - {
2137 - throw new ArgumentNullException("name");
2138 - }
2139 - if (("AboutUrl" == name))
2140 - {
2141 - this.aboutUrlField = value;
2142 - this.aboutUrlFieldSet = true;
2143 - }
2144 - if (("Copyright" == name))
2145 - {
2146 - this.copyrightField = value;
2147 - this.copyrightFieldSet = true;
2148 - }
2149 - if (("Compressed" == name))
2150 - {
2151 - this.compressedField = Enums.ParseYesNoDefaultType(value);
2152 - this.compressedFieldSet = true;
2153 - }
2154 - if (("DisableModify" == name))
2155 - {
2156 - this.disableModifyField = Enums.ParseYesNoButtonType(value);
2157 - this.disableModifyFieldSet = true;
2158 - }
2159 - if (("DisableRemove" == name))
2160 - {
2161 - this.disableRemoveField = Enums.ParseYesNoType(value);
2162 - this.disableRemoveFieldSet = true;
2163 - }
2164 - if (("DisableRepair" == name))
2165 - {
2166 - this.disableRepairField = Enums.ParseYesNoType(value);
2167 - this.disableRepairFieldSet = true;
2168 - }
2169 - if (("HelpTelephone" == name))
2170 - {
2171 - this.helpTelephoneField = value;
2172 - this.helpTelephoneFieldSet = true;
2173 - }
2174 - if (("HelpUrl" == name))
2175 - {
2176 - this.helpUrlField = value;
2177 - this.helpUrlFieldSet = true;
2178 - }
2179 - if (("IconSourceFile" == name))
2180 - {
2181 - this.iconSourceFileField = value;
2182 - this.iconSourceFileFieldSet = true;
2183 - }
2184 - if (("Manufacturer" == name))
2185 - {
2186 - this.manufacturerField = value;
2187 - this.manufacturerFieldSet = true;
2188 - }
2189 - if (("Name" == name))
2190 - {
2191 - this.nameField = value;
2192 - this.nameFieldSet = true;
2193 - }
2194 - if (("ParentName" == name))
2195 - {
2196 - this.parentNameField = value;
2197 - this.parentNameFieldSet = true;
2198 - }
2199 - if (("SplashScreenSourceFile" == name))
2200 - {
2201 - this.splashScreenSourceFileField = value;
2202 - this.splashScreenSourceFileFieldSet = true;
2203 - }
2204 - if (("Tag" == name))
2205 - {
2206 - this.tagField = value;
2207 - this.tagFieldSet = true;
2208 - }
2209 - if (("UpdateUrl" == name))
2210 - {
2211 - this.updateUrlField = value;
2212 - this.updateUrlFieldSet = true;
2213 - }
2214 - if (("UpgradeCode" == name))
2215 - {
2216 - this.upgradeCodeField = value;
2217 - this.upgradeCodeFieldSet = true;
2218 - }
2219 - if (("Version" == name))
2220 - {
2221 - this.versionField = value;
2222 - this.versionFieldSet = true;
2223 - }
2224 - if (("Condition" == name))
2225 - {
2226 - this.conditionField = value;
2227 - this.conditionFieldSet = true;
2228 - }
2229 - }
2230 - }
2231 -
2232 - /// <summary>
2233 - /// Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location.
2234 - /// </summary>
2235 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2236 - public class ApprovedExeForElevation : ISchemaElement, ISetAttributes
2237 - {
2238 -
2239 - private string idField;
2240 -
2241 - private bool idFieldSet;
2242 -
2243 - private string keyField;
2244 -
2245 - private bool keyFieldSet;
2246 -
2247 - private string valueField;
2248 -
2249 - private bool valueFieldSet;
2250 -
2251 - private YesNoType win64Field;
2252 -
2253 - private bool win64FieldSet;
2254 -
2255 - private ISchemaElement parentElement;
2256 -
2257 - /// <summary>
2258 - /// The identifier of the ApprovedExeForElevation element.
2259 - /// </summary>
2260 - public string Id
2261 - {
2262 - get
2263 - {
2264 - return this.idField;
2265 - }
2266 - set
2267 - {
2268 - this.idFieldSet = true;
2269 - this.idField = value;
2270 - }
2271 - }
2272 -
2273 - /// <summary>
2274 - /// The key path.
2275 - /// For security purposes, the root key will be HKLM and Variables are not supported.
2276 - /// </summary>
2277 - public string Key
2278 - {
2279 - get
2280 - {
2281 - return this.keyField;
2282 - }
2283 - set
2284 - {
2285 - this.keyFieldSet = true;
2286 - this.keyField = value;
2287 - }
2288 - }
2289 -
2290 - /// <summary>
2291 - /// The value name.
2292 - /// For security purposes, Variables are not supported.
2293 - /// </summary>
2294 - public string Value
2295 - {
2296 - get
2297 - {
2298 - return this.valueField;
2299 - }
2300 - set
2301 - {
2302 - this.valueFieldSet = true;
2303 - this.valueField = value;
2304 - }
2305 - }
2306 -
2307 - /// <summary>
2308 - /// Instructs the search to look in the 64-bit registry when the value is 'yes'.
2309 - /// When the value is 'no', the search looks in the 32-bit registry.
2310 - /// The default value is 'no'.
2311 - /// </summary>
2312 - public YesNoType Win64
2313 - {
2314 - get
2315 - {
2316 - return this.win64Field;
2317 - }
2318 - set
2319 - {
2320 - this.win64FieldSet = true;
2321 - this.win64Field = value;
2322 - }
2323 - }
2324 -
2325 - public virtual ISchemaElement ParentElement
2326 - {
2327 - get
2328 - {
2329 - return this.parentElement;
2330 - }
2331 - set
2332 - {
2333 - this.parentElement = value;
2334 - }
2335 - }
2336 -
2337 - /// <summary>
2338 - /// Processes this element and all child elements into an XmlWriter.
2339 - /// </summary>
2340 - public virtual void OutputXml(XmlWriter writer)
2341 - {
2342 - if ((null == writer))
2343 - {
2344 - throw new ArgumentNullException("writer");
2345 - }
2346 - writer.WriteStartElement("ApprovedExeForElevation", "http://wixtoolset.org/schemas/v4/wxs");
2347 - if (this.idFieldSet)
2348 - {
2349 - writer.WriteAttributeString("Id", this.idField);
2350 - }
2351 - if (this.keyFieldSet)
2352 - {
2353 - writer.WriteAttributeString("Key", this.keyField);
2354 - }
2355 - if (this.valueFieldSet)
2356 - {
2357 - writer.WriteAttributeString("Value", this.valueField);
2358 - }
2359 - if (this.win64FieldSet)
2360 - {
2361 - if ((this.win64Field == YesNoType.no))
2362 - {
2363 - writer.WriteAttributeString("Win64", "no");
2364 - }
2365 - if ((this.win64Field == YesNoType.yes))
2366 - {
2367 - writer.WriteAttributeString("Win64", "yes");
2368 - }
2369 - }
2370 - writer.WriteEndElement();
2371 - }
2372 -
2373 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2374 - void ISetAttributes.SetAttribute(string name, string value)
2375 - {
2376 - if (String.IsNullOrEmpty(name))
2377 - {
2378 - throw new ArgumentNullException("name");
2379 - }
2380 - if (("Id" == name))
2381 - {
2382 - this.idField = value;
2383 - this.idFieldSet = true;
2384 - }
2385 - if (("Key" == name))
2386 - {
2387 - this.keyField = value;
2388 - this.keyFieldSet = true;
2389 - }
2390 - if (("Value" == name))
2391 - {
2392 - this.valueField = value;
2393 - this.valueFieldSet = true;
2394 - }
2395 - if (("Win64" == name))
2396 - {
2397 - this.win64Field = Enums.ParseYesNoType(value);
2398 - this.win64FieldSet = true;
2399 - }
2400 - }
2401 - }
2402 -
2403 - /// <summary>
2404 - /// Overrides the default log settings for a bundle.
2405 - /// </summary>
2406 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2407 - public class Log : ISchemaElement, ISetAttributes
2408 - {
2409 -
2410 - private YesNoType disableField;
2411 -
2412 - private bool disableFieldSet;
2413 -
2414 - private string pathVariableField;
2415 -
2416 - private bool pathVariableFieldSet;
2417 -
2418 - private string prefixField;
2419 -
2420 - private bool prefixFieldSet;
2421 -
2422 - private string extensionField;
2423 -
2424 - private bool extensionFieldSet;
2425 -
2426 - private ISchemaElement parentElement;
2427 -
2428 - /// <summary>
2429 - /// Disables the default logging in the Bundle. The end user can still generate a
2430 - /// log file by specifying the "-l" command-line argument when installing the
2431 - /// Bundle.
2432 - /// </summary>
2433 - public YesNoType Disable
2434 - {
2435 - get
2436 - {
2437 - return this.disableField;
2438 - }
2439 - set
2440 - {
2441 - this.disableFieldSet = true;
2442 - this.disableField = value;
2443 - }
2444 - }
2445 -
2446 - /// <summary>
2447 - /// Name of a Variable that will hold the path to the log file. An empty value
2448 - /// will cause the variable to not be set. The default is "WixBundleLog".
2449 - /// </summary>
2450 - public string PathVariable
2451 - {
2452 - get
2453 - {
2454 - return this.pathVariableField;
2455 - }
2456 - set
2457 - {
2458 - this.pathVariableFieldSet = true;
2459 - this.pathVariableField = value;
2460 - }
2461 - }
2462 -
2463 - /// <summary>
2464 - /// File name and optionally a relative path to use as the prefix for the log file. The
2465 - /// default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value
2466 - /// "Setup".
2467 - /// </summary>
2468 - public string Prefix
2469 - {
2470 - get
2471 - {
2472 - return this.prefixField;
2473 - }
2474 - set
2475 - {
2476 - this.prefixFieldSet = true;
2477 - this.prefixField = value;
2478 - }
2479 - }
2480 -
2481 - /// <summary>
2482 - /// The extension to use for the log. The default is ".log".
2483 - /// </summary>
2484 - public string Extension
2485 - {
2486 - get
2487 - {
2488 - return this.extensionField;
2489 - }
2490 - set
2491 - {
2492 - this.extensionFieldSet = true;
2493 - this.extensionField = value;
2494 - }
2495 - }
2496 -
2497 - public virtual ISchemaElement ParentElement
2498 - {
2499 - get
2500 - {
2501 - return this.parentElement;
2502 - }
2503 - set
2504 - {
2505 - this.parentElement = value;
2506 - }
2507 - }
2508 -
2509 - /// <summary>
2510 - /// Processes this element and all child elements into an XmlWriter.
2511 - /// </summary>
2512 - public virtual void OutputXml(XmlWriter writer)
2513 - {
2514 - if ((null == writer))
2515 - {
2516 - throw new ArgumentNullException("writer");
2517 - }
2518 - writer.WriteStartElement("Log", "http://wixtoolset.org/schemas/v4/wxs");
2519 - if (this.disableFieldSet)
2520 - {
2521 - if ((this.disableField == YesNoType.no))
2522 - {
2523 - writer.WriteAttributeString("Disable", "no");
2524 - }
2525 - if ((this.disableField == YesNoType.yes))
2526 - {
2527 - writer.WriteAttributeString("Disable", "yes");
2528 - }
2529 - }
2530 - if (this.pathVariableFieldSet)
2531 - {
2532 - writer.WriteAttributeString("PathVariable", this.pathVariableField);
2533 - }
2534 - if (this.prefixFieldSet)
2535 - {
2536 - writer.WriteAttributeString("Prefix", this.prefixField);
2537 - }
2538 - if (this.extensionFieldSet)
2539 - {
2540 - writer.WriteAttributeString("Extension", this.extensionField);
2541 - }
2542 - writer.WriteEndElement();
2543 - }
2544 -
2545 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2546 - void ISetAttributes.SetAttribute(string name, string value)
2547 - {
2548 - if (String.IsNullOrEmpty(name))
2549 - {
2550 - throw new ArgumentNullException("name");
2551 - }
2552 - if (("Disable" == name))
2553 - {
2554 - this.disableField = Enums.ParseYesNoType(value);
2555 - this.disableFieldSet = true;
2556 - }
2557 - if (("PathVariable" == name))
2558 - {
2559 - this.pathVariableField = value;
2560 - this.pathVariableFieldSet = true;
2561 - }
2562 - if (("Prefix" == name))
2563 - {
2564 - this.prefixField = value;
2565 - this.prefixFieldSet = true;
2566 - }
2567 - if (("Extension" == name))
2568 - {
2569 - this.extensionField = value;
2570 - this.extensionFieldSet = true;
2571 - }
2572 - }
2573 - }
2574 -
2575 - /// <summary>
2576 - /// Specify one or more catalog files that will be used to verify the contents of the bundle.
2577 - /// </summary>
2578 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2579 - public class Catalog : ISchemaElement, ISetAttributes
2580 - {
2581 -
2582 - private string idField;
2583 -
2584 - private bool idFieldSet;
2585 -
2586 - private string sourceFileField;
2587 -
2588 - private bool sourceFileFieldSet;
2589 -
2590 - private ISchemaElement parentElement;
2591 -
2592 - /// <summary>
2593 - /// The identifier of the catalog element.
2594 - /// </summary>
2595 - public string Id
2596 - {
2597 - get
2598 - {
2599 - return this.idField;
2600 - }
2601 - set
2602 - {
2603 - this.idFieldSet = true;
2604 - this.idField = value;
2605 - }
2606 - }
2607 -
2608 - /// <summary>
2609 - /// The catalog file
2610 - /// </summary>
2611 - public string SourceFile
2612 - {
2613 - get
2614 - {
2615 - return this.sourceFileField;
2616 - }
2617 - set
2618 - {
2619 - this.sourceFileFieldSet = true;
2620 - this.sourceFileField = value;
2621 - }
2622 - }
2623 -
2624 - public virtual ISchemaElement ParentElement
2625 - {
2626 - get
2627 - {
2628 - return this.parentElement;
2629 - }
2630 - set
2631 - {
2632 - this.parentElement = value;
2633 - }
2634 - }
2635 -
2636 - /// <summary>
2637 - /// Processes this element and all child elements into an XmlWriter.
2638 - /// </summary>
2639 - public virtual void OutputXml(XmlWriter writer)
2640 - {
2641 - if ((null == writer))
2642 - {
2643 - throw new ArgumentNullException("writer");
2644 - }
2645 - writer.WriteStartElement("Catalog", "http://wixtoolset.org/schemas/v4/wxs");
2646 - if (this.idFieldSet)
2647 - {
2648 - writer.WriteAttributeString("Id", this.idField);
2649 - }
2650 - if (this.sourceFileFieldSet)
2651 - {
2652 - writer.WriteAttributeString("SourceFile", this.sourceFileField);
2653 - }
2654 - writer.WriteEndElement();
2655 - }
2656 -
2657 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2658 - void ISetAttributes.SetAttribute(string name, string value)
2659 - {
2660 - if (String.IsNullOrEmpty(name))
2661 - {
2662 - throw new ArgumentNullException("name");
2663 - }
2664 - if (("Id" == name))
2665 - {
2666 - this.idField = value;
2667 - this.idFieldSet = true;
2668 - }
2669 - if (("SourceFile" == name))
2670 - {
2671 - this.sourceFileField = value;
2672 - this.sourceFileFieldSet = true;
2673 - }
2674 - }
2675 - }
2676 -
2677 - /// <summary>
2678 - /// Contains all the relevant information about the setup UI.
2679 - /// </summary>
2680 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2681 - public class BootstrapperApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2682 - {
2683 -
2684 - private ElementCollection children;
2685 -
2686 - private string idField;
2687 -
2688 - private bool idFieldSet;
2689 -
2690 - private string sourceFileField;
2691 -
2692 - private bool sourceFileFieldSet;
2693 -
2694 - private string nameField;
2695 -
2696 - private bool nameFieldSet;
2697 -
2698 - private ISchemaElement parentElement;
2699 -
2700 - public BootstrapperApplication()
2701 - {
2702 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2703 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2704 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2705 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2706 - this.children = childCollection0;
2707 - }
2708 -
2709 - public virtual IEnumerable Children
2710 - {
2711 - get
2712 - {
2713 - return this.children;
2714 - }
2715 - }
2716 -
2717 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2718 - public virtual IEnumerable this[System.Type childType]
2719 - {
2720 - get
2721 - {
2722 - return this.children.Filter(childType);
2723 - }
2724 - }
2725 -
2726 - /// <summary>
2727 - /// The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element.
2728 - /// </summary>
2729 - public string Id
2730 - {
2731 - get
2732 - {
2733 - return this.idField;
2734 - }
2735 - set
2736 - {
2737 - this.idFieldSet = true;
2738 - this.idField = value;
2739 - }
2740 - }
2741 -
2742 - /// <summary>
2743 - /// The DLL with the bootstrapper application entry function.
2744 - /// </summary>
2745 - public string SourceFile
2746 - {
2747 - get
2748 - {
2749 - return this.sourceFileField;
2750 - }
2751 - set
2752 - {
2753 - this.sourceFileFieldSet = true;
2754 - this.sourceFileField = value;
2755 - }
2756 - }
2757 -
2758 - /// <summary>
2759 - /// The relative destination path and file name for the bootstrapper application DLL. The default is the source file name. Use this attribute to rename the bootstrapper application DLL or extract it into a subfolder. The use of '..' directories is not allowed.
2760 - /// </summary>
2761 - public string Name
2762 - {
2763 - get
2764 - {
2765 - return this.nameField;
2766 - }
2767 - set
2768 - {
2769 - this.nameFieldSet = true;
2770 - this.nameField = value;
2771 - }
2772 - }
2773 -
2774 - public virtual ISchemaElement ParentElement
2775 - {
2776 - get
2777 - {
2778 - return this.parentElement;
2779 - }
2780 - set
2781 - {
2782 - this.parentElement = value;
2783 - }
2784 - }
2785 -
2786 - public virtual void AddChild(ISchemaElement child)
2787 - {
2788 - if ((null == child))
2789 - {
2790 - throw new ArgumentNullException("child");
2791 - }
2792 - this.children.AddElement(child);
2793 - child.ParentElement = this;
2794 - }
2795 -
2796 - public virtual void RemoveChild(ISchemaElement child)
2797 - {
2798 - if ((null == child))
2799 - {
2800 - throw new ArgumentNullException("child");
2801 - }
2802 - this.children.RemoveElement(child);
2803 - child.ParentElement = null;
2804 - }
2805 -
2806 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2807 - ISchemaElement ICreateChildren.CreateChild(string childName)
2808 - {
2809 - if (String.IsNullOrEmpty(childName))
2810 - {
2811 - throw new ArgumentNullException("childName");
2812 - }
2813 - ISchemaElement childValue = null;
2814 - if (("Payload" == childName))
2815 - {
2816 - childValue = new Payload();
2817 - }
2818 - if (("PayloadGroupRef" == childName))
2819 - {
2820 - childValue = new PayloadGroupRef();
2821 - }
2822 - if ((null == childValue))
2823 - {
2824 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2825 - }
2826 - return childValue;
2827 - }
2828 -
2829 - /// <summary>
2830 - /// Processes this element and all child elements into an XmlWriter.
2831 - /// </summary>
2832 - public virtual void OutputXml(XmlWriter writer)
2833 - {
2834 - if ((null == writer))
2835 - {
2836 - throw new ArgumentNullException("writer");
2837 - }
2838 - writer.WriteStartElement("BootstrapperApplication", "http://wixtoolset.org/schemas/v4/wxs");
2839 - if (this.idFieldSet)
2840 - {
2841 - writer.WriteAttributeString("Id", this.idField);
2842 - }
2843 - if (this.sourceFileFieldSet)
2844 - {
2845 - writer.WriteAttributeString("SourceFile", this.sourceFileField);
2846 - }
2847 - if (this.nameFieldSet)
2848 - {
2849 - writer.WriteAttributeString("Name", this.nameField);
2850 - }
2851 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2852 - {
2853 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2854 - childElement.OutputXml(writer);
2855 - }
2856 - writer.WriteEndElement();
2857 - }
2858 -
2859 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2860 - void ISetAttributes.SetAttribute(string name, string value)
2861 - {
2862 - if (String.IsNullOrEmpty(name))
2863 - {
2864 - throw new ArgumentNullException("name");
2865 - }
2866 - if (("Id" == name))
2867 - {
2868 - this.idField = value;
2869 - this.idFieldSet = true;
2870 - }
2871 - if (("SourceFile" == name))
2872 - {
2873 - this.sourceFileField = value;
2874 - this.sourceFileFieldSet = true;
2875 - }
2876 - if (("Name" == name))
2877 - {
2878 - this.nameField = value;
2879 - this.nameFieldSet = true;
2880 - }
2881 - }
2882 - }
2883 -
2884 - /// <summary>
2885 - /// Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application.
2886 - /// </summary>
2887 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2888 - public class BootstrapperApplicationRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2889 - {
2890 -
2891 - private ElementCollection children;
2892 -
2893 - private string idField;
2894 -
2895 - private bool idFieldSet;
2896 -
2897 - private ISchemaElement parentElement;
2898 -
2899 - public BootstrapperApplicationRef()
2900 - {
2901 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2902 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2903 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2904 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2905 - this.children = childCollection0;
2906 - }
2907 -
2908 - public virtual IEnumerable Children
2909 - {
2910 - get
2911 - {
2912 - return this.children;
2913 - }
2914 - }
2915 -
2916 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2917 - public virtual IEnumerable this[System.Type childType]
2918 - {
2919 - get
2920 - {
2921 - return this.children.Filter(childType);
2922 - }
2923 - }
2924 -
2925 - /// <summary>
2926 - /// The identifier of the BootstrapperApplication element to reference.
2927 - /// </summary>
2928 - public string Id
2929 - {
2930 - get
2931 - {
2932 - return this.idField;
2933 - }
2934 - set
2935 - {
2936 - this.idFieldSet = true;
2937 - this.idField = value;
2938 - }
2939 - }
2940 -
2941 - public virtual ISchemaElement ParentElement
2942 - {
2943 - get
2944 - {
2945 - return this.parentElement;
2946 - }
2947 - set
2948 - {
2949 - this.parentElement = value;
2950 - }
2951 - }
2952 -
2953 - public virtual void AddChild(ISchemaElement child)
2954 - {
2955 - if ((null == child))
2956 - {
2957 - throw new ArgumentNullException("child");
2958 - }
2959 - this.children.AddElement(child);
2960 - child.ParentElement = this;
2961 - }
2962 -
2963 - public virtual void RemoveChild(ISchemaElement child)
2964 - {
2965 - if ((null == child))
2966 - {
2967 - throw new ArgumentNullException("child");
2968 - }
2969 - this.children.RemoveElement(child);
2970 - child.ParentElement = null;
2971 - }
2972 -
2973 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2974 - ISchemaElement ICreateChildren.CreateChild(string childName)
2975 - {
2976 - if (String.IsNullOrEmpty(childName))
2977 - {
2978 - throw new ArgumentNullException("childName");
2979 - }
2980 - ISchemaElement childValue = null;
2981 - if (("Payload" == childName))
2982 - {
2983 - childValue = new Payload();
2984 - }
2985 - if (("PayloadGroupRef" == childName))
2986 - {
2987 - childValue = new PayloadGroupRef();
2988 - }
2989 - if ((null == childValue))
2990 - {
2991 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2992 - }
2993 - return childValue;
2994 - }
2995 -
2996 - /// <summary>
2997 - /// Processes this element and all child elements into an XmlWriter.
2998 - /// </summary>
2999 - public virtual void OutputXml(XmlWriter writer)
3000 - {
3001 - if ((null == writer))
3002 - {
3003 - throw new ArgumentNullException("writer");
3004 - }
3005 - writer.WriteStartElement("BootstrapperApplicationRef", "http://wixtoolset.org/schemas/v4/wxs");
3006 - if (this.idFieldSet)
3007 - {
3008 - writer.WriteAttributeString("Id", this.idField);
3009 - }
3010 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3011 - {
3012 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3013 - childElement.OutputXml(writer);
3014 - }
3015 - writer.WriteEndElement();
3016 - }
3017 -
3018 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3019 - void ISetAttributes.SetAttribute(string name, string value)
3020 - {
3021 - if (String.IsNullOrEmpty(name))
3022 - {
3023 - throw new ArgumentNullException("name");
3024 - }
3025 - if (("Id" == name))
3026 - {
3027 - this.idField = value;
3028 - this.idFieldSet = true;
3029 - }
3030 - }
3031 - }
3032 -
3033 - /// <summary>
3034 - /// This element has been deprecated. Use the BootstrapperApplication element instead.
3035 - /// </summary>
3036 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3037 - public class UX : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3038 - {
3039 -
3040 - private ElementCollection children;
3041 -
3042 - private string sourceFileField;
3043 -
3044 - private bool sourceFileFieldSet;
3045 -
3046 - private string nameField;
3047 -
3048 - private bool nameFieldSet;
3049 -
3050 - private string splashScreenSourceFileField;
3051 -
3052 - private bool splashScreenSourceFileFieldSet;
3053 -
3054 - private ISchemaElement parentElement;
3055 -
3056 - public UX()
3057 - {
3058 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3059 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3060 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3061 - this.children = childCollection0;
3062 - }
3063 -
3064 - public virtual IEnumerable Children
3065 - {
3066 - get
3067 - {
3068 - return this.children;
3069 - }
3070 - }
3071 -
3072 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3073 - public virtual IEnumerable this[System.Type childType]
3074 - {
3075 - get
3076 - {
3077 - return this.children.Filter(childType);
3078 - }
3079 - }
3080 -
3081 - /// <summary>
3082 - /// See the BootstrapperApplication instead.
3083 - /// </summary>
3084 - public string SourceFile
3085 - {
3086 - get
3087 - {
3088 - return this.sourceFileField;
3089 - }
3090 - set
3091 - {
3092 - this.sourceFileFieldSet = true;
3093 - this.sourceFileField = value;
3094 - }
3095 - }
3096 -
3097 - /// <summary>
3098 - /// See the BootstrapperApplication instead.
3099 - /// </summary>
3100 - public string Name
3101 - {
3102 - get
3103 - {
3104 - return this.nameField;
3105 - }
3106 - set
3107 - {
3108 - this.nameFieldSet = true;
3109 - this.nameField = value;
3110 - }
3111 - }
3112 -
3113 - /// <summary>
3114 - /// See the BootstrapperApplication instead.
3115 - /// </summary>
3116 - public string SplashScreenSourceFile
3117 - {
3118 - get
3119 - {
3120 - return this.splashScreenSourceFileField;
3121 - }
3122 - set
3123 - {
3124 - this.splashScreenSourceFileFieldSet = true;
3125 - this.splashScreenSourceFileField = value;
3126 - }
3127 - }
3128 -
3129 - public virtual ISchemaElement ParentElement
3130 - {
3131 - get
3132 - {
3133 - return this.parentElement;
3134 - }
3135 - set
3136 - {
3137 - this.parentElement = value;
3138 - }
3139 - }
3140 -
3141 - public virtual void AddChild(ISchemaElement child)
3142 - {
3143 - if ((null == child))
3144 - {
3145 - throw new ArgumentNullException("child");
3146 - }
3147 - this.children.AddElement(child);
3148 - child.ParentElement = this;
3149 - }
3150 -
3151 - public virtual void RemoveChild(ISchemaElement child)
3152 - {
3153 - if ((null == child))
3154 - {
3155 - throw new ArgumentNullException("child");
3156 - }
3157 - this.children.RemoveElement(child);
3158 - child.ParentElement = null;
3159 - }
3160 -
3161 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3162 - ISchemaElement ICreateChildren.CreateChild(string childName)
3163 - {
3164 - if (String.IsNullOrEmpty(childName))
3165 - {
3166 - throw new ArgumentNullException("childName");
3167 - }
3168 - ISchemaElement childValue = null;
3169 - if (("Payload" == childName))
3170 - {
3171 - childValue = new Payload();
3172 - }
3173 - if (("PayloadGroupRef" == childName))
3174 - {
3175 - childValue = new PayloadGroupRef();
3176 - }
3177 - if ((null == childValue))
3178 - {
3179 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3180 - }
3181 - return childValue;
3182 - }
3183 -
3184 - /// <summary>
3185 - /// Processes this element and all child elements into an XmlWriter.
3186 - /// </summary>
3187 - public virtual void OutputXml(XmlWriter writer)
3188 - {
3189 - if ((null == writer))
3190 - {
3191 - throw new ArgumentNullException("writer");
3192 - }
3193 - writer.WriteStartElement("UX", "http://wixtoolset.org/schemas/v4/wxs");
3194 - if (this.sourceFileFieldSet)
3195 - {
3196 - writer.WriteAttributeString("SourceFile", this.sourceFileField);
3197 - }
3198 - if (this.nameFieldSet)
3199 - {
3200 - writer.WriteAttributeString("Name", this.nameField);
3201 - }
3202 - if (this.splashScreenSourceFileFieldSet)
3203 - {
3204 - writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
3205 - }
3206 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3207 - {
3208 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3209 - childElement.OutputXml(writer);
3210 - }
3211 - writer.WriteEndElement();
3212 - }
3213 -
3214 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3215 - void ISetAttributes.SetAttribute(string name, string value)
3216 - {
3217 - if (String.IsNullOrEmpty(name))
3218 - {
3219 - throw new ArgumentNullException("name");
3220 - }
3221 - if (("SourceFile" == name))
3222 - {
3223 - this.sourceFileField = value;
3224 - this.sourceFileFieldSet = true;
3225 - }
3226 - if (("Name" == name))
3227 - {
3228 - this.nameField = value;
3229 - this.nameFieldSet = true;
3230 - }
3231 - if (("SplashScreenSourceFile" == name))
3232 - {
3233 - this.splashScreenSourceFileField = value;
3234 - this.splashScreenSourceFileFieldSet = true;
3235 - }
3236 - }
3237 - }
3238 -
3239 - /// <summary>
3240 - /// Writes additional information to the Windows registry that can be used to detect the bundle.
3241 - /// This registration is intended primarily for update to an existing product.
3242 - /// </summary>
3243 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3244 - public class OptionalUpdateRegistration : ISchemaElement, ISetAttributes
3245 - {
3246 -
3247 - private string manufacturerField;
3248 -
3249 - private bool manufacturerFieldSet;
3250 -
3251 - private string departmentField;
3252 -
3253 - private bool departmentFieldSet;
3254 -
3255 - private string productFamilyField;
3256 -
3257 - private bool productFamilyFieldSet;
3258 -
3259 - private string nameField;
3260 -
3261 - private bool nameFieldSet;
3262 -
3263 - private string classificationField;
3264 -
3265 - private bool classificationFieldSet;
3266 -
3267 - private ISchemaElement parentElement;
3268 -
3269 - /// <summary>
3270 - /// The name of the manufacturer. The default is the Bundle/@Manufacturer attribute,
3271 - /// but may also be a short form, ex: Acme instead of Acme Corporation.
3272 - /// An error is generated at build time if neither attribute is specified.
3273 - /// </summary>
3274 - public string Manufacturer
3275 - {
3276 - get
3277 - {
3278 - return this.manufacturerField;
3279 - }
3280 - set
3281 - {
3282 - this.manufacturerFieldSet = true;
3283 - this.manufacturerField = value;
3284 - }
3285 - }
3286 -
3287 - /// <summary>
3288 - /// The name of the department or division publishing the update bundle.
3289 - /// The PublishingGroup registry value is not written if this attribute is not specified.
3290 - /// </summary>
3291 - public string Department
3292 - {
3293 - get
3294 - {
3295 - return this.departmentField;
3296 - }
3297 - set
3298 - {
3299 - this.departmentFieldSet = true;
3300 - this.departmentField = value;
3301 - }
3302 - }
3303 -
3304 - /// <summary>
3305 - /// The name of the family of products being updated. The default is the Bundle/@ParentName attribute.
3306 - /// The corresponding registry key is not created if neither attribute is specified.
3307 - /// </summary>
3308 - public string ProductFamily
3309 - {
3310 - get
3311 - {
3312 - return this.productFamilyField;
3313 - }
3314 - set
3315 - {
3316 - this.productFamilyFieldSet = true;
3317 - this.productFamilyField = value;
3318 - }
3319 - }
3320 -
3321 - /// <summary>
3322 - /// The name of the bundle. The default is the Bundle/@Name attribute,
3323 - /// but may also be a short form, ex: KB12345 instead of Update to Product (KB12345).
3324 - /// An error is generated at build time if neither attribute is specified.
3325 - /// </summary>
3326 - public string Name
3327 - {
3328 - get
3329 - {
3330 - return this.nameField;
3331 - }
3332 - set
3333 - {
3334 - this.nameFieldSet = true;
3335 - this.nameField = value;
3336 - }
3337 - }
3338 -
3339 - /// <summary>
3340 - /// The release type of the update bundle, such as Update, Security Update, Service Pack, etc.
3341 - /// The default value is Update.
3342 - /// </summary>
3343 - public string Classification
3344 - {
3345 - get
3346 - {
3347 - return this.classificationField;
3348 - }
3349 - set
3350 - {
3351 - this.classificationFieldSet = true;
3352 - this.classificationField = value;
3353 - }
3354 - }
3355 -
3356 - public virtual ISchemaElement ParentElement
3357 - {
3358 - get
3359 - {
3360 - return this.parentElement;
3361 - }
3362 - set
3363 - {
3364 - this.parentElement = value;
3365 - }
3366 - }
3367 -
3368 - /// <summary>
3369 - /// Processes this element and all child elements into an XmlWriter.
3370 - /// </summary>
3371 - public virtual void OutputXml(XmlWriter writer)
3372 - {
3373 - if ((null == writer))
3374 - {
3375 - throw new ArgumentNullException("writer");
3376 - }
3377 - writer.WriteStartElement("OptionalUpdateRegistration", "http://wixtoolset.org/schemas/v4/wxs");
3378 - if (this.manufacturerFieldSet)
3379 - {
3380 - writer.WriteAttributeString("Manufacturer", this.manufacturerField);
3381 - }
3382 - if (this.departmentFieldSet)
3383 - {
3384 - writer.WriteAttributeString("Department", this.departmentField);
3385 - }
3386 - if (this.productFamilyFieldSet)
3387 - {
3388 - writer.WriteAttributeString("ProductFamily", this.productFamilyField);
3389 - }
3390 - if (this.nameFieldSet)
3391 - {
3392 - writer.WriteAttributeString("Name", this.nameField);
3393 - }
3394 - if (this.classificationFieldSet)
3395 - {
3396 - writer.WriteAttributeString("Classification", this.classificationField);
3397 - }
3398 - writer.WriteEndElement();
3399 - }
3400 -
3401 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3402 - void ISetAttributes.SetAttribute(string name, string value)
3403 - {
3404 - if (String.IsNullOrEmpty(name))
3405 - {
3406 - throw new ArgumentNullException("name");
3407 - }
3408 - if (("Manufacturer" == name))
3409 - {
3410 - this.manufacturerField = value;
3411 - this.manufacturerFieldSet = true;
3412 - }
3413 - if (("Department" == name))
3414 - {
3415 - this.departmentField = value;
3416 - this.departmentFieldSet = true;
3417 - }
3418 - if (("ProductFamily" == name))
3419 - {
3420 - this.productFamilyField = value;
3421 - this.productFamilyFieldSet = true;
3422 - }
3423 - if (("Name" == name))
3424 - {
3425 - this.nameField = value;
3426 - this.nameFieldSet = true;
3427 - }
3428 - if (("Classification" == name))
3429 - {
3430 - this.classificationField = value;
3431 - this.classificationFieldSet = true;
3432 - }
3433 - }
3434 - }
3435 -
3436 - /// <summary>
3437 - /// Contains the chain of packages to install.
3438 - /// </summary>
3439 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3440 - public class Chain : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3441 - {
3442 -
3443 - private ElementCollection children;
3444 -
3445 - private YesNoType disableRollbackField;
3446 -
3447 - private bool disableRollbackFieldSet;
3448 -
3449 - private YesNoType disableSystemRestoreField;
3450 -
3451 - private bool disableSystemRestoreFieldSet;
3452 -
3453 - private YesNoType parallelCacheField;
3454 -
3455 - private bool parallelCacheFieldSet;
3456 -
3457 - private ISchemaElement parentElement;
3458 -
3459 - public Chain()
3460 - {
3461 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3462 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage)));
3463 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage)));
3464 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage)));
3465 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage)));
3466 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary)));
3467 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
3468 - this.children = childCollection0;
3469 - }
3470 -
3471 - public virtual IEnumerable Children
3472 - {
3473 - get
3474 - {
3475 - return this.children;
3476 - }
3477 - }
3478 -
3479 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3480 - public virtual IEnumerable this[System.Type childType]
3481 - {
3482 - get
3483 - {
3484 - return this.children.Filter(childType);
3485 - }
3486 - }
3487 -
3488 - /// <summary>
3489 - /// Specifies whether the bundle will attempt to rollback packages
3490 - /// executed in the chain. If "yes" is specified then when a vital
3491 - /// package fails to install only that package will rollback and the
3492 - /// chain will stop with the error. The default is "no" which
3493 - /// indicates all packages executed during the chain will be
3494 - /// rolledback to their previous state when a vital package fails.
3495 - /// </summary>
3496 - public YesNoType DisableRollback
3497 - {
3498 - get
3499 - {
3500 - return this.disableRollbackField;
3501 - }
3502 - set
3503 - {
3504 - this.disableRollbackFieldSet = true;
3505 - this.disableRollbackField = value;
3506 - }
3507 - }
3508 -
3509 - /// <summary>
3510 - /// Specifies whether the bundle will attempt to create a system
3511 - /// restore point when executing the chain. If "yes" is specified then
3512 - /// a system restore point will not be created. The default is "no" which
3513 - /// indicates a system restore point will be created when the bundle is
3514 - /// installed, uninstalled, repaired, modified, etc. If the system restore
3515 - /// point cannot be created, the bundle will log the issue and continue.
3516 - /// </summary>
3517 - public YesNoType DisableSystemRestore
3518 - {
3519 - get
3520 - {
3521 - return this.disableSystemRestoreField;
3522 - }
3523 - set
3524 - {
3525 - this.disableSystemRestoreFieldSet = true;
3526 - this.disableSystemRestoreField = value;
3527 - }
3528 - }
3529 -
3530 - /// <summary>
3531 - /// Specifies whether the bundle will start installing packages
3532 - /// while other packages are still being cached. If "yes",
3533 - /// packages will start executing when a rollback boundary is
3534 - /// encountered. The default is "no" which dictates all packages
3535 - /// must be cached before any packages will start to be installed.
3536 - /// </summary>
3537 - public YesNoType ParallelCache
3538 - {
3539 - get
3540 - {
3541 - return this.parallelCacheField;
3542 - }
3543 - set
3544 - {
3545 - this.parallelCacheFieldSet = true;
3546 - this.parallelCacheField = value;
3547 - }
3548 - }
3549 -
3550 - public virtual ISchemaElement ParentElement
3551 - {
3552 - get
3553 - {
3554 - return this.parentElement;
3555 - }
3556 - set
3557 - {
3558 - this.parentElement = value;
3559 - }
3560 - }
3561 -
3562 - public virtual void AddChild(ISchemaElement child)
3563 - {
3564 - if ((null == child))
3565 - {
3566 - throw new ArgumentNullException("child");
3567 - }
3568 - this.children.AddElement(child);
3569 - child.ParentElement = this;
3570 - }
3571 -
3572 - public virtual void RemoveChild(ISchemaElement child)
3573 - {
3574 - if ((null == child))
3575 - {
3576 - throw new ArgumentNullException("child");
3577 - }
3578 - this.children.RemoveElement(child);
3579 - child.ParentElement = null;
3580 - }
3581 -
3582 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3583 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3584 - ISchemaElement ICreateChildren.CreateChild(string childName)
3585 - {
3586 - if (String.IsNullOrEmpty(childName))
3587 - {
3588 - throw new ArgumentNullException("childName");
3589 - }
3590 - ISchemaElement childValue = null;
3591 - if (("MsiPackage" == childName))
3592 - {
3593 - childValue = new MsiPackage();
3594 - }
3595 - if (("MspPackage" == childName))
3596 - {
3597 - childValue = new MspPackage();
3598 - }
3599 - if (("MsuPackage" == childName))
3600 - {
3601 - childValue = new MsuPackage();
3602 - }
3603 - if (("ExePackage" == childName))
3604 - {
3605 - childValue = new ExePackage();
3606 - }
3607 - if (("RollbackBoundary" == childName))
3608 - {
3609 - childValue = new RollbackBoundary();
3610 - }
3611 - if (("PackageGroupRef" == childName))
3612 - {
3613 - childValue = new PackageGroupRef();
3614 - }
3615 - if ((null == childValue))
3616 - {
3617 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3618 - }
3619 - return childValue;
3620 - }
3621 -
3622 - /// <summary>
3623 - /// Processes this element and all child elements into an XmlWriter.
3624 - /// </summary>
3625 - public virtual void OutputXml(XmlWriter writer)
3626 - {
3627 - if ((null == writer))
3628 - {
3629 - throw new ArgumentNullException("writer");
3630 - }
3631 - writer.WriteStartElement("Chain", "http://wixtoolset.org/schemas/v4/wxs");
3632 - if (this.disableRollbackFieldSet)
3633 - {
3634 - if ((this.disableRollbackField == YesNoType.no))
3635 - {
3636 - writer.WriteAttributeString("DisableRollback", "no");
3637 - }
3638 - if ((this.disableRollbackField == YesNoType.yes))
3639 - {
3640 - writer.WriteAttributeString("DisableRollback", "yes");
3641 - }
3642 - }
3643 - if (this.disableSystemRestoreFieldSet)
3644 - {
3645 - if ((this.disableSystemRestoreField == YesNoType.no))
3646 - {
3647 - writer.WriteAttributeString("DisableSystemRestore", "no");
3648 - }
3649 - if ((this.disableSystemRestoreField == YesNoType.yes))
3650 - {
3651 - writer.WriteAttributeString("DisableSystemRestore", "yes");
3652 - }
3653 - }
3654 - if (this.parallelCacheFieldSet)
3655 - {
3656 - if ((this.parallelCacheField == YesNoType.no))
3657 - {
3658 - writer.WriteAttributeString("ParallelCache", "no");
3659 - }
3660 - if ((this.parallelCacheField == YesNoType.yes))
3661 - {
3662 - writer.WriteAttributeString("ParallelCache", "yes");
3663 - }
3664 - }
3665 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3666 - {
3667 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3668 - childElement.OutputXml(writer);
3669 - }
3670 - writer.WriteEndElement();
3671 - }
3672 -
3673 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3674 - void ISetAttributes.SetAttribute(string name, string value)
3675 - {
3676 - if (String.IsNullOrEmpty(name))
3677 - {
3678 - throw new ArgumentNullException("name");
3679 - }
3680 - if (("DisableRollback" == name))
3681 - {
3682 - this.disableRollbackField = Enums.ParseYesNoType(value);
3683 - this.disableRollbackFieldSet = true;
3684 - }
3685 - if (("DisableSystemRestore" == name))
3686 - {
3687 - this.disableSystemRestoreField = Enums.ParseYesNoType(value);
3688 - this.disableSystemRestoreFieldSet = true;
3689 - }
3690 - if (("ParallelCache" == name))
3691 - {
3692 - this.parallelCacheField = Enums.ParseYesNoType(value);
3693 - this.parallelCacheFieldSet = true;
3694 - }
3695 - }
3696 - }
3697 -
3698 - /// <summary>
3699 - /// Describes a single msi package to install.
3700 - /// </summary>
3701 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3702 - public class MsiPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3703 - {
3704 -
3705 - private ElementCollection children;
3706 -
3707 - private string sourceFileField;
3708 -
3709 - private bool sourceFileFieldSet;
3710 -
3711 - private string nameField;
3712 -
3713 - private bool nameFieldSet;
3714 -
3715 - private string downloadUrlField;
3716 -
3717 - private bool downloadUrlFieldSet;
3718 -
3719 - private string idField;
3720 -
3721 - private bool idFieldSet;
3722 -
3723 - private string afterField;
3724 -
3725 - private bool afterFieldSet;
3726 -
3727 - private string installSizeField;
3728 -
3729 - private bool installSizeFieldSet;
3730 -
3731 - private string installConditionField;
3732 -
3733 - private bool installConditionFieldSet;
3734 -
3735 - private YesNoAlwaysType cacheField;
3736 -
3737 - private bool cacheFieldSet;
3738 -
3739 - private string cacheIdField;
3740 -
3741 - private bool cacheIdFieldSet;
3742 -
3743 - private string displayNameField;
3744 -
3745 - private bool displayNameFieldSet;
3746 -
3747 - private string descriptionField;
3748 -
3749 - private bool descriptionFieldSet;
3750 -
3751 - private string logPathVariableField;
3752 -
3753 - private bool logPathVariableFieldSet;
3754 -
3755 - private string rollbackLogPathVariableField;
3756 -
3757 - private bool rollbackLogPathVariableFieldSet;
3758 -
3759 - private YesNoType permanentField;
3760 -
3761 - private bool permanentFieldSet;
3762 -
3763 - private YesNoType vitalField;
3764 -
3765 - private bool vitalFieldSet;
3766 -
3767 - private YesNoDefaultType compressedField;
3768 -
3769 - private bool compressedFieldSet;
3770 -
3771 - private YesNoType enableSignatureVerificationField;
3772 -
3773 - private bool enableSignatureVerificationFieldSet;
3774 -
3775 - private YesNoType enableFeatureSelectionField;
3776 -
3777 - private bool enableFeatureSelectionFieldSet;
3778 -
3779 - private YesNoType forcePerMachineField;
3780 -
3781 - private bool forcePerMachineFieldSet;
3782 -
3783 - private YesNoType suppressLooseFilePayloadGenerationField;
3784 -
3785 - private bool suppressLooseFilePayloadGenerationFieldSet;
3786 -
3787 - private YesNoType visibleField;
3788 -
3789 - private bool visibleFieldSet;
3790 -
3791 - private ISchemaElement parentElement;
3792 -
3793 - public MsiPackage()
3794 - {
3795 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3796 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
3797 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SlipstreamMsp)));
3798 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3799 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3800 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
3801 - this.children = childCollection0;
3802 - }
3803 -
3804 - public virtual IEnumerable Children
3805 - {
3806 - get
3807 - {
3808 - return this.children;
3809 - }
3810 - }
3811 -
3812 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3813 - public virtual IEnumerable this[System.Type childType]
3814 - {
3815 - get
3816 - {
3817 - return this.children.Filter(childType);
3818 - }
3819 - }
3820 -
3821 - /// <summary>
3822 - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
3823 - /// At a minimum, the SourceFile or Name attribute must be specified.
3824 - /// </summary>
3825 - public string SourceFile
3826 - {
3827 - get
3828 - {
3829 - return this.sourceFileField;
3830 - }
3831 - set
3832 - {
3833 - this.sourceFileFieldSet = true;
3834 - this.sourceFileField = value;
3835 - }
3836 - }
3837 -
3838 - /// <summary>
3839 - /// The destination path and file name for this chain payload. Use this attribute to rename the
3840 - /// chain entry point or extract it into a subfolder. The default value is the file name from the
3841 - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
3842 - /// The use of '..' directories is not allowed.
3843 - /// </summary>
3844 - public string Name
3845 - {
3846 - get
3847 - {
3848 - return this.nameField;
3849 - }
3850 - set
3851 - {
3852 - this.nameFieldSet = true;
3853 - this.nameField = value;
3854 - }
3855 - }
3856 -
3857 - public string DownloadUrl
3858 - {
3859 - get
3860 - {
3861 - return this.downloadUrlField;
3862 - }
3863 - set
3864 - {
3865 - this.downloadUrlFieldSet = true;
3866 - this.downloadUrlField = value;
3867 - }
3868 - }
3869 -
3870 - /// <summary>
3871 - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
3872 - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
3873 - /// </summary>
3874 - public string Id
3875 - {
3876 - get
3877 - {
3878 - return this.idField;
3879 - }
3880 - set
3881 - {
3882 - this.idFieldSet = true;
3883 - this.idField = value;
3884 - }
3885 - }
3886 -
3887 - /// <summary>
3888 - /// The identifier of another package that this one should be installed after. By default the After
3889 - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
3890 - /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
3891 - /// </summary>
3892 - public string After
3893 - {
3894 - get
3895 - {
3896 - return this.afterField;
3897 - }
3898 - set
3899 - {
3900 - this.afterFieldSet = true;
3901 - this.afterField = value;
3902 - }
3903 - }
3904 -
3905 - /// <summary>
3906 - /// The size this package will take on disk in bytes after it is installed. By default, the binder will
3907 - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
3908 - /// and use the total for the install size of the package.
3909 - /// </summary>
3910 - public string InstallSize
3911 - {
3912 - get
3913 - {
3914 - return this.installSizeField;
3915 - }
3916 - set
3917 - {
3918 - this.installSizeFieldSet = true;
3919 - this.installSizeField = value;
3920 - }
3921 - }
3922 -
3923 - /// <summary>
3924 - /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
3925 - /// </summary>
3926 - public string InstallCondition
3927 - {
3928 - get
3929 - {
3930 - return this.installConditionField;
3931 - }
3932 - set
3933 - {
3934 - this.installConditionFieldSet = true;
3935 - this.installConditionField = value;
3936 - }
3937 - }
3938 -
3939 - /// <summary>
3940 - /// Whether to cache the package. The default is "yes".
3941 - /// </summary>
3942 - public YesNoAlwaysType Cache
3943 - {
3944 - get
3945 - {
3946 - return this.cacheField;
3947 - }
3948 - set
3949 - {
3950 - this.cacheFieldSet = true;
3951 - this.cacheField = value;
3952 - }
3953 - }
3954 -
3955 - /// <summary>
3956 - /// The identifier to use when caching the package.
3957 - /// </summary>
3958 - public string CacheId
3959 - {
3960 - get
3961 - {
3962 - return this.cacheIdField;
3963 - }
3964 - set
3965 - {
3966 - this.cacheIdFieldSet = true;
3967 - this.cacheIdField = value;
3968 - }
3969 - }
3970 -
3971 - /// <summary>
3972 - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
3973 - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
3974 - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
3975 - /// bootstrapper application data manifest.
3976 - /// </summary>
3977 - public string DisplayName
3978 - {
3979 - get
3980 - {
3981 - return this.displayNameField;
3982 - }
3983 - set
3984 - {
3985 - this.displayNameFieldSet = true;
3986 - this.displayNameField = value;
3987 - }
3988 - }
3989 -
3990 - /// <summary>
3991 - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
3992 - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
3993 - /// the Description patch metadata property. Other package types must use this attribute to define a description in the
3994 - /// bootstrapper application data manifest.
3995 - /// </summary>
3996 - public string Description
3997 - {
3998 - get
3999 - {
4000 - return this.descriptionField;
4001 - }
4002 - set
4003 - {
4004 - this.descriptionFieldSet = true;
4005 - this.descriptionField = value;
4006 - }
4007 - }
4008 -
4009 - /// <summary>
4010 - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4011 - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4012 - /// </summary>
4013 - public string LogPathVariable
4014 - {
4015 - get
4016 - {
4017 - return this.logPathVariableField;
4018 - }
4019 - set
4020 - {
4021 - this.logPathVariableFieldSet = true;
4022 - this.logPathVariableField = value;
4023 - }
4024 - }
4025 -
4026 - /// <summary>
4027 - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4028 - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4029 - /// default to no logging.
4030 - /// </summary>
4031 - public string RollbackLogPathVariable
4032 - {
4033 - get
4034 - {
4035 - return this.rollbackLogPathVariableField;
4036 - }
4037 - set
4038 - {
4039 - this.rollbackLogPathVariableFieldSet = true;
4040 - this.rollbackLogPathVariableField = value;
4041 - }
4042 - }
4043 -
4044 - /// <summary>
4045 - /// Specifies whether the package can be uninstalled. The default is "no".
4046 - /// </summary>
4047 - public YesNoType Permanent
4048 - {
4049 - get
4050 - {
4051 - return this.permanentField;
4052 - }
4053 - set
4054 - {
4055 - this.permanentFieldSet = true;
4056 - this.permanentField = value;
4057 - }
4058 - }
4059 -
4060 - /// <summary>
4061 - /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4062 - /// indicates that if the package fails then the chain will fail and rollback or stop. If
4063 - /// "no" is specified then the chain will continue even if the package reports failure.
4064 - /// </summary>
4065 - public YesNoType Vital
4066 - {
4067 - get
4068 - {
4069 - return this.vitalField;
4070 - }
4071 - set
4072 - {
4073 - this.vitalFieldSet = true;
4074 - this.vitalField = value;
4075 - }
4076 - }
4077 -
4078 - /// <summary>
4079 - /// Whether the package payload should be embedded in a container or left as an external payload.
4080 - /// </summary>
4081 - public YesNoDefaultType Compressed
4082 - {
4083 - get
4084 - {
4085 - return this.compressedField;
4086 - }
4087 - set
4088 - {
4089 - this.compressedFieldSet = true;
4090 - this.compressedField = value;
4091 - }
4092 - }
4093 -
4094 - /// <summary>
4095 - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4096 - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4097 - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4098 - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4099 - /// </summary>
4100 - public YesNoType EnableSignatureVerification
4101 - {
4102 - get
4103 - {
4104 - return this.enableSignatureVerificationField;
4105 - }
4106 - set
4107 - {
4108 - this.enableSignatureVerificationFieldSet = true;
4109 - this.enableSignatureVerificationField = value;
4110 - }
4111 - }
4112 -
4113 - /// <summary>
4114 - /// Specifies whether the bundle will allow individual control over the installation state of Features inside
4115 - /// the msi package. Managing feature selection requires special care to ensure the install, modify, update and
4116 - /// uninstall behavior of the package is always correct. The default is "no".
4117 - /// </summary>
4118 - public YesNoType EnableFeatureSelection
4119 - {
4120 - get
4121 - {
4122 - return this.enableFeatureSelectionField;
4123 - }
4124 - set
4125 - {
4126 - this.enableFeatureSelectionFieldSet = true;
4127 - this.enableFeatureSelectionField = value;
4128 - }
4129 - }
4130 -
4131 - /// <summary>
4132 - /// Override the automatic per-machine detection of MSI packages and force the package to be per-machine.
4133 - /// The default is "no", which allows the tools to detect the expected value.
4134 - /// </summary>
4135 - public YesNoType ForcePerMachine
4136 - {
4137 - get
4138 - {
4139 - return this.forcePerMachineField;
4140 - }
4141 - set
4142 - {
4143 - this.forcePerMachineFieldSet = true;
4144 - this.forcePerMachineField = value;
4145 - }
4146 - }
4147 -
4148 - /// <summary>
4149 - /// This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package
4150 - /// to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads.
4151 - /// The resulting Bundle may not be able to install the MSI package correctly. The default is "no".
4152 - /// </summary>
4153 - public YesNoType SuppressLooseFilePayloadGeneration
4154 - {
4155 - get
4156 - {
4157 - return this.suppressLooseFilePayloadGenerationField;
4158 - }
4159 - set
4160 - {
4161 - this.suppressLooseFilePayloadGenerationFieldSet = true;
4162 - this.suppressLooseFilePayloadGenerationField = value;
4163 - }
4164 - }
4165 -
4166 - /// <summary>
4167 - /// Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is
4168 - /// specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI
4169 - /// will not be displayed.
4170 - /// </summary>
4171 - public YesNoType Visible
4172 - {
4173 - get
4174 - {
4175 - return this.visibleField;
4176 - }
4177 - set
4178 - {
4179 - this.visibleFieldSet = true;
4180 - this.visibleField = value;
4181 - }
4182 - }
4183 -
4184 - public virtual ISchemaElement ParentElement
4185 - {
4186 - get
4187 - {
4188 - return this.parentElement;
4189 - }
4190 - set
4191 - {
4192 - this.parentElement = value;
4193 - }
4194 - }
4195 -
4196 - public virtual void AddChild(ISchemaElement child)
4197 - {
4198 - if ((null == child))
4199 - {
4200 - throw new ArgumentNullException("child");
4201 - }
4202 - this.children.AddElement(child);
4203 - child.ParentElement = this;
4204 - }
4205 -
4206 - public virtual void RemoveChild(ISchemaElement child)
4207 - {
4208 - if ((null == child))
4209 - {
4210 - throw new ArgumentNullException("child");
4211 - }
4212 - this.children.RemoveElement(child);
4213 - child.ParentElement = null;
4214 - }
4215 -
4216 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4217 - ISchemaElement ICreateChildren.CreateChild(string childName)
4218 - {
4219 - if (String.IsNullOrEmpty(childName))
4220 - {
4221 - throw new ArgumentNullException("childName");
4222 - }
4223 - ISchemaElement childValue = null;
4224 - if (("MsiProperty" == childName))
4225 - {
4226 - childValue = new MsiProperty();
4227 - }
4228 - if (("SlipstreamMsp" == childName))
4229 - {
4230 - childValue = new SlipstreamMsp();
4231 - }
4232 - if (("Payload" == childName))
4233 - {
4234 - childValue = new Payload();
4235 - }
4236 - if (("PayloadGroupRef" == childName))
4237 - {
4238 - childValue = new PayloadGroupRef();
4239 - }
4240 - if ((null == childValue))
4241 - {
4242 - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4243 - }
4244 - return childValue;
4245 - }
4246 -
4247 - /// <summary>
4248 - /// Processes this element and all child elements into an XmlWriter.
4249 - /// </summary>
4250 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4251 - public virtual void OutputXml(XmlWriter writer)
4252 - {
4253 - if ((null == writer))
4254 - {
4255 - throw new ArgumentNullException("writer");
4256 - }
4257 - writer.WriteStartElement("MsiPackage", "http://wixtoolset.org/schemas/v4/wxs");
4258 - if (this.sourceFileFieldSet)
4259 - {
4260 - writer.WriteAttributeString("SourceFile", this.sourceFileField);
4261 - }
4262 - if (this.nameFieldSet)
4263 - {
4264 - writer.WriteAttributeString("Name", this.nameField);
4265 - }
4266 - if (this.downloadUrlFieldSet)
4267 - {
4268 - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
4269 - }
4270 - if (this.idFieldSet)
4271 - {
4272 - writer.WriteAttributeString("Id", this.idField);
4273 - }
4274 - if (this.afterFieldSet)
4275 - {
4276 - writer.WriteAttributeString("After", this.afterField);
4277 - }
4278 - if (this.installSizeFieldSet)
4279 - {
4280 - writer.WriteAttributeString("InstallSize", this.installSizeField);
4281 - }
4282 - if (this.installConditionFieldSet)
4283 - {
4284 - writer.WriteAttributeString("InstallCondition", this.installConditionField);
4285 - }
4286 - if (this.cacheFieldSet)
4287 - {
4288 - if ((this.cacheField == YesNoAlwaysType.always))
4289 - {
4290 - writer.WriteAttributeString("Cache", "always");
4291 - }
4292 - if ((this.cacheField == YesNoAlwaysType.no))
4293 - {
4294 - writer.WriteAttributeString("Cache", "no");
4295 - }
4296 - if ((this.cacheField == YesNoAlwaysType.yes))
4297 - {
4298 - writer.WriteAttributeString("Cache", "yes");
4299 - }
4300 - }
4301 - if (this.cacheIdFieldSet)
4302 - {
4303 - writer.WriteAttributeString("CacheId", this.cacheIdField);
4304 - }
4305 - if (this.displayNameFieldSet)
4306 - {
4307 - writer.WriteAttributeString("DisplayName", this.displayNameField);
4308 - }
4309 - if (this.descriptionFieldSet)
4310 - {
4311 - writer.WriteAttributeString("Description", this.descriptionField);
4312 - }
4313 - if (this.logPathVariableFieldSet)
4314 - {
4315 - writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
4316 - }
4317 - if (this.rollbackLogPathVariableFieldSet)
4318 - {
4319 - writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
4320 - }
4321 - if (this.permanentFieldSet)
4322 - {
4323 - if ((this.permanentField == YesNoType.no))
4324 - {
4325 - writer.WriteAttributeString("Permanent", "no");
4326 - }
4327 - if ((this.permanentField == YesNoType.yes))
4328 - {
4329 - writer.WriteAttributeString("Permanent", "yes");
4330 - }
4331 - }
4332 - if (this.vitalFieldSet)
4333 - {
4334 - if ((this.vitalField == YesNoType.no))
4335 - {
4336 - writer.WriteAttributeString("Vital", "no");
4337 - }
4338 - if ((this.vitalField == YesNoType.yes))
4339 - {
4340 - writer.WriteAttributeString("Vital", "yes");
4341 - }
4342 - }
4343 - if (this.compressedFieldSet)
4344 - {
4345 - if ((this.compressedField == YesNoDefaultType.@default))
4346 - {
4347 - writer.WriteAttributeString("Compressed", "default");
4348 - }
4349 - if ((this.compressedField == YesNoDefaultType.no))
4350 - {
4351 - writer.WriteAttributeString("Compressed", "no");
4352 - }
4353 - if ((this.compressedField == YesNoDefaultType.yes))
4354 - {
4355 - writer.WriteAttributeString("Compressed", "yes");
4356 - }
4357 - }
4358 - if (this.enableSignatureVerificationFieldSet)
4359 - {
4360 - if ((this.enableSignatureVerificationField == YesNoType.no))
4361 - {
4362 - writer.WriteAttributeString("EnableSignatureVerification", "no");
4363 - }
4364 - if ((this.enableSignatureVerificationField == YesNoType.yes))
4365 - {
4366 - writer.WriteAttributeString("EnableSignatureVerification", "yes");
4367 - }
4368 - }
4369 - if (this.enableFeatureSelectionFieldSet)
4370 - {
4371 - if ((this.enableFeatureSelectionField == YesNoType.no))
4372 - {
4373 - writer.WriteAttributeString("EnableFeatureSelection", "no");
4374 - }
4375 - if ((this.enableFeatureSelectionField == YesNoType.yes))
4376 - {
4377 - writer.WriteAttributeString("EnableFeatureSelection", "yes");
4378 - }
4379 - }
4380 - if (this.forcePerMachineFieldSet)
4381 - {
4382 - if ((this.forcePerMachineField == YesNoType.no))
4383 - {
4384 - writer.WriteAttributeString("ForcePerMachine", "no");
4385 - }
4386 - if ((this.forcePerMachineField == YesNoType.yes))
4387 - {
4388 - writer.WriteAttributeString("ForcePerMachine", "yes");
4389 - }
4390 - }
4391 - if (this.suppressLooseFilePayloadGenerationFieldSet)
4392 - {
4393 - if ((this.suppressLooseFilePayloadGenerationField == YesNoType.no))
4394 - {
4395 - writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "no");
4396 - }
4397 - if ((this.suppressLooseFilePayloadGenerationField == YesNoType.yes))
4398 - {
4399 - writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "yes");
4400 - }
4401 - }
4402 - if (this.visibleFieldSet)
4403 - {
4404 - if ((this.visibleField == YesNoType.no))
4405 - {
4406 - writer.WriteAttributeString("Visible", "no");
4407 - }
4408 - if ((this.visibleField == YesNoType.yes))
4409 - {
4410 - writer.WriteAttributeString("Visible", "yes");
4411 - }
4412 - }
4413 - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4414 - {
4415 - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4416 - childElement.OutputXml(writer);
4417 - }
4418 - writer.WriteEndElement();
4419 - }
4420 -
4421 - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4422 - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4423 - void ISetAttributes.SetAttribute(string name, string value)
4424 - {
4425 - if (String.IsNullOrEmpty(name))
4426 - {
4427 - throw new ArgumentNullException("name");
4428 - }
4429 - if (("SourceFile" == name))
4430 - {
4431 - this.sourceFileField = value;
4432 - this.sourceFileFieldSet = true;
4433 - }
4434 - if (("Name" == name))
4435 - {
4436 - this.nameField = value;
4437 - this.nameFieldSet = true;
4438 - }
4439 - if (("DownloadUrl" == name))
4440 - {
4441 - this.downloadUrlField = value;
4442 - this.downloadUrlFieldSet = true;
4443 - }
4444 - if (("Id" == name))
4445 - {
4446 - this.idField = value;
4447 - this.idFieldSet = true;
4448 - }
4449 - if (("After" == name))
4450 - {
4451 - this.afterField = value;
4452 - this.afterFieldSet = true;
4453 - }
4454 - if (("InstallSize" == name))
4455 - {
4456 - this.installSizeField = value;
4457 - this.installSizeFieldSet = true;
4458 - }
4459 - if (("InstallCondition" == name))
4460 - {
4461 - this.installConditionField = value;
4462 - this.installConditionFieldSet = true;
4463 - }
4464 - if (("Cache" == name))
4465 - {
4466 - this.cacheField = Enums.ParseYesNoAlwaysType(value);
4467 - this.cacheFieldSet = true;
4468 - }
4469 - if (("CacheId" == name))
4470 - {
4471 - this.cacheIdField = value;
4472 - this.cacheIdFieldSet = true;
4473 - }
4474 - if (("DisplayName" == name))
4475 - {
4476 - this.displayNameField = value;
4477 - this.displayNameFieldSet = true;
4478 - }
4479 - if (("Description" == name))
4480 - {
4481 - this.descriptionField = value;
4482 - this.descriptionFieldSet = true;
4483 - }
4484 - if (("LogPathVariable" == name))
4485 - {
4486 - this.logPathVariableField = value;
4487 - this.logPathVariableFieldSet = true;
4488 - }
4489 - if (("RollbackLogPathVariable" == name))
4490 - {
4491 - this.rollbackLogPathVariableField = value;
4492 - this.rollbackLogPathVariableFieldSet = true;
4493 - }
4494 - if (("Permanent" == name))
4495 - {
4496 - this.permanentField = Enums.ParseYesNoType(value);
4497 - this.permanentFieldSet = true;
4498 - }
4499 - if (("Vital" == name))
4500 - {
4501 - this.vitalField = Enums.ParseYesNoType(value);
4502 - this.vitalFieldSet = true;
4503 - }
4504 - if (("Compressed" == name))
4505 - {
4506 - this.compressedField = Enums.ParseYesNoDefaultType(value);
4507 - this.compressedFieldSet = true;
4508 - }
4509 - if (("EnableSignatureVerification" == name))
4510 - {
4511 - this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
4512 - this.enableSignatureVerificationFieldSet = true;
4513 - }
4514 - if (("EnableFeatureSelection" == name))
4515 - {
4516 - this.enableFeatureSelectionField = Enums.ParseYesNoType(value);
4517 - this.enableFeatureSelectionFieldSet = true;
4518 - }
4519 - if (("ForcePerMachine" == name))
4520 - {
4521 - this.forcePerMachineField = Enums.ParseYesNoType(value);
4522 - this.forcePerMachineFieldSet = true;
4523 - }
4524 - if (("SuppressLooseFilePayloadGeneration" == name))
4525 - {
4526 - this.suppressLooseFilePayloadGenerationField = Enums.ParseYesNoType(value);
4527 - this.suppressLooseFilePayloadGenerationFieldSet = true;
4528 - }
4529 - if (("Visible" == name))
4530 - {
4531 - this.visibleField = Enums.ParseYesNoType(value);
4532 - this.visibleFieldSet = true;
4533 - }
4534 - }
4535 - }
4536 -
4537 - /// <summary>
4538 - /// Describes a single msp package to install.
4539 - /// </summary>
4540 - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
4541 - public class MspPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4542 - {
4543 -
4544 - private ElementCollection children;
4545 -
4546 - private string sourceFileField;
4547 -
4548 - private bool sourceFileFieldSet;
4549 -
4550 - private string nameField;
4551 -
4552 - private bool nameFieldSet;
4553 -
4554 - private string downloadUrlField;
4555 -
4556 - private bool downloadUrlFieldSet;
4557 -
4558 - private string idField;
4559 -
4560 - private bool idFieldSet;
4561 -
4562 - private string afterField;
4563 -
4564 - private bool afterFieldSet;
4565 -
4566 - private string installSizeField;
4567 -
4568 - private bool installSizeFieldSet;
4569 -
4570 - private string installConditionField;
4571 -
4572 - private bool installConditionFieldSet;
4573 -
4574 - private YesNoAlwaysType cacheField;
4575 -
4576 - private bool cacheFieldSet;
4577 -
4578 - private string cacheIdField;
4579 -
4580 - private bool cacheIdFieldSet;
4581 -
4582 - private string displayNameField;
4583 -
4584 - private bool displayNameFieldSet;
4585 -
4586 - private string descriptionField;
4587 -
4588 - private bool descriptionFieldSet;
4589 -
4590 - private string logPathVariableField;
4591 -
4592 - private bool logPathVariableFieldSet;
4593 -
4594 - private string rollbackLogPathVariableField;
4595 -
4596 - private bool rollbackLogPathVariableFieldSet;
4597 -
4598 - private YesNoType permanentField;
4599 -
4600 - private bool permanentFieldSet;
4601 -
4602 - private YesNoType vitalField;
4603 -
4604 - private bool vitalFieldSet;
4605 -
4606 - private YesNoDefaultType compressedField;
4607 -
4608 - private bool compressedFieldSet;
4609 -
4610 - private YesNoType enableSignatureVerificationField;
4611 -
4612 - private bool enableSignatureVerificationFieldSet;
4613 -
4614 - private YesNoDefaultType perMachineField;
4615 -
4616 - private bool perMachineFieldSet;
4617 -
4618 - private YesNoType slipstreamField;
4619 -
4620 - private bool slipstreamFieldSet;
4621 -
4622 - private ISchemaElement parentElement;
4623 -
4624 - public MspPackage()
4625 - {
4626 - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4627 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
4628 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
4629 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
4630 - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
4631 - this.children = childCollection0;
4632 - }
4633 -
4634 - public virtual IEnumerable Children
4635 - {
4636 - get
4637 - {
4638 - return this.children;
4639 - }
4640 - }
4641 -
4642 - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4643 - public virtual IEnumerable this[System.Type childType]
4644 - {
4645 - get
4646 - {
4647 - return this.children.Filter(childType);
4648 - }
4649 - }
4650 -
4651 - /// <summary>
4652 - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
4653 - /// At a minimum, the SourceFile or Name attribute must be specified.
4654 - /// </summary>
4655 - public string SourceFile
4656 - {
4657 - get
4658 - {
4659 - return this.sourceFileField;
4660 - }
4661 - set
4662 - {
4663 - this.sourceFileFieldSet = true;
4664 - this.sourceFileField = value;
4665 - }
4666 - }
4667 -
4668 - /// <summary>
4669 - /// The destination path and file name for this chain payload. Use this attribute to rename the
4670 - /// chain entry point or extract it into a subfolder. The default value is the file name from the
4671 - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
4672 - /// The use of '..' directories is not allowed.
4673 - /// </summary>
4674 - public string Name
4675 - {
4676 - get
4677 - {
4678 - return this.nameField;
4679 - }
4680 - set
4681 - {
4682 - this.nameFieldSet = true;
4683 - this.nameField = value;
4684 - }
4685 - }
4686 -
4687 - public string DownloadUrl
4688 - {
4689 - get
4690 - {
4691 - return this.downloadUrlField;
4692 - }
4693 - set
4694 - {
4695 - this.downloadUrlFieldSet = true;
4696 - this.downloadUrlField = value;
4697 - }
4698 - }
4699 -
4700 - /// <summary>
4701 - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
4702 - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
4703 - /// </summary>
4704 - public string Id
4705 - {
4706 - get
4707 - {
4708 - return this.idField;
4709 - }
4710 - set
4711 - {
4712 - this.idFieldSet = true;
4713 - this.idField = value;
4714 - }
4715 - }
4716 -
4717 - /// <summary>
4718 - /// The identifier of another package that this one should be installed after. By default the After
4719 - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
4720 - /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
4721 - /// </summary>
4722 - public string After
4723 - {
4724 - get
4725 - {
4726 - return this.afterField;
4727 - }
4728 - set
4729 - {
4730 - this.afterFieldSet = true;
4731 - this.afterField = value;
4732 - }
4733 - }
4734 -
4735 - /// <summary>
4736 - /// The size this package will take on disk in bytes after it is installed. By default, the binder will
4737 - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
4738 - /// and use the total for the install size of the package.
4739 - /// </summary>
4740 - public string InstallSize
4741 - {
4742 - get
4743 - {
4744 - return this.installSizeField;
4745 - }
4746 - set
4747 - {
4748 - this.installSizeFieldSet = true;
4749 - this.installSizeField = value;
4750 - }
4751 - }
4752 -
4753 - /// <summary>
4754 - /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
4755 - /// </summary>
4756 - public string InstallCondition
4757 - {
4758 - get
4759 - {
4760 - return this.installConditionField;
4761 - }
4762 - set
4763 - {
4764 - this.installConditionFieldSet = true;
4765 - this.installConditionField = value;
4766 - }
4767 - }
4768 -
4769 - /// <summary>
4770 - /// Whether to cache the package. The default is "yes".
4771 - /// </summary>
4772 - public YesNoAlwaysType Cache
4773 - {
4774 - get
4775 - {
4776 - return this.cacheField;
4777 - }
4778 - set
4779 - {
4780 - this.cacheFieldSet = true;
4781 - this.cacheField = value;
4782 - }
4783 - }
4784 -
4785 - /// <summary>
4786 - /// The identifier to use when caching the package.
4787 - /// </summary>
4788 - public string CacheId
4789 - {
4790 - get
4791 - {
4792 - return this.cacheIdField;
4793 - }
4794 - set
4795 - {
4796 - this.cacheIdFieldSet = true;
4797 - this.cacheIdField = value;
4798 - }
4799 - }
4800 -
4801 - /// <summary>
4802 - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
4803 - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
4804 - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
4805 - /// bootstrapper application data manifest.
4806 - /// </summary>
4807 - public string DisplayName
4808 - {
4809 - get
4810 - {
4811 - return this.displayNameField;
4812 - }
4813 - set
4814 - {
4815 - this.displayNameFieldSet = true;
4816 - this.displayNameField = value;
4817 - }
4818 - }
4819 -
4820 - /// <summary>
4821 - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
4822 - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
4823 - /// the Description patch metadata property. Other package types must use this attribute to define a description in the
4824 - /// bootstrapper application data manifest.
4825 - /// </summary>
4826 - public string Description
4827 - {
4828 - get
4829 - {
4830 - return this.descriptionField;
4831 - }
4832 - set
4833 - {
4834 - this.descriptionFieldSet = true;
4835 - this.descriptionField = value;
4836 - }
4837 - }
4838 -
4839 - /// <summary>
4840 - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4841 - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4842 - /// </summary>
4843 - public string LogPathVariable
4844 - {
4845 - get
4846 - {
4847 - return this.logPathVariableField;
4848 - }
4849 - set
4850 - {
4851 - this.logPathVariableFieldSet = true;
4852 - this.logPathVariableField = value;
4853 - }
4854 - }
4855 -
4856 - /// <summary>
4857 - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4858 - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4859 - /// default to no logging.
4860 - /// </summary>
4861 - public string RollbackLogPathVariable
4862 - {
4863 - get
4864 - {
4865 - return this.rollbackLogPathVariableField;
4866 - }
4867 - set
4868 - {
4869 - this.rollbackLogPathVariableFieldSet = true;
4870 - this.rollbackLogPathVariableField = value;
4871 - }
4872 - }
4873 -
4874 - /// <summary>
4875 - /// Specifies whether the package can be uninstalled. The default is "no".
4876 - /// </summary>
4877 - public YesNoType Permanent
4878 - {
4879 - get
4880 - {
4881 - return this.permanentField;
4882 - }
4883 - set
4884 - {
4885 - this.permanentFieldSet = true;
4886 - this.permanentField = value;
4887 - }
4888 - }
4889 -
4890 - /// <summary>
4891 - /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4892 - /// indicates that if the package fails then the chain will fail and rollback or stop. If
4893 - /// "no" is specified then the chain will continue even if the package reports failure.
4894 - /// </summary>
4895 - public YesNoType Vital
4896 - {
4897 - get
4898 - {
4899 - return this.vitalField;
4900 - }
4901 - set
4902 - {
4903 - this.vitalFieldSet = true;
4904 - this.vitalField = value;
4905 - }
4906 - }
4907 -
4908 - /// <summary>
4909 - /// Whether the package payload should be embedded in a container or left as an external payload.
4910 - /// </summary>
4911 - public YesNoDefaultType Compressed
4912 - {
4913 - get
4914 - {
4915 - return this.compressedField;
4916 - }
4917 - set
4918 - {
4919 - this.compressedFieldSet = true;
4920 - this.compressedField = value;
4921 - }
4922 - }
4923 -
4924 - /// <summary>
4925 - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4926 - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4927 - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4928 - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4929 - /// </summary>
4930 - public YesNoType EnableSignatureVerification
4931 - {
4932 - get
4933 - {
4934 - return this.enableSignatureVerificationField;
4935 - }
4936 - set
4937 - {
4938 - this.enableSignatureVerificationFieldSet = true;
4939 - this.enableSignatureVerificationField = value;
4940 - }
4941 - }
4942 -
4943 - /// <summary>
4944 - /// Indicates the package must be executed elevated. The default is "no".
4945 - /// </summary>
4946 - public YesNoDefaultType PerMachine
4947 - {
4948 - get
4949 - {
4950 - return this.perMachineField;
4951 - }
4952 - set
4953 - {
4954 - this.perMachineFieldSet = true;
4955 - this.perMachineField = value;
4956 - }
4957 - }
4958 -
4959 - /// <summary>
4960 - /// Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no".
4961 - /// Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired.
4962 - /// </summary>
4963 - public YesNoType Slipstream
4964 - {
4965 - get
4966 - {
4967 - return this.slipstreamField;
4968 - }
4969 - set
4970 - {
4971 - this.slipstreamFieldSet = true;
4972 - this.slipstreamField = value;
4973 - }
4974 - }
4975 -
4976 - public virtual ISchemaElement ParentElement
4977 - {
4978 - get
4979 - {
4980 - return this.parentElement;
4981 - }
4982 - set
4983 - {
4984 - this.parentElement = value;
4985 - }
4986 - }
4987 -
4988 - public virtual void AddChild(ISchemaElement child)
4989 - {
4990 - if ((null == child))
4991 - {
4992 - throw new ArgumentNullException("child");
4993 - }
4994 - this.children.AddElement(child);
4995 - child.ParentElement = this;
4996 - }
4997 -
4998 - public virtual void RemoveChild(ISchemaElement child)
4999 - {

This file is too large to show in full.

src/WixToolset.Data/WindowsInstaller/Row.cs
+8 -1
@@ -195,6 +195,13 @@ namespace WixToolset.Data.WindowsInstaller
195 return foundPrimaryKey ? primaryKey.ToString() : null;
196 }
197
198 + /// <summary>
199 + /// Returns true if the specified field is null.
200 + /// </summary>
201 + /// <param name="field">Index of the field to check.</param>
202 + /// <returns>true if the specified field is null, false otherwise.</returns>
203 + public bool IsColumnNull(int field) => this.Fields[field].Data == null;
204 +
205 /// <summary>
206 /// Returns true if the specified field is null or an empty string.
207 /// </summary>
@@ -202,7 +209,7 @@ namespace WixToolset.Data.WindowsInstaller
209 /// <returns>true if the specified field is null or an empty string, false otherwise.</returns>
210 public bool IsColumnEmpty(int field)
211 {
205 - if (null == this.Fields[field].Data)
212 + if (this.IsColumnNull(field))
213 {
214 return true;
215 }