diff options
author | Rob Mensching <rob@firegiant.com> | 2022-07-26 17:20:39 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-08-01 20:25:19 -0700 |
commit | a627ca9b720047e633a8fe72003ab9bee31006c5 (patch) | |
tree | 2bc8a924bb4141ab718e74d08f6459a0ffe8d573 /src/tools/heat/Serialize/vs.cs | |
parent | 521eb3c9cf38823a2c4019abb85dc0b3200b92cb (diff) | |
download | wix-a627ca9b720047e633a8fe72003ab9bee31006c5.tar.gz wix-a627ca9b720047e633a8fe72003ab9bee31006c5.tar.bz2 wix-a627ca9b720047e633a8fe72003ab9bee31006c5.zip |
Create WixToolset.Heat.nupkg to distribute heat.exe and Heat targets
Moves Heat functionality to the "tools" layer and packages it all
up in WixToolset.Heat.nupkg for distribution in WiX v4.
Completes 6838
Diffstat (limited to 'src/tools/heat/Serialize/vs.cs')
-rw-r--r-- | src/tools/heat/Serialize/vs.cs | 1574 |
1 files changed, 1574 insertions, 0 deletions
diff --git a/src/tools/heat/Serialize/vs.cs b/src/tools/heat/Serialize/vs.cs new file mode 100644 index 00000000..8f926efc --- /dev/null +++ b/src/tools/heat/Serialize/vs.cs | |||
@@ -0,0 +1,1574 @@ | |||
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 | #pragma warning disable 1591 | ||
12 | namespace WixToolset.Harvesters.Serialize.VS | ||
13 | { | ||
14 | using System; | ||
15 | using System.CodeDom.Compiler; | ||
16 | using System.Collections; | ||
17 | using System.Diagnostics.CodeAnalysis; | ||
18 | using System.Globalization; | ||
19 | using System.Xml; | ||
20 | using WixToolset.Harvesters.Serialize; | ||
21 | |||
22 | |||
23 | /// <summary> | ||
24 | /// Values of this type will either be "yes" or "no". | ||
25 | /// </summary> | ||
26 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
27 | public enum YesNoType | ||
28 | { | ||
29 | |||
30 | IllegalValue = int.MaxValue, | ||
31 | |||
32 | NotSet = -1, | ||
33 | |||
34 | no, | ||
35 | |||
36 | yes, | ||
37 | } | ||
38 | |||
39 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
40 | public class Enums | ||
41 | { | ||
42 | |||
43 | /// <summary> | ||
44 | /// Parses a YesNoType from a string. | ||
45 | /// </summary> | ||
46 | public static YesNoType ParseYesNoType(string value) | ||
47 | { | ||
48 | YesNoType parsedValue; | ||
49 | Enums.TryParseYesNoType(value, out parsedValue); | ||
50 | return parsedValue; | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Tries to parse a YesNoType from a string. | ||
55 | /// </summary> | ||
56 | public static bool TryParseYesNoType(string value, out YesNoType parsedValue) | ||
57 | { | ||
58 | parsedValue = YesNoType.NotSet; | ||
59 | if (string.IsNullOrEmpty(value)) | ||
60 | { | ||
61 | return false; | ||
62 | } | ||
63 | if (("no" == value)) | ||
64 | { | ||
65 | parsedValue = YesNoType.no; | ||
66 | } | ||
67 | else | ||
68 | { | ||
69 | if (("yes" == value)) | ||
70 | { | ||
71 | parsedValue = YesNoType.yes; | ||
72 | } | ||
73 | else | ||
74 | { | ||
75 | parsedValue = YesNoType.IllegalValue; | ||
76 | return false; | ||
77 | } | ||
78 | } | ||
79 | return true; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | /// <summary> | ||
84 | /// Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. | ||
85 | /// </summary> | ||
86 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
87 | public class HelpCollection : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
88 | { | ||
89 | |||
90 | private ElementCollection children; | ||
91 | |||
92 | private string idField; | ||
93 | |||
94 | private bool idFieldSet; | ||
95 | |||
96 | private string descriptionField; | ||
97 | |||
98 | private bool descriptionFieldSet; | ||
99 | |||
100 | private string nameField; | ||
101 | |||
102 | private bool nameFieldSet; | ||
103 | |||
104 | private YesNoType suppressCustomActionsField; | ||
105 | |||
106 | private bool suppressCustomActionsFieldSet; | ||
107 | |||
108 | private ISchemaElement parentElement; | ||
109 | |||
110 | public HelpCollection() | ||
111 | { | ||
112 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); | ||
113 | childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); | ||
114 | childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFilterRef))); | ||
115 | childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PlugCollectionInto))); | ||
116 | this.children = childCollection0; | ||
117 | } | ||
118 | |||
119 | public virtual IEnumerable Children | ||
120 | { | ||
121 | get | ||
122 | { | ||
123 | return this.children; | ||
124 | } | ||
125 | } | ||
126 | |||
127 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
128 | public virtual IEnumerable this[System.Type childType] | ||
129 | { | ||
130 | get | ||
131 | { | ||
132 | return this.children.Filter(childType); | ||
133 | } | ||
134 | } | ||
135 | |||
136 | /// <summary> | ||
137 | /// Primary Key for HelpNamespace. | ||
138 | /// </summary> | ||
139 | public string Id | ||
140 | { | ||
141 | get | ||
142 | { | ||
143 | return this.idField; | ||
144 | } | ||
145 | set | ||
146 | { | ||
147 | this.idFieldSet = true; | ||
148 | this.idField = value; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | /// <summary> | ||
153 | /// Friendly name for Namespace. | ||
154 | /// </summary> | ||
155 | public string Description | ||
156 | { | ||
157 | get | ||
158 | { | ||
159 | return this.descriptionField; | ||
160 | } | ||
161 | set | ||
162 | { | ||
163 | this.descriptionFieldSet = true; | ||
164 | this.descriptionField = value; | ||
165 | } | ||
166 | } | ||
167 | |||
168 | /// <summary> | ||
169 | /// Internal Microsoft Help ID for this Namespace. | ||
170 | /// </summary> | ||
171 | public string Name | ||
172 | { | ||
173 | get | ||
174 | { | ||
175 | return this.nameField; | ||
176 | } | ||
177 | set | ||
178 | { | ||
179 | this.nameFieldSet = true; | ||
180 | this.nameField = value; | ||
181 | } | ||
182 | } | ||
183 | |||
184 | /// <summary> | ||
185 | /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. | ||
186 | /// </summary> | ||
187 | public YesNoType SuppressCustomActions | ||
188 | { | ||
189 | get | ||
190 | { | ||
191 | return this.suppressCustomActionsField; | ||
192 | } | ||
193 | set | ||
194 | { | ||
195 | this.suppressCustomActionsFieldSet = true; | ||
196 | this.suppressCustomActionsField = value; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | public virtual ISchemaElement ParentElement | ||
201 | { | ||
202 | get | ||
203 | { | ||
204 | return this.parentElement; | ||
205 | } | ||
206 | set | ||
207 | { | ||
208 | this.parentElement = value; | ||
209 | } | ||
210 | } | ||
211 | |||
212 | public virtual void AddChild(ISchemaElement child) | ||
213 | { | ||
214 | if ((null == child)) | ||
215 | { | ||
216 | throw new ArgumentNullException("child"); | ||
217 | } | ||
218 | this.children.AddElement(child); | ||
219 | child.ParentElement = this; | ||
220 | } | ||
221 | |||
222 | public virtual void RemoveChild(ISchemaElement child) | ||
223 | { | ||
224 | if ((null == child)) | ||
225 | { | ||
226 | throw new ArgumentNullException("child"); | ||
227 | } | ||
228 | this.children.RemoveElement(child); | ||
229 | child.ParentElement = null; | ||
230 | } | ||
231 | |||
232 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
233 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
234 | { | ||
235 | if (String.IsNullOrEmpty(childName)) | ||
236 | { | ||
237 | throw new ArgumentNullException("childName"); | ||
238 | } | ||
239 | ISchemaElement childValue = null; | ||
240 | if (("HelpFileRef" == childName)) | ||
241 | { | ||
242 | childValue = new HelpFileRef(); | ||
243 | } | ||
244 | if (("HelpFilterRef" == childName)) | ||
245 | { | ||
246 | childValue = new HelpFilterRef(); | ||
247 | } | ||
248 | if (("PlugCollectionInto" == childName)) | ||
249 | { | ||
250 | childValue = new PlugCollectionInto(); | ||
251 | } | ||
252 | if ((null == childValue)) | ||
253 | { | ||
254 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
255 | } | ||
256 | return childValue; | ||
257 | } | ||
258 | |||
259 | /// <summary> | ||
260 | /// Processes this element and all child elements into an XmlWriter. | ||
261 | /// </summary> | ||
262 | public virtual void OutputXml(XmlWriter writer) | ||
263 | { | ||
264 | if ((null == writer)) | ||
265 | { | ||
266 | throw new ArgumentNullException("writer"); | ||
267 | } | ||
268 | writer.WriteStartElement("HelpCollection", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
269 | if (this.idFieldSet) | ||
270 | { | ||
271 | writer.WriteAttributeString("Id", this.idField); | ||
272 | } | ||
273 | if (this.descriptionFieldSet) | ||
274 | { | ||
275 | writer.WriteAttributeString("Description", this.descriptionField); | ||
276 | } | ||
277 | if (this.nameFieldSet) | ||
278 | { | ||
279 | writer.WriteAttributeString("Name", this.nameField); | ||
280 | } | ||
281 | if (this.suppressCustomActionsFieldSet) | ||
282 | { | ||
283 | if ((this.suppressCustomActionsField == YesNoType.no)) | ||
284 | { | ||
285 | writer.WriteAttributeString("SuppressCustomActions", "no"); | ||
286 | } | ||
287 | if ((this.suppressCustomActionsField == YesNoType.yes)) | ||
288 | { | ||
289 | writer.WriteAttributeString("SuppressCustomActions", "yes"); | ||
290 | } | ||
291 | } | ||
292 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
293 | { | ||
294 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
295 | childElement.OutputXml(writer); | ||
296 | } | ||
297 | writer.WriteEndElement(); | ||
298 | } | ||
299 | |||
300 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
301 | void ISetAttributes.SetAttribute(string name, string value) | ||
302 | { | ||
303 | if (String.IsNullOrEmpty(name)) | ||
304 | { | ||
305 | throw new ArgumentNullException("name"); | ||
306 | } | ||
307 | if (("Id" == name)) | ||
308 | { | ||
309 | this.idField = value; | ||
310 | this.idFieldSet = true; | ||
311 | } | ||
312 | if (("Description" == name)) | ||
313 | { | ||
314 | this.descriptionField = value; | ||
315 | this.descriptionFieldSet = true; | ||
316 | } | ||
317 | if (("Name" == name)) | ||
318 | { | ||
319 | this.nameField = value; | ||
320 | this.nameFieldSet = true; | ||
321 | } | ||
322 | if (("SuppressCustomActions" == name)) | ||
323 | { | ||
324 | this.suppressCustomActionsField = Enums.ParseYesNoType(value); | ||
325 | this.suppressCustomActionsFieldSet = true; | ||
326 | } | ||
327 | } | ||
328 | } | ||
329 | |||
330 | /// <summary> | ||
331 | /// Filter for Help Namespace. | ||
332 | /// </summary> | ||
333 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
334 | public class HelpFilter : ISchemaElement, ISetAttributes | ||
335 | { | ||
336 | |||
337 | private string idField; | ||
338 | |||
339 | private bool idFieldSet; | ||
340 | |||
341 | private string filterDefinitionField; | ||
342 | |||
343 | private bool filterDefinitionFieldSet; | ||
344 | |||
345 | private string nameField; | ||
346 | |||
347 | private bool nameFieldSet; | ||
348 | |||
349 | private YesNoType suppressCustomActionsField; | ||
350 | |||
351 | private bool suppressCustomActionsFieldSet; | ||
352 | |||
353 | private ISchemaElement parentElement; | ||
354 | |||
355 | /// <summary> | ||
356 | /// Primary Key for HelpFilter. | ||
357 | /// </summary> | ||
358 | public string Id | ||
359 | { | ||
360 | get | ||
361 | { | ||
362 | return this.idField; | ||
363 | } | ||
364 | set | ||
365 | { | ||
366 | this.idFieldSet = true; | ||
367 | this.idField = value; | ||
368 | } | ||
369 | } | ||
370 | |||
371 | /// <summary> | ||
372 | /// Query String for Help Filter. | ||
373 | /// </summary> | ||
374 | public string FilterDefinition | ||
375 | { | ||
376 | get | ||
377 | { | ||
378 | return this.filterDefinitionField; | ||
379 | } | ||
380 | set | ||
381 | { | ||
382 | this.filterDefinitionFieldSet = true; | ||
383 | this.filterDefinitionField = value; | ||
384 | } | ||
385 | } | ||
386 | |||
387 | /// <summary> | ||
388 | /// Friendly name for Filter. | ||
389 | /// </summary> | ||
390 | public string Name | ||
391 | { | ||
392 | get | ||
393 | { | ||
394 | return this.nameField; | ||
395 | } | ||
396 | set | ||
397 | { | ||
398 | this.nameFieldSet = true; | ||
399 | this.nameField = value; | ||
400 | } | ||
401 | } | ||
402 | |||
403 | /// <summary> | ||
404 | /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. | ||
405 | /// </summary> | ||
406 | public YesNoType SuppressCustomActions | ||
407 | { | ||
408 | get | ||
409 | { | ||
410 | return this.suppressCustomActionsField; | ||
411 | } | ||
412 | set | ||
413 | { | ||
414 | this.suppressCustomActionsFieldSet = true; | ||
415 | this.suppressCustomActionsField = value; | ||
416 | } | ||
417 | } | ||
418 | |||
419 | public virtual ISchemaElement ParentElement | ||
420 | { | ||
421 | get | ||
422 | { | ||
423 | return this.parentElement; | ||
424 | } | ||
425 | set | ||
426 | { | ||
427 | this.parentElement = value; | ||
428 | } | ||
429 | } | ||
430 | |||
431 | /// <summary> | ||
432 | /// Processes this element and all child elements into an XmlWriter. | ||
433 | /// </summary> | ||
434 | public virtual void OutputXml(XmlWriter writer) | ||
435 | { | ||
436 | if ((null == writer)) | ||
437 | { | ||
438 | throw new ArgumentNullException("writer"); | ||
439 | } | ||
440 | writer.WriteStartElement("HelpFilter", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
441 | if (this.idFieldSet) | ||
442 | { | ||
443 | writer.WriteAttributeString("Id", this.idField); | ||
444 | } | ||
445 | if (this.filterDefinitionFieldSet) | ||
446 | { | ||
447 | writer.WriteAttributeString("FilterDefinition", this.filterDefinitionField); | ||
448 | } | ||
449 | if (this.nameFieldSet) | ||
450 | { | ||
451 | writer.WriteAttributeString("Name", this.nameField); | ||
452 | } | ||
453 | if (this.suppressCustomActionsFieldSet) | ||
454 | { | ||
455 | if ((this.suppressCustomActionsField == YesNoType.no)) | ||
456 | { | ||
457 | writer.WriteAttributeString("SuppressCustomActions", "no"); | ||
458 | } | ||
459 | if ((this.suppressCustomActionsField == YesNoType.yes)) | ||
460 | { | ||
461 | writer.WriteAttributeString("SuppressCustomActions", "yes"); | ||
462 | } | ||
463 | } | ||
464 | writer.WriteEndElement(); | ||
465 | } | ||
466 | |||
467 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
468 | void ISetAttributes.SetAttribute(string name, string value) | ||
469 | { | ||
470 | if (String.IsNullOrEmpty(name)) | ||
471 | { | ||
472 | throw new ArgumentNullException("name"); | ||
473 | } | ||
474 | if (("Id" == name)) | ||
475 | { | ||
476 | this.idField = value; | ||
477 | this.idFieldSet = true; | ||
478 | } | ||
479 | if (("FilterDefinition" == name)) | ||
480 | { | ||
481 | this.filterDefinitionField = value; | ||
482 | this.filterDefinitionFieldSet = true; | ||
483 | } | ||
484 | if (("Name" == name)) | ||
485 | { | ||
486 | this.nameField = value; | ||
487 | this.nameFieldSet = true; | ||
488 | } | ||
489 | if (("SuppressCustomActions" == name)) | ||
490 | { | ||
491 | this.suppressCustomActionsField = Enums.ParseYesNoType(value); | ||
492 | this.suppressCustomActionsFieldSet = true; | ||
493 | } | ||
494 | } | ||
495 | } | ||
496 | |||
497 | /// <summary> | ||
498 | /// File for Help Namespace. The parent file is the key for HxS (Title) file. | ||
499 | /// </summary> | ||
500 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
501 | public class HelpFile : ISchemaElement, ISetAttributes | ||
502 | { | ||
503 | |||
504 | private string idField; | ||
505 | |||
506 | private bool idFieldSet; | ||
507 | |||
508 | private string attributeIndexField; | ||
509 | |||
510 | private bool attributeIndexFieldSet; | ||
511 | |||
512 | private string indexField; | ||
513 | |||
514 | private bool indexFieldSet; | ||
515 | |||
516 | private int languageField; | ||
517 | |||
518 | private bool languageFieldSet; | ||
519 | |||
520 | private string nameField; | ||
521 | |||
522 | private bool nameFieldSet; | ||
523 | |||
524 | private string sampleLocationField; | ||
525 | |||
526 | private bool sampleLocationFieldSet; | ||
527 | |||
528 | private string searchField; | ||
529 | |||
530 | private bool searchFieldSet; | ||
531 | |||
532 | private YesNoType suppressCustomActionsField; | ||
533 | |||
534 | private bool suppressCustomActionsFieldSet; | ||
535 | |||
536 | private ISchemaElement parentElement; | ||
537 | |||
538 | /// <summary> | ||
539 | /// Primary Key for HelpFile Table. | ||
540 | /// </summary> | ||
541 | public string Id | ||
542 | { | ||
543 | get | ||
544 | { | ||
545 | return this.idField; | ||
546 | } | ||
547 | set | ||
548 | { | ||
549 | this.idFieldSet = true; | ||
550 | this.idField = value; | ||
551 | } | ||
552 | } | ||
553 | |||
554 | /// <summary> | ||
555 | /// Key for HxR (Attributes) file. | ||
556 | /// </summary> | ||
557 | public string AttributeIndex | ||
558 | { | ||
559 | get | ||
560 | { | ||
561 | return this.attributeIndexField; | ||
562 | } | ||
563 | set | ||
564 | { | ||
565 | this.attributeIndexFieldSet = true; | ||
566 | this.attributeIndexField = value; | ||
567 | } | ||
568 | } | ||
569 | |||
570 | /// <summary> | ||
571 | /// Key for HxI (Index) file. | ||
572 | /// </summary> | ||
573 | public string Index | ||
574 | { | ||
575 | get | ||
576 | { | ||
577 | return this.indexField; | ||
578 | } | ||
579 | set | ||
580 | { | ||
581 | this.indexFieldSet = true; | ||
582 | this.indexField = value; | ||
583 | } | ||
584 | } | ||
585 | |||
586 | /// <summary> | ||
587 | /// Language ID for content file. | ||
588 | /// </summary> | ||
589 | public int Language | ||
590 | { | ||
591 | get | ||
592 | { | ||
593 | return this.languageField; | ||
594 | } | ||
595 | set | ||
596 | { | ||
597 | this.languageFieldSet = true; | ||
598 | this.languageField = value; | ||
599 | } | ||
600 | } | ||
601 | |||
602 | /// <summary> | ||
603 | /// Internal Microsoft Help ID for this HelpFile. | ||
604 | /// </summary> | ||
605 | public string Name | ||
606 | { | ||
607 | get | ||
608 | { | ||
609 | return this.nameField; | ||
610 | } | ||
611 | set | ||
612 | { | ||
613 | this.nameFieldSet = true; | ||
614 | this.nameField = value; | ||
615 | } | ||
616 | } | ||
617 | |||
618 | /// <summary> | ||
619 | /// Key for a file that is in the "root" of the samples directory for this HelpFile. | ||
620 | /// </summary> | ||
621 | public string SampleLocation | ||
622 | { | ||
623 | get | ||
624 | { | ||
625 | return this.sampleLocationField; | ||
626 | } | ||
627 | set | ||
628 | { | ||
629 | this.sampleLocationFieldSet = true; | ||
630 | this.sampleLocationField = value; | ||
631 | } | ||
632 | } | ||
633 | |||
634 | /// <summary> | ||
635 | /// Key for HxQ (Query) file. | ||
636 | /// </summary> | ||
637 | public string Search | ||
638 | { | ||
639 | get | ||
640 | { | ||
641 | return this.searchField; | ||
642 | } | ||
643 | set | ||
644 | { | ||
645 | this.searchFieldSet = true; | ||
646 | this.searchField = value; | ||
647 | } | ||
648 | } | ||
649 | |||
650 | /// <summary> | ||
651 | /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. | ||
652 | /// </summary> | ||
653 | public YesNoType SuppressCustomActions | ||
654 | { | ||
655 | get | ||
656 | { | ||
657 | return this.suppressCustomActionsField; | ||
658 | } | ||
659 | set | ||
660 | { | ||
661 | this.suppressCustomActionsFieldSet = true; | ||
662 | this.suppressCustomActionsField = value; | ||
663 | } | ||
664 | } | ||
665 | |||
666 | public virtual ISchemaElement ParentElement | ||
667 | { | ||
668 | get | ||
669 | { | ||
670 | return this.parentElement; | ||
671 | } | ||
672 | set | ||
673 | { | ||
674 | this.parentElement = value; | ||
675 | } | ||
676 | } | ||
677 | |||
678 | /// <summary> | ||
679 | /// Processes this element and all child elements into an XmlWriter. | ||
680 | /// </summary> | ||
681 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
682 | public virtual void OutputXml(XmlWriter writer) | ||
683 | { | ||
684 | if ((null == writer)) | ||
685 | { | ||
686 | throw new ArgumentNullException("writer"); | ||
687 | } | ||
688 | writer.WriteStartElement("HelpFile", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
689 | if (this.idFieldSet) | ||
690 | { | ||
691 | writer.WriteAttributeString("Id", this.idField); | ||
692 | } | ||
693 | if (this.attributeIndexFieldSet) | ||
694 | { | ||
695 | writer.WriteAttributeString("AttributeIndex", this.attributeIndexField); | ||
696 | } | ||
697 | if (this.indexFieldSet) | ||
698 | { | ||
699 | writer.WriteAttributeString("Index", this.indexField); | ||
700 | } | ||
701 | if (this.languageFieldSet) | ||
702 | { | ||
703 | writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture)); | ||
704 | } | ||
705 | if (this.nameFieldSet) | ||
706 | { | ||
707 | writer.WriteAttributeString("Name", this.nameField); | ||
708 | } | ||
709 | if (this.sampleLocationFieldSet) | ||
710 | { | ||
711 | writer.WriteAttributeString("SampleLocation", this.sampleLocationField); | ||
712 | } | ||
713 | if (this.searchFieldSet) | ||
714 | { | ||
715 | writer.WriteAttributeString("Search", this.searchField); | ||
716 | } | ||
717 | if (this.suppressCustomActionsFieldSet) | ||
718 | { | ||
719 | if ((this.suppressCustomActionsField == YesNoType.no)) | ||
720 | { | ||
721 | writer.WriteAttributeString("SuppressCustomActions", "no"); | ||
722 | } | ||
723 | if ((this.suppressCustomActionsField == YesNoType.yes)) | ||
724 | { | ||
725 | writer.WriteAttributeString("SuppressCustomActions", "yes"); | ||
726 | } | ||
727 | } | ||
728 | writer.WriteEndElement(); | ||
729 | } | ||
730 | |||
731 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
732 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
733 | void ISetAttributes.SetAttribute(string name, string value) | ||
734 | { | ||
735 | if (String.IsNullOrEmpty(name)) | ||
736 | { | ||
737 | throw new ArgumentNullException("name"); | ||
738 | } | ||
739 | if (("Id" == name)) | ||
740 | { | ||
741 | this.idField = value; | ||
742 | this.idFieldSet = true; | ||
743 | } | ||
744 | if (("AttributeIndex" == name)) | ||
745 | { | ||
746 | this.attributeIndexField = value; | ||
747 | this.attributeIndexFieldSet = true; | ||
748 | } | ||
749 | if (("Index" == name)) | ||
750 | { | ||
751 | this.indexField = value; | ||
752 | this.indexFieldSet = true; | ||
753 | } | ||
754 | if (("Language" == name)) | ||
755 | { | ||
756 | this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); | ||
757 | this.languageFieldSet = true; | ||
758 | } | ||
759 | if (("Name" == name)) | ||
760 | { | ||
761 | this.nameField = value; | ||
762 | this.nameFieldSet = true; | ||
763 | } | ||
764 | if (("SampleLocation" == name)) | ||
765 | { | ||
766 | this.sampleLocationField = value; | ||
767 | this.sampleLocationFieldSet = true; | ||
768 | } | ||
769 | if (("Search" == name)) | ||
770 | { | ||
771 | this.searchField = value; | ||
772 | this.searchFieldSet = true; | ||
773 | } | ||
774 | if (("SuppressCustomActions" == name)) | ||
775 | { | ||
776 | this.suppressCustomActionsField = Enums.ParseYesNoType(value); | ||
777 | this.suppressCustomActionsFieldSet = true; | ||
778 | } | ||
779 | } | ||
780 | } | ||
781 | |||
782 | /// <summary> | ||
783 | /// Plugin for Help Namespace. | ||
784 | /// </summary> | ||
785 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
786 | public class PlugCollectionInto : ISchemaElement, ISetAttributes | ||
787 | { | ||
788 | |||
789 | private string attributesField; | ||
790 | |||
791 | private bool attributesFieldSet; | ||
792 | |||
793 | private string tableOfContentsField; | ||
794 | |||
795 | private bool tableOfContentsFieldSet; | ||
796 | |||
797 | private string targetCollectionField; | ||
798 | |||
799 | private bool targetCollectionFieldSet; | ||
800 | |||
801 | private string targetTableOfContentsField; | ||
802 | |||
803 | private bool targetTableOfContentsFieldSet; | ||
804 | |||
805 | private string targetFeatureField; | ||
806 | |||
807 | private bool targetFeatureFieldSet; | ||
808 | |||
809 | private YesNoType suppressExternalNamespacesField; | ||
810 | |||
811 | private bool suppressExternalNamespacesFieldSet; | ||
812 | |||
813 | private ISchemaElement parentElement; | ||
814 | |||
815 | /// <summary> | ||
816 | /// Key for HxA (Attributes) file of child namespace. | ||
817 | /// </summary> | ||
818 | public string Attributes | ||
819 | { | ||
820 | get | ||
821 | { | ||
822 | return this.attributesField; | ||
823 | } | ||
824 | set | ||
825 | { | ||
826 | this.attributesFieldSet = true; | ||
827 | this.attributesField = value; | ||
828 | } | ||
829 | } | ||
830 | |||
831 | /// <summary> | ||
832 | /// Key for HxT file of child namespace. | ||
833 | /// </summary> | ||
834 | public string TableOfContents | ||
835 | { | ||
836 | get | ||
837 | { | ||
838 | return this.tableOfContentsField; | ||
839 | } | ||
840 | set | ||
841 | { | ||
842 | this.tableOfContentsFieldSet = true; | ||
843 | this.tableOfContentsField = value; | ||
844 | } | ||
845 | } | ||
846 | |||
847 | /// <summary> | ||
848 | /// Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. | ||
849 | /// The following special keys can be used to plug into external namespaces defined outside of the installer. | ||
850 | /// MS_VSIPCC_v80 : Visual Studio 2005 | ||
851 | /// MS.VSIPCC.v90 : Visual Studio 2008 | ||
852 | /// </summary> | ||
853 | public string TargetCollection | ||
854 | { | ||
855 | get | ||
856 | { | ||
857 | return this.targetCollectionField; | ||
858 | } | ||
859 | set | ||
860 | { | ||
861 | this.targetCollectionFieldSet = true; | ||
862 | this.targetCollectionField = value; | ||
863 | } | ||
864 | } | ||
865 | |||
866 | /// <summary> | ||
867 | /// Key for HxT file of parent namespace that now includes the new child namespace. | ||
868 | /// </summary> | ||
869 | public string TargetTableOfContents | ||
870 | { | ||
871 | get | ||
872 | { | ||
873 | return this.targetTableOfContentsField; | ||
874 | } | ||
875 | set | ||
876 | { | ||
877 | this.targetTableOfContentsFieldSet = true; | ||
878 | this.targetTableOfContentsField = value; | ||
879 | } | ||
880 | } | ||
881 | |||
882 | /// <summary> | ||
883 | /// Key for the feature parent of this help collection. Required only when plugging into external namespaces. | ||
884 | /// </summary> | ||
885 | public string TargetFeature | ||
886 | { | ||
887 | get | ||
888 | { | ||
889 | return this.targetFeatureField; | ||
890 | } | ||
891 | set | ||
892 | { | ||
893 | this.targetFeatureFieldSet = true; | ||
894 | this.targetFeatureField = value; | ||
895 | } | ||
896 | } | ||
897 | |||
898 | /// <summary> | ||
899 | /// Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. | ||
900 | /// </summary> | ||
901 | public YesNoType SuppressExternalNamespaces | ||
902 | { | ||
903 | get | ||
904 | { | ||
905 | return this.suppressExternalNamespacesField; | ||
906 | } | ||
907 | set | ||
908 | { | ||
909 | this.suppressExternalNamespacesFieldSet = true; | ||
910 | this.suppressExternalNamespacesField = value; | ||
911 | } | ||
912 | } | ||
913 | |||
914 | public virtual ISchemaElement ParentElement | ||
915 | { | ||
916 | get | ||
917 | { | ||
918 | return this.parentElement; | ||
919 | } | ||
920 | set | ||
921 | { | ||
922 | this.parentElement = value; | ||
923 | } | ||
924 | } | ||
925 | |||
926 | /// <summary> | ||
927 | /// Processes this element and all child elements into an XmlWriter. | ||
928 | /// </summary> | ||
929 | public virtual void OutputXml(XmlWriter writer) | ||
930 | { | ||
931 | if ((null == writer)) | ||
932 | { | ||
933 | throw new ArgumentNullException("writer"); | ||
934 | } | ||
935 | writer.WriteStartElement("PlugCollectionInto", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
936 | if (this.attributesFieldSet) | ||
937 | { | ||
938 | writer.WriteAttributeString("Attributes", this.attributesField); | ||
939 | } | ||
940 | if (this.tableOfContentsFieldSet) | ||
941 | { | ||
942 | writer.WriteAttributeString("TableOfContents", this.tableOfContentsField); | ||
943 | } | ||
944 | if (this.targetCollectionFieldSet) | ||
945 | { | ||
946 | writer.WriteAttributeString("TargetCollection", this.targetCollectionField); | ||
947 | } | ||
948 | if (this.targetTableOfContentsFieldSet) | ||
949 | { | ||
950 | writer.WriteAttributeString("TargetTableOfContents", this.targetTableOfContentsField); | ||
951 | } | ||
952 | if (this.targetFeatureFieldSet) | ||
953 | { | ||
954 | writer.WriteAttributeString("TargetFeature", this.targetFeatureField); | ||
955 | } | ||
956 | if (this.suppressExternalNamespacesFieldSet) | ||
957 | { | ||
958 | if ((this.suppressExternalNamespacesField == YesNoType.no)) | ||
959 | { | ||
960 | writer.WriteAttributeString("SuppressExternalNamespaces", "no"); | ||
961 | } | ||
962 | if ((this.suppressExternalNamespacesField == YesNoType.yes)) | ||
963 | { | ||
964 | writer.WriteAttributeString("SuppressExternalNamespaces", "yes"); | ||
965 | } | ||
966 | } | ||
967 | writer.WriteEndElement(); | ||
968 | } | ||
969 | |||
970 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
971 | void ISetAttributes.SetAttribute(string name, string value) | ||
972 | { | ||
973 | if (String.IsNullOrEmpty(name)) | ||
974 | { | ||
975 | throw new ArgumentNullException("name"); | ||
976 | } | ||
977 | if (("Attributes" == name)) | ||
978 | { | ||
979 | this.attributesField = value; | ||
980 | this.attributesFieldSet = true; | ||
981 | } | ||
982 | if (("TableOfContents" == name)) | ||
983 | { | ||
984 | this.tableOfContentsField = value; | ||
985 | this.tableOfContentsFieldSet = true; | ||
986 | } | ||
987 | if (("TargetCollection" == name)) | ||
988 | { | ||
989 | this.targetCollectionField = value; | ||
990 | this.targetCollectionFieldSet = true; | ||
991 | } | ||
992 | if (("TargetTableOfContents" == name)) | ||
993 | { | ||
994 | this.targetTableOfContentsField = value; | ||
995 | this.targetTableOfContentsFieldSet = true; | ||
996 | } | ||
997 | if (("TargetFeature" == name)) | ||
998 | { | ||
999 | this.targetFeatureField = value; | ||
1000 | this.targetFeatureFieldSet = true; | ||
1001 | } | ||
1002 | if (("SuppressExternalNamespaces" == name)) | ||
1003 | { | ||
1004 | this.suppressExternalNamespacesField = Enums.ParseYesNoType(value); | ||
1005 | this.suppressExternalNamespacesFieldSet = true; | ||
1006 | } | ||
1007 | } | ||
1008 | } | ||
1009 | |||
1010 | /// <summary> | ||
1011 | /// Create a reference to a HelpFile element in another Fragment. | ||
1012 | /// </summary> | ||
1013 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1014 | public class HelpFileRef : ISchemaElement, ISetAttributes | ||
1015 | { | ||
1016 | |||
1017 | private string idField; | ||
1018 | |||
1019 | private bool idFieldSet; | ||
1020 | |||
1021 | private ISchemaElement parentElement; | ||
1022 | |||
1023 | /// <summary> | ||
1024 | /// Primary Key for HelpFile Table. | ||
1025 | /// </summary> | ||
1026 | public string Id | ||
1027 | { | ||
1028 | get | ||
1029 | { | ||
1030 | return this.idField; | ||
1031 | } | ||
1032 | set | ||
1033 | { | ||
1034 | this.idFieldSet = true; | ||
1035 | this.idField = value; | ||
1036 | } | ||
1037 | } | ||
1038 | |||
1039 | public virtual ISchemaElement ParentElement | ||
1040 | { | ||
1041 | get | ||
1042 | { | ||
1043 | return this.parentElement; | ||
1044 | } | ||
1045 | set | ||
1046 | { | ||
1047 | this.parentElement = value; | ||
1048 | } | ||
1049 | } | ||
1050 | |||
1051 | /// <summary> | ||
1052 | /// Processes this element and all child elements into an XmlWriter. | ||
1053 | /// </summary> | ||
1054 | public virtual void OutputXml(XmlWriter writer) | ||
1055 | { | ||
1056 | if ((null == writer)) | ||
1057 | { | ||
1058 | throw new ArgumentNullException("writer"); | ||
1059 | } | ||
1060 | writer.WriteStartElement("HelpFileRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
1061 | if (this.idFieldSet) | ||
1062 | { | ||
1063 | writer.WriteAttributeString("Id", this.idField); | ||
1064 | } | ||
1065 | writer.WriteEndElement(); | ||
1066 | } | ||
1067 | |||
1068 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1069 | void ISetAttributes.SetAttribute(string name, string value) | ||
1070 | { | ||
1071 | if (String.IsNullOrEmpty(name)) | ||
1072 | { | ||
1073 | throw new ArgumentNullException("name"); | ||
1074 | } | ||
1075 | if (("Id" == name)) | ||
1076 | { | ||
1077 | this.idField = value; | ||
1078 | this.idFieldSet = true; | ||
1079 | } | ||
1080 | } | ||
1081 | } | ||
1082 | |||
1083 | /// <summary> | ||
1084 | /// Create a reference to a HelpFile element in another Fragment. | ||
1085 | /// </summary> | ||
1086 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1087 | public class HelpFilterRef : ISchemaElement, ISetAttributes | ||
1088 | { | ||
1089 | |||
1090 | private string idField; | ||
1091 | |||
1092 | private bool idFieldSet; | ||
1093 | |||
1094 | private ISchemaElement parentElement; | ||
1095 | |||
1096 | /// <summary> | ||
1097 | /// Primary Key for HelpFilter. | ||
1098 | /// </summary> | ||
1099 | public string Id | ||
1100 | { | ||
1101 | get | ||
1102 | { | ||
1103 | return this.idField; | ||
1104 | } | ||
1105 | set | ||
1106 | { | ||
1107 | this.idFieldSet = true; | ||
1108 | this.idField = value; | ||
1109 | } | ||
1110 | } | ||
1111 | |||
1112 | public virtual ISchemaElement ParentElement | ||
1113 | { | ||
1114 | get | ||
1115 | { | ||
1116 | return this.parentElement; | ||
1117 | } | ||
1118 | set | ||
1119 | { | ||
1120 | this.parentElement = value; | ||
1121 | } | ||
1122 | } | ||
1123 | |||
1124 | /// <summary> | ||
1125 | /// Processes this element and all child elements into an XmlWriter. | ||
1126 | /// </summary> | ||
1127 | public virtual void OutputXml(XmlWriter writer) | ||
1128 | { | ||
1129 | if ((null == writer)) | ||
1130 | { | ||
1131 | throw new ArgumentNullException("writer"); | ||
1132 | } | ||
1133 | writer.WriteStartElement("HelpFilterRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
1134 | if (this.idFieldSet) | ||
1135 | { | ||
1136 | writer.WriteAttributeString("Id", this.idField); | ||
1137 | } | ||
1138 | writer.WriteEndElement(); | ||
1139 | } | ||
1140 | |||
1141 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1142 | void ISetAttributes.SetAttribute(string name, string value) | ||
1143 | { | ||
1144 | if (String.IsNullOrEmpty(name)) | ||
1145 | { | ||
1146 | throw new ArgumentNullException("name"); | ||
1147 | } | ||
1148 | if (("Id" == name)) | ||
1149 | { | ||
1150 | this.idField = value; | ||
1151 | this.idFieldSet = true; | ||
1152 | } | ||
1153 | } | ||
1154 | } | ||
1155 | |||
1156 | /// <summary> | ||
1157 | /// Create a reference to a HelpCollection element in another Fragment. | ||
1158 | /// </summary> | ||
1159 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1160 | public class HelpCollectionRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes | ||
1161 | { | ||
1162 | |||
1163 | private ElementCollection children; | ||
1164 | |||
1165 | private string idField; | ||
1166 | |||
1167 | private bool idFieldSet; | ||
1168 | |||
1169 | private ISchemaElement parentElement; | ||
1170 | |||
1171 | public HelpCollectionRef() | ||
1172 | { | ||
1173 | ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); | ||
1174 | childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); | ||
1175 | this.children = childCollection0; | ||
1176 | } | ||
1177 | |||
1178 | public virtual IEnumerable Children | ||
1179 | { | ||
1180 | get | ||
1181 | { | ||
1182 | return this.children; | ||
1183 | } | ||
1184 | } | ||
1185 | |||
1186 | [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] | ||
1187 | public virtual IEnumerable this[System.Type childType] | ||
1188 | { | ||
1189 | get | ||
1190 | { | ||
1191 | return this.children.Filter(childType); | ||
1192 | } | ||
1193 | } | ||
1194 | |||
1195 | /// <summary> | ||
1196 | /// Primary Key for HelpNamespace Table. | ||
1197 | /// </summary> | ||
1198 | public string Id | ||
1199 | { | ||
1200 | get | ||
1201 | { | ||
1202 | return this.idField; | ||
1203 | } | ||
1204 | set | ||
1205 | { | ||
1206 | this.idFieldSet = true; | ||
1207 | this.idField = value; | ||
1208 | } | ||
1209 | } | ||
1210 | |||
1211 | public virtual ISchemaElement ParentElement | ||
1212 | { | ||
1213 | get | ||
1214 | { | ||
1215 | return this.parentElement; | ||
1216 | } | ||
1217 | set | ||
1218 | { | ||
1219 | this.parentElement = value; | ||
1220 | } | ||
1221 | } | ||
1222 | |||
1223 | public virtual void AddChild(ISchemaElement child) | ||
1224 | { | ||
1225 | if ((null == child)) | ||
1226 | { | ||
1227 | throw new ArgumentNullException("child"); | ||
1228 | } | ||
1229 | this.children.AddElement(child); | ||
1230 | child.ParentElement = this; | ||
1231 | } | ||
1232 | |||
1233 | public virtual void RemoveChild(ISchemaElement child) | ||
1234 | { | ||
1235 | if ((null == child)) | ||
1236 | { | ||
1237 | throw new ArgumentNullException("child"); | ||
1238 | } | ||
1239 | this.children.RemoveElement(child); | ||
1240 | child.ParentElement = null; | ||
1241 | } | ||
1242 | |||
1243 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1244 | ISchemaElement ICreateChildren.CreateChild(string childName) | ||
1245 | { | ||
1246 | if (String.IsNullOrEmpty(childName)) | ||
1247 | { | ||
1248 | throw new ArgumentNullException("childName"); | ||
1249 | } | ||
1250 | ISchemaElement childValue = null; | ||
1251 | if (("HelpFileRef" == childName)) | ||
1252 | { | ||
1253 | childValue = new HelpFileRef(); | ||
1254 | } | ||
1255 | if ((null == childValue)) | ||
1256 | { | ||
1257 | throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); | ||
1258 | } | ||
1259 | return childValue; | ||
1260 | } | ||
1261 | |||
1262 | /// <summary> | ||
1263 | /// Processes this element and all child elements into an XmlWriter. | ||
1264 | /// </summary> | ||
1265 | public virtual void OutputXml(XmlWriter writer) | ||
1266 | { | ||
1267 | if ((null == writer)) | ||
1268 | { | ||
1269 | throw new ArgumentNullException("writer"); | ||
1270 | } | ||
1271 | writer.WriteStartElement("HelpCollectionRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
1272 | if (this.idFieldSet) | ||
1273 | { | ||
1274 | writer.WriteAttributeString("Id", this.idField); | ||
1275 | } | ||
1276 | for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) | ||
1277 | { | ||
1278 | ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); | ||
1279 | childElement.OutputXml(writer); | ||
1280 | } | ||
1281 | writer.WriteEndElement(); | ||
1282 | } | ||
1283 | |||
1284 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1285 | void ISetAttributes.SetAttribute(string name, string value) | ||
1286 | { | ||
1287 | if (String.IsNullOrEmpty(name)) | ||
1288 | { | ||
1289 | throw new ArgumentNullException("name"); | ||
1290 | } | ||
1291 | if (("Id" == name)) | ||
1292 | { | ||
1293 | this.idField = value; | ||
1294 | this.idFieldSet = true; | ||
1295 | } | ||
1296 | } | ||
1297 | } | ||
1298 | |||
1299 | /// <summary> | ||
1300 | /// This element provides the metdata required to install/uninstall a file as | ||
1301 | /// a VSIX Package. The VSIX package file will be installed as part of the MSI | ||
1302 | /// then passed to the VSIX installer to install the VSIX package. To avoid the | ||
1303 | /// duplication, simply use the MSI to install the VSIX package itself. | ||
1304 | /// </summary> | ||
1305 | [GeneratedCode("XsdGen", "4.0.0.0")] | ||
1306 | public class VsixPackage : ISchemaElement, ISetAttributes | ||
1307 | { | ||
1308 | |||
1309 | private string fileField; | ||
1310 | |||
1311 | private bool fileFieldSet; | ||
1312 | |||
1313 | private string packageIdField; | ||
1314 | |||
1315 | private bool packageIdFieldSet; | ||
1316 | |||
1317 | private YesNoType permanentField; | ||
1318 | |||
1319 | private bool permanentFieldSet; | ||
1320 | |||
1321 | private string targetField; | ||
1322 | |||
1323 | private bool targetFieldSet; | ||
1324 | |||
1325 | private string targetVersionField; | ||
1326 | |||
1327 | private bool targetVersionFieldSet; | ||
1328 | |||
1329 | private YesNoType vitalField; | ||
1330 | |||
1331 | private bool vitalFieldSet; | ||
1332 | |||
1333 | private string vsixInstallerPathPropertyField; | ||
1334 | |||
1335 | private bool vsixInstallerPathPropertyFieldSet; | ||
1336 | |||
1337 | private ISchemaElement parentElement; | ||
1338 | |||
1339 | /// <summary> | ||
1340 | /// Reference to file identifer. This attribute is required when the element is not a | ||
1341 | /// child of a File element and is invalid when the element is a child of the File element. | ||
1342 | /// </summary> | ||
1343 | public string File | ||
1344 | { | ||
1345 | get | ||
1346 | { | ||
1347 | return this.fileField; | ||
1348 | } | ||
1349 | set | ||
1350 | { | ||
1351 | this.fileFieldSet = true; | ||
1352 | this.fileField = value; | ||
1353 | } | ||
1354 | } | ||
1355 | |||
1356 | /// <summary> | ||
1357 | /// Identity of the VSIX package per its internal manifest. If this value is not correct | ||
1358 | /// the VSIX package will not correctly uninstall. | ||
1359 | /// </summary> | ||
1360 | public string PackageId | ||
1361 | { | ||
1362 | get | ||
1363 | { | ||
1364 | return this.packageIdField; | ||
1365 | } | ||
1366 | set | ||
1367 | { | ||
1368 | this.packageIdFieldSet = true; | ||
1369 | this.packageIdField = value; | ||
1370 | } | ||
1371 | } | ||
1372 | |||
1373 | /// <summary> | ||
1374 | /// Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. | ||
1375 | /// The default is 'no'. | ||
1376 | /// </summary> | ||
1377 | public YesNoType Permanent | ||
1378 | { | ||
1379 | get | ||
1380 | { | ||
1381 | return this.permanentField; | ||
1382 | } | ||
1383 | set | ||
1384 | { | ||
1385 | this.permanentFieldSet = true; | ||
1386 | this.permanentField = value; | ||
1387 | } | ||
1388 | } | ||
1389 | |||
1390 | /// <summary> | ||
1391 | /// Specifies the SKU of Visual Studio in which to register the extension. If no target | ||
1392 | /// is specified the extension is registered with all installed SKUs. If the Target | ||
1393 | /// attribute is specified the TargetVersion attribute must also be specified. The | ||
1394 | /// following is a list of known Visual Studio targets: integratedShell, professional, | ||
1395 | /// premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress | ||
1396 | /// </summary> | ||
1397 | public string Target | ||
1398 | { | ||
1399 | get | ||
1400 | { | ||
1401 | return this.targetField; | ||
1402 | } | ||
1403 | set | ||
1404 | { | ||
1405 | this.targetFieldSet = true; | ||
1406 | this.targetField = value; | ||
1407 | } | ||
1408 | } | ||
1409 | |||
1410 | /// <summary> | ||
1411 | /// Specifies the version of Visual Studio in which to register the extension. This attribute | ||
1412 | /// is required if the Target attribute is specified. | ||
1413 | /// </summary> | ||
1414 | public string TargetVersion | ||
1415 | { | ||
1416 | get | ||
1417 | { | ||
1418 | return this.targetVersionField; | ||
1419 | } | ||
1420 | set | ||
1421 | { | ||
1422 | this.targetVersionFieldSet = true; | ||
1423 | this.targetVersionField = value; | ||
1424 | } | ||
1425 | } | ||
1426 | |||
1427 | /// <summary> | ||
1428 | /// Indicates whether failure to install the VSIX package causes the installation to rollback. | ||
1429 | /// The default is 'yes'. | ||
1430 | /// </summary> | ||
1431 | public YesNoType Vital | ||
1432 | { | ||
1433 | get | ||
1434 | { | ||
1435 | return this.vitalField; | ||
1436 | } | ||
1437 | set | ||
1438 | { | ||
1439 | this.vitalFieldSet = true; | ||
1440 | this.vitalField = value; | ||
1441 | } | ||
1442 | } | ||
1443 | |||
1444 | /// <summary> | ||
1445 | /// Optional reference to a Property element that contains the path to the VsixInstaller.exe. | ||
1446 | /// By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX | ||
1447 | /// package. It is highly recommended that this attribute is *not* used. | ||
1448 | /// </summary> | ||
1449 | public string VsixInstallerPathProperty | ||
1450 | { | ||
1451 | get | ||
1452 | { | ||
1453 | return this.vsixInstallerPathPropertyField; | ||
1454 | } | ||
1455 | set | ||
1456 | { | ||
1457 | this.vsixInstallerPathPropertyFieldSet = true; | ||
1458 | this.vsixInstallerPathPropertyField = value; | ||
1459 | } | ||
1460 | } | ||
1461 | |||
1462 | public virtual ISchemaElement ParentElement | ||
1463 | { | ||
1464 | get | ||
1465 | { | ||
1466 | return this.parentElement; | ||
1467 | } | ||
1468 | set | ||
1469 | { | ||
1470 | this.parentElement = value; | ||
1471 | } | ||
1472 | } | ||
1473 | |||
1474 | /// <summary> | ||
1475 | /// Processes this element and all child elements into an XmlWriter. | ||
1476 | /// </summary> | ||
1477 | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] | ||
1478 | public virtual void OutputXml(XmlWriter writer) | ||
1479 | { | ||
1480 | if ((null == writer)) | ||
1481 | { | ||
1482 | throw new ArgumentNullException("writer"); | ||
1483 | } | ||
1484 | writer.WriteStartElement("VsixPackage", "http://wixtoolset.org/schemas/v4/wxs/vs"); | ||
1485 | if (this.fileFieldSet) | ||
1486 | { | ||
1487 | writer.WriteAttributeString("File", this.fileField); | ||
1488 | } | ||
1489 | if (this.packageIdFieldSet) | ||
1490 | { | ||
1491 | writer.WriteAttributeString("PackageId", this.packageIdField); | ||
1492 | } | ||
1493 | if (this.permanentFieldSet) | ||
1494 | { | ||
1495 | if ((this.permanentField == YesNoType.no)) | ||
1496 | { | ||
1497 | writer.WriteAttributeString("Permanent", "no"); | ||
1498 | } | ||
1499 | if ((this.permanentField == YesNoType.yes)) | ||
1500 | { | ||
1501 | writer.WriteAttributeString("Permanent", "yes"); | ||
1502 | } | ||
1503 | } | ||
1504 | if (this.targetFieldSet) | ||
1505 | { | ||
1506 | writer.WriteAttributeString("Target", this.targetField); | ||
1507 | } | ||
1508 | if (this.targetVersionFieldSet) | ||
1509 | { | ||
1510 | writer.WriteAttributeString("TargetVersion", this.targetVersionField); | ||
1511 | } | ||
1512 | if (this.vitalFieldSet) | ||
1513 | { | ||
1514 | if ((this.vitalField == YesNoType.no)) | ||
1515 | { | ||
1516 | writer.WriteAttributeString("Vital", "no"); | ||
1517 | } | ||
1518 | if ((this.vitalField == YesNoType.yes)) | ||
1519 | { | ||
1520 | writer.WriteAttributeString("Vital", "yes"); | ||
1521 | } | ||
1522 | } | ||
1523 | if (this.vsixInstallerPathPropertyFieldSet) | ||
1524 | { | ||
1525 | writer.WriteAttributeString("VsixInstallerPathProperty", this.vsixInstallerPathPropertyField); | ||
1526 | } | ||
1527 | writer.WriteEndElement(); | ||
1528 | } | ||
1529 | |||
1530 | [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] | ||
1531 | void ISetAttributes.SetAttribute(string name, string value) | ||
1532 | { | ||
1533 | if (String.IsNullOrEmpty(name)) | ||
1534 | { | ||
1535 | throw new ArgumentNullException("name"); | ||
1536 | } | ||
1537 | if (("File" == name)) | ||
1538 | { | ||
1539 | this.fileField = value; | ||
1540 | this.fileFieldSet = true; | ||
1541 | } | ||
1542 | if (("PackageId" == name)) | ||
1543 | { | ||
1544 | this.packageIdField = value; | ||
1545 | this.packageIdFieldSet = true; | ||
1546 | } | ||
1547 | if (("Permanent" == name)) | ||
1548 | { | ||
1549 | this.permanentField = Enums.ParseYesNoType(value); | ||
1550 | this.permanentFieldSet = true; | ||
1551 | } | ||
1552 | if (("Target" == name)) | ||
1553 | { | ||
1554 | this.targetField = value; | ||
1555 | this.targetFieldSet = true; | ||
1556 | } | ||
1557 | if (("TargetVersion" == name)) | ||
1558 | { | ||
1559 | this.targetVersionField = value; | ||
1560 | this.targetVersionFieldSet = true; | ||
1561 | } | ||
1562 | if (("Vital" == name)) | ||
1563 | { | ||
1564 | this.vitalField = Enums.ParseYesNoType(value); | ||
1565 | this.vitalFieldSet = true; | ||
1566 | } | ||
1567 | if (("VsixInstallerPathProperty" == name)) | ||
1568 | { | ||
1569 | this.vsixInstallerPathPropertyField = value; | ||
1570 | this.vsixInstallerPathPropertyFieldSet = true; | ||
1571 | } | ||
1572 | } | ||
1573 | } | ||
1574 | } | ||