//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ #pragma warning disable 1591 namespace WixToolset.Harvesters.Serialize.Util { using System; using System.CodeDom.Compiler; using System.Collections; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Xml; using WixToolset.Harvesters.Serialize; /// /// Values of this type will either be "yes" or "no". /// [GeneratedCode("XsdGen", "4.0.0.0")] public enum YesNoType { IllegalValue = int.MaxValue, NotSet = -1, no, yes, } [GeneratedCode("XsdGen", "4.0.0.0")] public class Enums { /// /// Parses a YesNoType from a string. /// public static YesNoType ParseYesNoType(string value) { YesNoType parsedValue; Enums.TryParseYesNoType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a YesNoType from a string. /// public static bool TryParseYesNoType(string value, out YesNoType parsedValue) { parsedValue = YesNoType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("no" == value)) { parsedValue = YesNoType.no; } else { if (("yes" == value)) { parsedValue = YesNoType.yes; } else { parsedValue = YesNoType.IllegalValue; return false; } } return true; } /// /// Parses a PerformanceCounterLanguageType from a string. /// public static PerformanceCounterLanguageType ParsePerformanceCounterLanguageType(string value) { PerformanceCounterLanguageType parsedValue; Enums.TryParsePerformanceCounterLanguageType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a PerformanceCounterLanguageType from a string. /// public static bool TryParsePerformanceCounterLanguageType(string value, out PerformanceCounterLanguageType parsedValue) { parsedValue = PerformanceCounterLanguageType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("afrikaans" == value)) { parsedValue = PerformanceCounterLanguageType.afrikaans; } else { if (("albanian" == value)) { parsedValue = PerformanceCounterLanguageType.albanian; } else { if (("arabic" == value)) { parsedValue = PerformanceCounterLanguageType.arabic; } else { if (("armenian" == value)) { parsedValue = PerformanceCounterLanguageType.armenian; } else { if (("assamese" == value)) { parsedValue = PerformanceCounterLanguageType.assamese; } else { if (("azeri" == value)) { parsedValue = PerformanceCounterLanguageType.azeri; } else { if (("basque" == value)) { parsedValue = PerformanceCounterLanguageType.basque; } else { if (("belarusian" == value)) { parsedValue = PerformanceCounterLanguageType.belarusian; } else { if (("bengali" == value)) { parsedValue = PerformanceCounterLanguageType.bengali; } else { if (("bulgarian" == value)) { parsedValue = PerformanceCounterLanguageType.bulgarian; } else { if (("catalan" == value)) { parsedValue = PerformanceCounterLanguageType.catalan; } else { if (("chinese" == value)) { parsedValue = PerformanceCounterLanguageType.chinese; } else { if (("croatian" == value)) { parsedValue = PerformanceCounterLanguageType.croatian; } else { if (("czech" == value)) { parsedValue = PerformanceCounterLanguageType.czech; } else { if (("danish" == value)) { parsedValue = PerformanceCounterLanguageType.danish; } else { if (("divehi" == value)) { parsedValue = PerformanceCounterLanguageType.divehi; } else { if (("dutch" == value)) { parsedValue = PerformanceCounterLanguageType.dutch; } else { if (("english" == value)) { parsedValue = PerformanceCounterLanguageType.english; } else { if (("estonian" == value)) { parsedValue = PerformanceCounterLanguageType.estonian; } else { if (("faeroese" == value)) { parsedValue = PerformanceCounterLanguageType.faeroese; } else { if (("farsi" == value)) { parsedValue = PerformanceCounterLanguageType.farsi; } else { if (("finnish" == value)) { parsedValue = PerformanceCounterLanguageType.finnish; } else { if (("french" == value)) { parsedValue = PerformanceCounterLanguageType.french; } else { if (("galician" == value)) { parsedValue = PerformanceCounterLanguageType.galician; } else { if (("georgian" == value)) { parsedValue = PerformanceCounterLanguageType.georgian; } else { if (("german" == value)) { parsedValue = PerformanceCounterLanguageType.german; } else { if (("greek" == value)) { parsedValue = PerformanceCounterLanguageType.greek; } else { if (("gujarati" == value)) { parsedValue = PerformanceCounterLanguageType.gujarati; } else { if (("hebrew" == value)) { parsedValue = PerformanceCounterLanguageType.hebrew; } else { if (("hindi" == value)) { parsedValue = PerformanceCounterLanguageType.hindi; } else { if (("hungarian" == value)) { parsedValue = PerformanceCounterLanguageType.hungarian; } else { if (("icelandic" == value)) { parsedValue = PerformanceCounterLanguageType.icelandic; } else { if (("indonesian" == value)) { parsedValue = PerformanceCounterLanguageType.indonesian; } else { if (("italian" == value)) { parsedValue = PerformanceCounterLanguageType.italian; } else { if (("japanese" == value)) { parsedValue = PerformanceCounterLanguageType.japanese; } else { if (("kannada" == value)) { parsedValue = PerformanceCounterLanguageType.kannada; } else { if (("kashmiri" == value)) { parsedValue = PerformanceCounterLanguageType.kashmiri; } else { if (("kazak" == value)) { parsedValue = PerformanceCounterLanguageType.kazak; } else { if (("konkani" == value)) { parsedValue = PerformanceCounterLanguageType.konkani; } else { if (("korean" == value)) { parsedValue = PerformanceCounterLanguageType.korean; } else { if (("kyrgyz" == value)) { parsedValue = PerformanceCounterLanguageType.kyrgyz; } else { if (("latvian" == value)) { parsedValue = PerformanceCounterLanguageType.latvian; } else { if (("lithuanian" == value)) { parsedValue = PerformanceCounterLanguageType.lithuanian; } else { if (("macedonian" == value)) { parsedValue = PerformanceCounterLanguageType.macedonian; } else { if (("malay" == value)) { parsedValue = PerformanceCounterLanguageType.malay; } else { if (("malayalam" == value)) { parsedValue = PerformanceCounterLanguageType.malayalam; } else { if (("manipuri" == value)) { parsedValue = PerformanceCounterLanguageType.manipuri; } else { if (("marathi" == value)) { parsedValue = PerformanceCounterLanguageType.marathi; } else { if (("mongolian" == value)) { parsedValue = PerformanceCounterLanguageType.mongolian; } else { if (("nepali" == value)) { parsedValue = PerformanceCounterLanguageType.nepali; } else { if (("norwegian" == value)) { parsedValue = PerformanceCounterLanguageType.norwegian; } else { if (("oriya" == value)) { parsedValue = PerformanceCounterLanguageType.oriya; } else { if (("polish" == value)) { parsedValue = PerformanceCounterLanguageType.polish; } else { if (("portuguese" == value)) { parsedValue = PerformanceCounterLanguageType.portuguese; } else { if (("punjabi" == value)) { parsedValue = PerformanceCounterLanguageType.punjabi; } else { if (("romanian" == value)) { parsedValue = PerformanceCounterLanguageType.romanian; } else { if (("russian" == value)) { parsedValue = PerformanceCounterLanguageType.russian; } else { if (("sanskrit" == value)) { parsedValue = PerformanceCounterLanguageType.sanskrit; } else { if (("serbian" == value)) { parsedValue = PerformanceCounterLanguageType.serbian; } else { if (("sindhi" == value)) { parsedValue = PerformanceCounterLanguageType.sindhi; } else { if (("slovak" == value)) { parsedValue = PerformanceCounterLanguageType.slovak; } else { if (("slovenian" == value)) { parsedValue = PerformanceCounterLanguageType.slovenian; } else { if (("spanish" == value)) { parsedValue = PerformanceCounterLanguageType.spanish; } else { if (("swahili" == value)) { parsedValue = PerformanceCounterLanguageType.swahili; } else { if (("swedish" == value)) { parsedValue = PerformanceCounterLanguageType.swedish; } else { if (("syriac" == value)) { parsedValue = PerformanceCounterLanguageType.syriac; } else { if (("tamil" == value)) { parsedValue = PerformanceCounterLanguageType.tamil; } else { if (("tatar" == value)) { parsedValue = PerformanceCounterLanguageType.tatar; } else { if (("telugu" == value)) { parsedValue = PerformanceCounterLanguageType.telugu; } else { if (("thai" == value)) { parsedValue = PerformanceCounterLanguageType.thai; } else { if (("turkish" == value)) { parsedValue = PerformanceCounterLanguageType.turkish; } else { if (("ukrainian" == value)) { parsedValue = PerformanceCounterLanguageType.ukrainian; } else { if (("urdu" == value)) { parsedValue = PerformanceCounterLanguageType.urdu; } else { if (("uzbek" == value)) { parsedValue = PerformanceCounterLanguageType.uzbek; } else { if (("vietnamese" == value)) { parsedValue = PerformanceCounterLanguageType.vietnamese; } else { parsedValue = PerformanceCounterLanguageType.IllegalValue; return false; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } return true; } /// /// Parses a PerformanceCounterTypesType from a string. /// public static PerformanceCounterTypesType ParsePerformanceCounterTypesType(string value) { PerformanceCounterTypesType parsedValue; Enums.TryParsePerformanceCounterTypesType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a PerformanceCounterTypesType from a string. /// public static bool TryParsePerformanceCounterTypesType(string value, out PerformanceCounterTypesType parsedValue) { parsedValue = PerformanceCounterTypesType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("averageBase" == value)) { parsedValue = PerformanceCounterTypesType.averageBase; } else { if (("averageCount64" == value)) { parsedValue = PerformanceCounterTypesType.averageCount64; } else { if (("averageTimer32" == value)) { parsedValue = PerformanceCounterTypesType.averageTimer32; } else { if (("counterDelta32" == value)) { parsedValue = PerformanceCounterTypesType.counterDelta32; } else { if (("counterTimerInverse" == value)) { parsedValue = PerformanceCounterTypesType.counterTimerInverse; } else { if (("sampleFraction" == value)) { parsedValue = PerformanceCounterTypesType.sampleFraction; } else { if (("timer100Ns" == value)) { parsedValue = PerformanceCounterTypesType.timer100Ns; } else { if (("counterTimer" == value)) { parsedValue = PerformanceCounterTypesType.counterTimer; } else { if (("rawFraction" == value)) { parsedValue = PerformanceCounterTypesType.rawFraction; } else { if (("timer100NsInverse" == value)) { parsedValue = PerformanceCounterTypesType.timer100NsInverse; } else { if (("counterMultiTimer" == value)) { parsedValue = PerformanceCounterTypesType.counterMultiTimer; } else { if (("counterMultiTimer100Ns" == value)) { parsedValue = PerformanceCounterTypesType.counterMultiTimer100Ns; } else { if (("counterMultiTimerInverse" == value)) { parsedValue = PerformanceCounterTypesType.counterMultiTimerInverse; } else { if (("counterMultiTimer100NsInverse" == value)) { parsedValue = PerformanceCounterTypesType.counterMultiTimer100NsInverse; } else { if (("elapsedTime" == value)) { parsedValue = PerformanceCounterTypesType.elapsedTime; } else { if (("sampleBase" == value)) { parsedValue = PerformanceCounterTypesType.sampleBase; } else { if (("rawBase" == value)) { parsedValue = PerformanceCounterTypesType.rawBase; } else { if (("counterMultiBase" == value)) { parsedValue = PerformanceCounterTypesType.counterMultiBase; } else { if (("rateOfCountsPerSecond64" == value)) { parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond64; } else { if (("rateOfCountsPerSecond32" == value)) { parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond32; } else { if (("countPerTimeInterval64" == value)) { parsedValue = PerformanceCounterTypesType.countPerTimeInterval64; } else { if (("countPerTimeInterval32" == value)) { parsedValue = PerformanceCounterTypesType.countPerTimeInterval32; } else { if (("sampleCounter" == value)) { parsedValue = PerformanceCounterTypesType.sampleCounter; } else { if (("counterDelta64" == value)) { parsedValue = PerformanceCounterTypesType.counterDelta64; } else { if (("numberOfItems64" == value)) { parsedValue = PerformanceCounterTypesType.numberOfItems64; } else { if (("numberOfItems32" == value)) { parsedValue = PerformanceCounterTypesType.numberOfItems32; } else { if (("numberOfItemsHEX64" == value)) { parsedValue = PerformanceCounterTypesType.numberOfItemsHEX64; } else { if (("numberOfItemsHEX32" == value)) { parsedValue = PerformanceCounterTypesType.numberOfItemsHEX32; } else { parsedValue = PerformanceCounterTypesType.IllegalValue; return false; } } } } } } } } } } } } } } } } } } } } } } } } } } } } return true; } } /// /// Enumeration of valid languages for performance counters. /// [GeneratedCode("XsdGen", "4.0.0.0")] public enum PerformanceCounterLanguageType { IllegalValue = int.MaxValue, NotSet = -1, afrikaans, albanian, arabic, armenian, assamese, azeri, basque, belarusian, bengali, bulgarian, catalan, chinese, croatian, czech, danish, divehi, dutch, english, estonian, faeroese, farsi, finnish, french, galician, georgian, german, greek, gujarati, hebrew, hindi, hungarian, icelandic, indonesian, italian, japanese, kannada, kashmiri, kazak, konkani, korean, kyrgyz, latvian, lithuanian, macedonian, malay, malayalam, manipuri, marathi, mongolian, nepali, norwegian, oriya, polish, portuguese, punjabi, romanian, russian, sanskrit, serbian, sindhi, slovak, slovenian, spanish, swahili, swedish, syriac, tamil, tatar, telugu, thai, turkish, ukrainian, urdu, uzbek, vietnamese, } /// /// Enumeration of valid types for performance counters. /// [GeneratedCode("XsdGen", "4.0.0.0")] public enum PerformanceCounterTypesType { IllegalValue = int.MaxValue, NotSet = -1, averageBase, averageCount64, averageTimer32, counterDelta32, counterTimerInverse, sampleFraction, timer100Ns, counterTimer, rawFraction, timer100NsInverse, counterMultiTimer, counterMultiTimer100Ns, counterMultiTimerInverse, counterMultiTimer100NsInverse, elapsedTime, sampleBase, rawBase, counterMultiBase, rateOfCountsPerSecond64, rateOfCountsPerSecond32, countPerTimeInterval64, countPerTimeInterval32, sampleCounter, counterDelta64, numberOfItems64, numberOfItems32, numberOfItemsHEX64, numberOfItemsHEX32, } /// /// Closes applications or schedules a reboot if application cannot be closed. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class CloseApplication : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string targetField; private bool targetFieldSet; private string descriptionField; private bool descriptionFieldSet; private int sequenceField; private bool sequenceFieldSet; private YesNoType closeMessageField; private bool closeMessageFieldSet; private YesNoType endSessionMessageField; private bool endSessionMessageFieldSet; private YesNoType elevatedCloseMessageField; private bool elevatedCloseMessageFieldSet; private YesNoType elevatedEndSessionMessageField; private bool elevatedEndSessionMessageFieldSet; private YesNoType rebootPromptField; private bool rebootPromptFieldSet; private YesNoType promptToContinueField; private bool promptToContinueFieldSet; private string propertyField; private bool propertyFieldSet; private int terminateProcessField; private bool terminateProcessFieldSet; private int timeoutField; private bool timeoutFieldSet; private string contentField; private bool contentFieldSet; private ISchemaElement parentElement; /// /// Identifier for the close application (primary key). If the Id is not specified, one will be generated. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the exectuable to be closed. This should only be the file name. /// public string Target { get { return this.targetField; } set { this.targetFieldSet = true; this.targetField = value; } } /// /// Description to show if application is running and needs to be closed. /// public string Description { get { return this.descriptionField; } set { this.descriptionFieldSet = true; this.descriptionField = value; } } /// /// Optionally orders the applications to be closed. /// public int Sequence { get { return this.sequenceField; } set { this.sequenceFieldSet = true; this.sequenceField = value; } } /// /// Optionally sends a close message to the application. Default is no. /// public YesNoType CloseMessage { get { return this.closeMessageField; } set { this.closeMessageFieldSet = true; this.closeMessageField = value; } } /// /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no". /// public YesNoType EndSessionMessage { get { return this.endSessionMessageField; } set { this.endSessionMessageFieldSet = true; this.endSessionMessageField = value; } } /// /// Optionally sends a close message to the application from deffered action without impersonation. Default is no. /// public YesNoType ElevatedCloseMessage { get { return this.elevatedCloseMessageField; } set { this.elevatedCloseMessageFieldSet = true; this.elevatedCloseMessageField = value; } } /// /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no". /// public YesNoType ElevatedEndSessionMessage { get { return this.elevatedEndSessionMessageField; } set { this.elevatedEndSessionMessageFieldSet = true; this.elevatedEndSessionMessageField = value; } } /// /// Optionally prompts for reboot if application is still running. The default is "yes". The TerminateProcess attribute must be "no" or not specified if this attribute is "yes". /// public YesNoType RebootPrompt { get { return this.rebootPromptField; } set { this.rebootPromptFieldSet = true; this.rebootPromptField = value; } } /// /// When this attribute is set to "yes", the user will be prompted when the application is still running. The Description attribute must contain the message to /// display in the prompt. The prompt occurs before executing any of the other options and gives the options to "Abort", "Retry", or "Ignore". Abort will cancel /// the install. Retry will attempt the check again and if the application is still running, prompt again. "Ignore" will continue and execute any other options /// set on the CloseApplication element. The default is "no". /// public YesNoType PromptToContinue { get { return this.promptToContinueField; } set { this.promptToContinueFieldSet = true; this.promptToContinueField = value; } } /// /// Property to be set if application is still running. Useful for launch conditions or to conditionalize custom UI to ask user to shut down apps. /// public string Property { get { return this.propertyField; } set { this.propertyFieldSet = true; this.propertyField = value; } } /// /// Attempts to terminates process and return the specified exit code if application is still running after sending any requested close and/or end session messages. /// If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no". /// public int TerminateProcess { get { return this.terminateProcessField; } set { this.terminateProcessFieldSet = true; this.terminateProcessField = value; } } /// /// Optional time in seconds to wait for the application to exit after the close and/or end session messages. If the application is still running after the timeout then /// the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds. /// public int Timeout { get { return this.timeoutField; } set { this.timeoutFieldSet = true; this.timeoutField = value; } } /// /// Condition that determines if the application should be closed. Must be blank or evaluate to true /// for the application to be scheduled for closing. /// public string Content { get { return this.contentField; } set { this.contentFieldSet = true; this.contentField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("CloseApplication", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.targetFieldSet) { writer.WriteAttributeString("Target", this.targetField); } if (this.descriptionFieldSet) { writer.WriteAttributeString("Description", this.descriptionField); } if (this.sequenceFieldSet) { writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); } if (this.closeMessageFieldSet) { if ((this.closeMessageField == YesNoType.no)) { writer.WriteAttributeString("CloseMessage", "no"); } if ((this.closeMessageField == YesNoType.yes)) { writer.WriteAttributeString("CloseMessage", "yes"); } } if (this.endSessionMessageFieldSet) { if ((this.endSessionMessageField == YesNoType.no)) { writer.WriteAttributeString("EndSessionMessage", "no"); } if ((this.endSessionMessageField == YesNoType.yes)) { writer.WriteAttributeString("EndSessionMessage", "yes"); } } if (this.elevatedCloseMessageFieldSet) { if ((this.elevatedCloseMessageField == YesNoType.no)) { writer.WriteAttributeString("ElevatedCloseMessage", "no"); } if ((this.elevatedCloseMessageField == YesNoType.yes)) { writer.WriteAttributeString("ElevatedCloseMessage", "yes"); } } if (this.elevatedEndSessionMessageFieldSet) { if ((this.elevatedEndSessionMessageField == YesNoType.no)) { writer.WriteAttributeString("ElevatedEndSessionMessage", "no"); } if ((this.elevatedEndSessionMessageField == YesNoType.yes)) { writer.WriteAttributeString("ElevatedEndSessionMessage", "yes"); } } if (this.rebootPromptFieldSet) { if ((this.rebootPromptField == YesNoType.no)) { writer.WriteAttributeString("RebootPrompt", "no"); } if ((this.rebootPromptField == YesNoType.yes)) { writer.WriteAttributeString("RebootPrompt", "yes"); } } if (this.promptToContinueFieldSet) { if ((this.promptToContinueField == YesNoType.no)) { writer.WriteAttributeString("PromptToContinue", "no"); } if ((this.promptToContinueField == YesNoType.yes)) { writer.WriteAttributeString("PromptToContinue", "yes"); } } if (this.propertyFieldSet) { writer.WriteAttributeString("Property", this.propertyField); } if (this.terminateProcessFieldSet) { writer.WriteAttributeString("TerminateProcess", this.terminateProcessField.ToString(CultureInfo.InvariantCulture)); } if (this.timeoutFieldSet) { writer.WriteAttributeString("Timeout", this.timeoutField.ToString(CultureInfo.InvariantCulture)); } if (this.contentFieldSet) { writer.WriteString(this.contentField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Target" == name)) { this.targetField = value; this.targetFieldSet = true; } if (("Description" == name)) { this.descriptionField = value; this.descriptionFieldSet = true; } if (("Sequence" == name)) { this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.sequenceFieldSet = true; } if (("CloseMessage" == name)) { this.closeMessageField = Enums.ParseYesNoType(value); this.closeMessageFieldSet = true; } if (("EndSessionMessage" == name)) { this.endSessionMessageField = Enums.ParseYesNoType(value); this.endSessionMessageFieldSet = true; } if (("ElevatedCloseMessage" == name)) { this.elevatedCloseMessageField = Enums.ParseYesNoType(value); this.elevatedCloseMessageFieldSet = true; } if (("ElevatedEndSessionMessage" == name)) { this.elevatedEndSessionMessageField = Enums.ParseYesNoType(value); this.elevatedEndSessionMessageFieldSet = true; } if (("RebootPrompt" == name)) { this.rebootPromptField = Enums.ParseYesNoType(value); this.rebootPromptFieldSet = true; } if (("PromptToContinue" == name)) { this.promptToContinueField = Enums.ParseYesNoType(value); this.promptToContinueFieldSet = true; } if (("Property" == name)) { this.propertyField = value; this.propertyFieldSet = true; } if (("TerminateProcess" == name)) { this.terminateProcessField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.terminateProcessFieldSet = true; } if (("Timeout" == name)) { this.timeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.timeoutFieldSet = true; } if (("Content" == name)) { this.contentField = value; this.contentFieldSet = true; } } } /// /// Describes a component search. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class ComponentSearch : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string variableField; private bool variableFieldSet; private string conditionField; private bool conditionFieldSet; private string afterField; private bool afterFieldSet; private string guidField; private bool guidFieldSet; private string productCodeField; private bool productCodeFieldSet; private ResultType resultField; private bool resultFieldSet; private ISchemaElement parentElement; /// /// Id of the search for ordering and dependency. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the variable in which to place the result of the search. /// public string Variable { get { return this.variableField; } set { this.variableFieldSet = true; this.variableField = value; } } /// /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. /// public string Condition { get { return this.conditionField; } set { this.conditionFieldSet = true; this.conditionField = value; } } /// /// Id of the search that this one should come after. /// public string After { get { return this.afterField; } set { this.afterFieldSet = true; this.afterField = value; } } /// /// Component to search for. /// public string Guid { get { return this.guidField; } set { this.guidFieldSet = true; this.guidField = value; } } /// /// Optional ProductCode to determine if the component is installed. /// public string ProductCode { get { return this.productCodeField; } set { this.productCodeFieldSet = true; this.productCodeField = value; } } /// /// Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead. /// public ResultType Result { get { return this.resultField; } set { this.resultFieldSet = true; this.resultField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a ResultType from a string. /// public static ResultType ParseResultType(string value) { ResultType parsedValue; ComponentSearch.TryParseResultType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ResultType from a string. /// public static bool TryParseResultType(string value, out ResultType parsedValue) { parsedValue = ResultType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("directory" == value)) { parsedValue = ResultType.directory; } else { if (("state" == value)) { parsedValue = ResultType.state; } else { if (("keyPath" == value)) { parsedValue = ResultType.keyPath; } else { parsedValue = ResultType.IllegalValue; return false; } } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.variableFieldSet) { writer.WriteAttributeString("Variable", this.variableField); } if (this.conditionFieldSet) { writer.WriteAttributeString("Condition", this.conditionField); } if (this.afterFieldSet) { writer.WriteAttributeString("After", this.afterField); } if (this.guidFieldSet) { writer.WriteAttributeString("Guid", this.guidField); } if (this.productCodeFieldSet) { writer.WriteAttributeString("ProductCode", this.productCodeField); } if (this.resultFieldSet) { if ((this.resultField == ResultType.directory)) { writer.WriteAttributeString("Result", "directory"); } if ((this.resultField == ResultType.state)) { writer.WriteAttributeString("Result", "state"); } if ((this.resultField == ResultType.keyPath)) { writer.WriteAttributeString("Result", "keyPath"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Variable" == name)) { this.variableField = value; this.variableFieldSet = true; } if (("Condition" == name)) { this.conditionField = value; this.conditionFieldSet = true; } if (("After" == name)) { this.afterField = value; this.afterFieldSet = true; } if (("Guid" == name)) { this.guidField = value; this.guidFieldSet = true; } if (("ProductCode" == name)) { this.productCodeField = value; this.productCodeFieldSet = true; } if (("Result" == name)) { this.resultField = ComponentSearch.ParseResultType(value); this.resultFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ResultType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Saves the parent directory for the component's file key path; other types of key path are returned unmodified. /// directory, /// /// Saves the state of the component: absent (2), locally installed (3), will run from source (4), or installed in default location (either local or from source) (5) /// state, /// /// Saves the key path of the component if installed. This is the default. /// keyPath, } } /// /// References a ComponentSearch. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class ComponentSearchRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("ComponentSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Describes a directory search. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class DirectorySearch : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string variableField; private bool variableFieldSet; private string conditionField; private bool conditionFieldSet; private string afterField; private bool afterFieldSet; private string pathField; private bool pathFieldSet; private ResultType resultField; private bool resultFieldSet; private ISchemaElement parentElement; /// /// Id of the search for ordering and dependency. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the variable in which to place the result of the search. /// public string Variable { get { return this.variableField; } set { this.variableFieldSet = true; this.variableField = value; } } /// /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. /// public string Condition { get { return this.conditionField; } set { this.conditionFieldSet = true; this.conditionField = value; } } /// /// Id of the search that this one should come after. /// public string After { get { return this.afterField; } set { this.afterFieldSet = true; this.afterField = value; } } /// /// Directory path to search for. /// public string Path { get { return this.pathField; } set { this.pathFieldSet = true; this.pathField = value; } } /// /// Rather than saving the matching directory path into the variable, a DirectorySearch can save an /// attribute of the matching directory instead. /// public ResultType Result { get { return this.resultField; } set { this.resultFieldSet = true; this.resultField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a ResultType from a string. /// public static ResultType ParseResultType(string value) { ResultType parsedValue; DirectorySearch.TryParseResultType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ResultType from a string. /// public static bool TryParseResultType(string value, out ResultType parsedValue) { parsedValue = ResultType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("exists" == value)) { parsedValue = ResultType.exists; } else { parsedValue = ResultType.IllegalValue; return false; } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.variableFieldSet) { writer.WriteAttributeString("Variable", this.variableField); } if (this.conditionFieldSet) { writer.WriteAttributeString("Condition", this.conditionField); } if (this.afterFieldSet) { writer.WriteAttributeString("After", this.afterField); } if (this.pathFieldSet) { writer.WriteAttributeString("Path", this.pathField); } if (this.resultFieldSet) { if ((this.resultField == ResultType.exists)) { writer.WriteAttributeString("Result", "exists"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Variable" == name)) { this.variableField = value; this.variableFieldSet = true; } if (("Condition" == name)) { this.conditionField = value; this.conditionFieldSet = true; } if (("After" == name)) { this.afterField = value; this.afterFieldSet = true; } if (("Path" == name)) { this.pathField = value; this.pathFieldSet = true; } if (("Result" == name)) { this.resultField = DirectorySearch.ParseResultType(value); this.resultFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ResultType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Saves true if a matching directory is found; false otherwise. /// exists, } } /// /// References a DirectorySearch. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class DirectorySearchRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Creates an event source. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class EventSource : ISchemaElement, ISetAttributes { private int categoryCountField; private bool categoryCountFieldSet; private string categoryMessageFileField; private bool categoryMessageFileFieldSet; private string eventMessageFileField; private bool eventMessageFileFieldSet; private YesNoType keyPathField; private bool keyPathFieldSet; private string logField; private bool logFieldSet; private string nameField; private bool nameFieldSet; private string parameterMessageFileField; private bool parameterMessageFileFieldSet; private YesNoType supportsErrorsField; private bool supportsErrorsFieldSet; private YesNoType supportsFailureAuditsField; private bool supportsFailureAuditsFieldSet; private YesNoType supportsInformationalsField; private bool supportsInformationalsFieldSet; private YesNoType supportsSuccessAuditsField; private bool supportsSuccessAuditsFieldSet; private YesNoType supportsWarningsField; private bool supportsWarningsFieldSet; private ISchemaElement parentElement; /// /// The number of categories in CategoryMessageFile. CategoryMessageFile /// must be specified too. /// public int CategoryCount { get { return this.categoryCountField; } set { this.categoryCountFieldSet = true; this.categoryCountField = value; } } /// /// Name of the category message file. CategoryCount must be specified too. /// Note that this is a formatted field, so you can use [#fileId] syntax to /// refer to a file being installed. It is also written as a REG_EXPAND_SZ /// string, so you can use %environment_variable% syntax to refer to a file /// already present on the user's machine. /// public string CategoryMessageFile { get { return this.categoryMessageFileField; } set { this.categoryMessageFileFieldSet = true; this.categoryMessageFileField = value; } } /// /// Name of the event message file. /// Note that this is a formatted field, so you can use [#fileId] syntax to /// refer to a file being installed. It is also written as a REG_EXPAND_SZ /// string, so you can use %environment_variable% syntax to refer to a file /// already present on the user's machine. /// public string EventMessageFile { get { return this.eventMessageFileField; } set { this.eventMessageFileFieldSet = true; this.eventMessageFileField = value; } } /// /// Marks the EventSource registry as the key path of the component it belongs to. /// public YesNoType KeyPath { get { return this.keyPathField; } set { this.keyPathFieldSet = true; this.keyPathField = value; } } /// /// Name of the event source's log. /// public string Log { get { return this.logField; } set { this.logFieldSet = true; this.logField = value; } } /// /// Name of the event source. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// Name of the parameter message file. /// Note that this is a formatted field, so you can use [#fileId] syntax to /// refer to a file being installed. It is also written as a REG_EXPAND_SZ /// string, so you can use %environment_variable% syntax to refer to a file /// already present on the user's machine. /// public string ParameterMessageFile { get { return this.parameterMessageFileField; } set { this.parameterMessageFileFieldSet = true; this.parameterMessageFileField = value; } } /// /// Equivalent to EVENTLOG_ERROR_TYPE. /// public YesNoType SupportsErrors { get { return this.supportsErrorsField; } set { this.supportsErrorsFieldSet = true; this.supportsErrorsField = value; } } /// /// Equivalent to EVENTLOG_AUDIT_FAILURE. /// public YesNoType SupportsFailureAudits { get { return this.supportsFailureAuditsField; } set { this.supportsFailureAuditsFieldSet = true; this.supportsFailureAuditsField = value; } } /// /// Equivalent to EVENTLOG_INFORMATION_TYPE. /// public YesNoType SupportsInformationals { get { return this.supportsInformationalsField; } set { this.supportsInformationalsFieldSet = true; this.supportsInformationalsField = value; } } /// /// Equivalent to EVENTLOG_AUDIT_SUCCESS. /// public YesNoType SupportsSuccessAudits { get { return this.supportsSuccessAuditsField; } set { this.supportsSuccessAuditsFieldSet = true; this.supportsSuccessAuditsField = value; } } /// /// Equivalent to EVENTLOG_WARNING_TYPE. /// public YesNoType SupportsWarnings { get { return this.supportsWarningsField; } set { this.supportsWarningsFieldSet = true; this.supportsWarningsField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("EventSource", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.categoryCountFieldSet) { writer.WriteAttributeString("CategoryCount", this.categoryCountField.ToString(CultureInfo.InvariantCulture)); } if (this.categoryMessageFileFieldSet) { writer.WriteAttributeString("CategoryMessageFile", this.categoryMessageFileField); } if (this.eventMessageFileFieldSet) { writer.WriteAttributeString("EventMessageFile", this.eventMessageFileField); } if (this.keyPathFieldSet) { if ((this.keyPathField == YesNoType.no)) { writer.WriteAttributeString("KeyPath", "no"); } if ((this.keyPathField == YesNoType.yes)) { writer.WriteAttributeString("KeyPath", "yes"); } } if (this.logFieldSet) { writer.WriteAttributeString("Log", this.logField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.parameterMessageFileFieldSet) { writer.WriteAttributeString("ParameterMessageFile", this.parameterMessageFileField); } if (this.supportsErrorsFieldSet) { if ((this.supportsErrorsField == YesNoType.no)) { writer.WriteAttributeString("SupportsErrors", "no"); } if ((this.supportsErrorsField == YesNoType.yes)) { writer.WriteAttributeString("SupportsErrors", "yes"); } } if (this.supportsFailureAuditsFieldSet) { if ((this.supportsFailureAuditsField == YesNoType.no)) { writer.WriteAttributeString("SupportsFailureAudits", "no"); } if ((this.supportsFailureAuditsField == YesNoType.yes)) { writer.WriteAttributeString("SupportsFailureAudits", "yes"); } } if (this.supportsInformationalsFieldSet) { if ((this.supportsInformationalsField == YesNoType.no)) { writer.WriteAttributeString("SupportsInformationals", "no"); } if ((this.supportsInformationalsField == YesNoType.yes)) { writer.WriteAttributeString("SupportsInformationals", "yes"); } } if (this.supportsSuccessAuditsFieldSet) { if ((this.supportsSuccessAuditsField == YesNoType.no)) { writer.WriteAttributeString("SupportsSuccessAudits", "no"); } if ((this.supportsSuccessAuditsField == YesNoType.yes)) { writer.WriteAttributeString("SupportsSuccessAudits", "yes"); } } if (this.supportsWarningsFieldSet) { if ((this.supportsWarningsField == YesNoType.no)) { writer.WriteAttributeString("SupportsWarnings", "no"); } if ((this.supportsWarningsField == YesNoType.yes)) { writer.WriteAttributeString("SupportsWarnings", "yes"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("CategoryCount" == name)) { this.categoryCountField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.categoryCountFieldSet = true; } if (("CategoryMessageFile" == name)) { this.categoryMessageFileField = value; this.categoryMessageFileFieldSet = true; } if (("EventMessageFile" == name)) { this.eventMessageFileField = value; this.eventMessageFileFieldSet = true; } if (("KeyPath" == name)) { this.keyPathField = Enums.ParseYesNoType(value); this.keyPathFieldSet = true; } if (("Log" == name)) { this.logField = value; this.logFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("ParameterMessageFile" == name)) { this.parameterMessageFileField = value; this.parameterMessageFileFieldSet = true; } if (("SupportsErrors" == name)) { this.supportsErrorsField = Enums.ParseYesNoType(value); this.supportsErrorsFieldSet = true; } if (("SupportsFailureAudits" == name)) { this.supportsFailureAuditsField = Enums.ParseYesNoType(value); this.supportsFailureAuditsFieldSet = true; } if (("SupportsInformationals" == name)) { this.supportsInformationalsField = Enums.ParseYesNoType(value); this.supportsInformationalsFieldSet = true; } if (("SupportsSuccessAudits" == name)) { this.supportsSuccessAuditsField = Enums.ParseYesNoType(value); this.supportsSuccessAuditsFieldSet = true; } if (("SupportsWarnings" == name)) { this.supportsWarningsField = Enums.ParseYesNoType(value); this.supportsWarningsFieldSet = true; } } } /// /// Describes a file search. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class FileSearch : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string variableField; private bool variableFieldSet; private string conditionField; private bool conditionFieldSet; private string afterField; private bool afterFieldSet; private string pathField; private bool pathFieldSet; private ResultType resultField; private bool resultFieldSet; private ISchemaElement parentElement; /// /// Id of the search for ordering and dependency. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the variable in which to place the result of the search. /// public string Variable { get { return this.variableField; } set { this.variableFieldSet = true; this.variableField = value; } } /// /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. /// public string Condition { get { return this.conditionField; } set { this.conditionFieldSet = true; this.conditionField = value; } } /// /// Id of the search that this one should come after. /// public string After { get { return this.afterField; } set { this.afterFieldSet = true; this.afterField = value; } } /// /// File path to search for. /// public string Path { get { return this.pathField; } set { this.pathFieldSet = true; this.pathField = value; } } /// /// Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead. /// public ResultType Result { get { return this.resultField; } set { this.resultFieldSet = true; this.resultField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a ResultType from a string. /// public static ResultType ParseResultType(string value) { ResultType parsedValue; FileSearch.TryParseResultType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ResultType from a string. /// public static bool TryParseResultType(string value, out ResultType parsedValue) { parsedValue = ResultType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("exists" == value)) { parsedValue = ResultType.exists; } else { if (("version" == value)) { parsedValue = ResultType.version; } else { parsedValue = ResultType.IllegalValue; return false; } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.variableFieldSet) { writer.WriteAttributeString("Variable", this.variableField); } if (this.conditionFieldSet) { writer.WriteAttributeString("Condition", this.conditionField); } if (this.afterFieldSet) { writer.WriteAttributeString("After", this.afterField); } if (this.pathFieldSet) { writer.WriteAttributeString("Path", this.pathField); } if (this.resultFieldSet) { if ((this.resultField == ResultType.exists)) { writer.WriteAttributeString("Result", "exists"); } if ((this.resultField == ResultType.version)) { writer.WriteAttributeString("Result", "version"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Variable" == name)) { this.variableField = value; this.variableFieldSet = true; } if (("Condition" == name)) { this.conditionField = value; this.conditionFieldSet = true; } if (("After" == name)) { this.afterField = value; this.afterFieldSet = true; } if (("Path" == name)) { this.pathField = value; this.pathFieldSet = true; } if (("Result" == name)) { this.resultField = FileSearch.ParseResultType(value); this.resultFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ResultType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Saves true if a matching file is found; false otherwise. /// exists, /// /// Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise. /// version, } } /// /// References a FileSearch. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class FileSearchRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Creates a file share out of the component's directory. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class FileShare : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes { private ElementCollection children; private string idField; private bool idFieldSet; private string nameField; private bool nameFieldSet; private string descriptionField; private bool descriptionFieldSet; private ISchemaElement parentElement; public FileShare() { ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(FileSharePermission))); this.children = childCollection0; } public virtual IEnumerable Children { get { return this.children; } } [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] public virtual IEnumerable this[System.Type childType] { get { return this.children.Filter(childType); } } /// /// Identifier for the file share (primary key). /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the file share. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// Description of the file share. /// public string Description { get { return this.descriptionField; } set { this.descriptionFieldSet = true; this.descriptionField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } public virtual void AddChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.AddElement(child); child.ParentElement = this; } public virtual void RemoveChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.RemoveElement(child); child.ParentElement = null; } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ISchemaElement ICreateChildren.CreateChild(string childName) { if (String.IsNullOrEmpty(childName)) { throw new ArgumentNullException("childName"); } ISchemaElement childValue = null; if (("FileSharePermission" == childName)) { childValue = new FileSharePermission(); } if ((null == childValue)) { throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); } return childValue; } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("FileShare", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.descriptionFieldSet) { writer.WriteAttributeString("Description", this.descriptionField); } for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) { ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); childElement.OutputXml(writer); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Description" == name)) { this.descriptionField = value; this.descriptionFieldSet = true; } } } /// /// Sets ACLs on a FileShare. This element has no Id attribute. /// The table and key are taken from the parent element. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class FileSharePermission : ISchemaElement, ISetAttributes { private string userField; private bool userFieldSet; private YesNoType readField; private bool readFieldSet; private YesNoType deleteField; private bool deleteFieldSet; private YesNoType readPermissionField; private bool readPermissionFieldSet; private YesNoType changePermissionField; private bool changePermissionFieldSet; private YesNoType takeOwnershipField; private bool takeOwnershipFieldSet; private YesNoType readAttributesField; private bool readAttributesFieldSet; private YesNoType writeAttributesField; private bool writeAttributesFieldSet; private YesNoType readExtendedAttributesField; private bool readExtendedAttributesFieldSet; private YesNoType writeExtendedAttributesField; private bool writeExtendedAttributesFieldSet; private YesNoType synchronizeField; private bool synchronizeFieldSet; private YesNoType createFileField; private bool createFileFieldSet; private YesNoType createChildField; private bool createChildFieldSet; private YesNoType deleteChildField; private bool deleteChildFieldSet; private YesNoType traverseField; private bool traverseFieldSet; private YesNoType genericAllField; private bool genericAllFieldSet; private YesNoType genericExecuteField; private bool genericExecuteFieldSet; private YesNoType genericWriteField; private bool genericWriteFieldSet; private YesNoType genericReadField; private bool genericReadFieldSet; private ISchemaElement parentElement; public string User { get { return this.userField; } set { this.userFieldSet = true; this.userField = value; } } public YesNoType Read { get { return this.readField; } set { this.readFieldSet = true; this.readField = value; } } public YesNoType Delete { get { return this.deleteField; } set { this.deleteFieldSet = true; this.deleteField = value; } } public YesNoType ReadPermission { get { return this.readPermissionField; } set { this.readPermissionFieldSet = true; this.readPermissionField = value; } } public YesNoType ChangePermission { get { return this.changePermissionField; } set { this.changePermissionFieldSet = true; this.changePermissionField = value; } } public YesNoType TakeOwnership { get { return this.takeOwnershipField; } set { this.takeOwnershipFieldSet = true; this.takeOwnershipField = value; } } public YesNoType ReadAttributes { get { return this.readAttributesField; } set { this.readAttributesFieldSet = true; this.readAttributesField = value; } } public YesNoType WriteAttributes { get { return this.writeAttributesField; } set { this.writeAttributesFieldSet = true; this.writeAttributesField = value; } } public YesNoType ReadExtendedAttributes { get { return this.readExtendedAttributesField; } set { this.readExtendedAttributesFieldSet = true; this.readExtendedAttributesField = value; } } public YesNoType WriteExtendedAttributes { get { return this.writeExtendedAttributesField; } set { this.writeExtendedAttributesFieldSet = true; this.writeExtendedAttributesField = value; } } public YesNoType Synchronize { get { return this.synchronizeField; } set { this.synchronizeFieldSet = true; this.synchronizeField = value; } } /// /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. /// public YesNoType CreateFile { get { return this.createFileField; } set { this.createFileFieldSet = true; this.createFileField = value; } } /// /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. /// public YesNoType CreateChild { get { return this.createChildField; } set { this.createChildFieldSet = true; this.createChildField = value; } } /// /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent. /// public YesNoType DeleteChild { get { return this.deleteChildField; } set { this.deleteChildFieldSet = true; this.deleteChildField = value; } } /// /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent. /// public YesNoType Traverse { get { return this.traverseField; } set { this.traverseFieldSet = true; this.traverseField = value; } } public YesNoType GenericAll { get { return this.genericAllField; } set { this.genericAllFieldSet = true; this.genericAllField = value; } } public YesNoType GenericExecute { get { return this.genericExecuteField; } set { this.genericExecuteFieldSet = true; this.genericExecuteField = value; } } public YesNoType GenericWrite { get { return this.genericWriteField; } set { this.genericWriteFieldSet = true; this.genericWriteField = value; } } /// /// specifying this will fail to grant read access /// public YesNoType GenericRead { get { return this.genericReadField; } set { this.genericReadFieldSet = true; this.genericReadField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("FileSharePermission", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.userFieldSet) { writer.WriteAttributeString("User", this.userField); } if (this.readFieldSet) { if ((this.readField == YesNoType.no)) { writer.WriteAttributeString("Read", "no"); } if ((this.readField == YesNoType.yes)) { writer.WriteAttributeString("Read", "yes"); } } if (this.deleteFieldSet) { if ((this.deleteField == YesNoType.no)) { writer.WriteAttributeString("Delete", "no"); } if ((this.deleteField == YesNoType.yes)) { writer.WriteAttributeString("Delete", "yes"); } } if (this.readPermissionFieldSet) { if ((this.readPermissionField == YesNoType.no)) { writer.WriteAttributeString("ReadPermission", "no"); } if ((this.readPermissionField == YesNoType.yes)) { writer.WriteAttributeString("ReadPermission", "yes"); } } if (this.changePermissionFieldSet) { if ((this.changePermissionField == YesNoType.no)) { writer.WriteAttributeString("ChangePermission", "no"); } if ((this.changePermissionField == YesNoType.yes)) { writer.WriteAttributeString("ChangePermission", "yes"); } } if (this.takeOwnershipFieldSet) { if ((this.takeOwnershipField == YesNoType.no)) { writer.WriteAttributeString("TakeOwnership", "no"); } if ((this.takeOwnershipField == YesNoType.yes)) { writer.WriteAttributeString("TakeOwnership", "yes"); } } if (this.readAttributesFieldSet) { if ((this.readAttributesField == YesNoType.no)) { writer.WriteAttributeString("ReadAttributes", "no"); } if ((this.readAttributesField == YesNoType.yes)) { writer.WriteAttributeString("ReadAttributes", "yes"); } } if (this.writeAttributesFieldSet) { if ((this.writeAttributesField == YesNoType.no)) { writer.WriteAttributeString("WriteAttributes", "no"); } if ((this.writeAttributesField == YesNoType.yes)) { writer.WriteAttributeString("WriteAttributes", "yes"); } } if (this.readExtendedAttributesFieldSet) { if ((this.readExtendedAttributesField == YesNoType.no)) { writer.WriteAttributeString("ReadExtendedAttributes", "no"); } if ((this.readExtendedAttributesField == YesNoType.yes)) { writer.WriteAttributeString("ReadExtendedAttributes", "yes"); } } if (this.writeExtendedAttributesFieldSet) { if ((this.writeExtendedAttributesField == YesNoType.no)) { writer.WriteAttributeString("WriteExtendedAttributes", "no"); } if ((this.writeExtendedAttributesField == YesNoType.yes)) { writer.WriteAttributeString("WriteExtendedAttributes", "yes"); } } if (this.synchronizeFieldSet) { if ((this.synchronizeField == YesNoType.no)) { writer.WriteAttributeString("Synchronize", "no"); } if ((this.synchronizeField == YesNoType.yes)) { writer.WriteAttributeString("Synchronize", "yes"); } } if (this.createFileFieldSet) { if ((this.createFileField == YesNoType.no)) { writer.WriteAttributeString("CreateFile", "no"); } if ((this.createFileField == YesNoType.yes)) { writer.WriteAttributeString("CreateFile", "yes"); } } if (this.createChildFieldSet) { if ((this.createChildField == YesNoType.no)) { writer.WriteAttributeString("CreateChild", "no"); } if ((this.createChildField == YesNoType.yes)) { writer.WriteAttributeString("CreateChild", "yes"); } } if (this.deleteChildFieldSet) { if ((this.deleteChildField == YesNoType.no)) { writer.WriteAttributeString("DeleteChild", "no"); } if ((this.deleteChildField == YesNoType.yes)) { writer.WriteAttributeString("DeleteChild", "yes"); } } if (this.traverseFieldSet) { if ((this.traverseField == YesNoType.no)) { writer.WriteAttributeString("Traverse", "no"); } if ((this.traverseField == YesNoType.yes)) { writer.WriteAttributeString("Traverse", "yes"); } } if (this.genericAllFieldSet) { if ((this.genericAllField == YesNoType.no)) { writer.WriteAttributeString("GenericAll", "no"); } if ((this.genericAllField == YesNoType.yes)) { writer.WriteAttributeString("GenericAll", "yes"); } } if (this.genericExecuteFieldSet) { if ((this.genericExecuteField == YesNoType.no)) { writer.WriteAttributeString("GenericExecute", "no"); } if ((this.genericExecuteField == YesNoType.yes)) { writer.WriteAttributeString("GenericExecute", "yes"); } } if (this.genericWriteFieldSet) { if ((this.genericWriteField == YesNoType.no)) { writer.WriteAttributeString("GenericWrite", "no"); } if ((this.genericWriteField == YesNoType.yes)) { writer.WriteAttributeString("GenericWrite", "yes"); } } if (this.genericReadFieldSet) { if ((this.genericReadField == YesNoType.no)) { writer.WriteAttributeString("GenericRead", "no"); } if ((this.genericReadField == YesNoType.yes)) { writer.WriteAttributeString("GenericRead", "yes"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("User" == name)) { this.userField = value; this.userFieldSet = true; } if (("Read" == name)) { this.readField = Enums.ParseYesNoType(value); this.readFieldSet = true; } if (("Delete" == name)) { this.deleteField = Enums.ParseYesNoType(value); this.deleteFieldSet = true; } if (("ReadPermission" == name)) { this.readPermissionField = Enums.ParseYesNoType(value); this.readPermissionFieldSet = true; } if (("ChangePermission" == name)) { this.changePermissionField = Enums.ParseYesNoType(value); this.changePermissionFieldSet = true; } if (("TakeOwnership" == name)) { this.takeOwnershipField = Enums.ParseYesNoType(value); this.takeOwnershipFieldSet = true; } if (("ReadAttributes" == name)) { this.readAttributesField = Enums.ParseYesNoType(value); this.readAttributesFieldSet = true; } if (("WriteAttributes" == name)) { this.writeAttributesField = Enums.ParseYesNoType(value); this.writeAttributesFieldSet = true; } if (("ReadExtendedAttributes" == name)) { this.readExtendedAttributesField = Enums.ParseYesNoType(value); this.readExtendedAttributesFieldSet = true; } if (("WriteExtendedAttributes" == name)) { this.writeExtendedAttributesField = Enums.ParseYesNoType(value); this.writeExtendedAttributesFieldSet = true; } if (("Synchronize" == name)) { this.synchronizeField = Enums.ParseYesNoType(value); this.synchronizeFieldSet = true; } if (("CreateFile" == name)) { this.createFileField = Enums.ParseYesNoType(value); this.createFileFieldSet = true; } if (("CreateChild" == name)) { this.createChildField = Enums.ParseYesNoType(value); this.createChildFieldSet = true; } if (("DeleteChild" == name)) { this.deleteChildField = Enums.ParseYesNoType(value); this.deleteChildFieldSet = true; } if (("Traverse" == name)) { this.traverseField = Enums.ParseYesNoType(value); this.traverseFieldSet = true; } if (("GenericAll" == name)) { this.genericAllField = Enums.ParseYesNoType(value); this.genericAllFieldSet = true; } if (("GenericExecute" == name)) { this.genericExecuteField = Enums.ParseYesNoType(value); this.genericExecuteFieldSet = true; } if (("GenericWrite" == name)) { this.genericWriteField = Enums.ParseYesNoType(value); this.genericWriteFieldSet = true; } if (("GenericRead" == name)) { this.genericReadField = Enums.ParseYesNoType(value); this.genericReadFieldSet = true; } } } /// /// Formats a file's contents at install time. The contents are formatted according to the rules of the /// [GeneratedCode("XsdGen", "4.0.0.0")] public class FormatFile : ISchemaElement, ISetAttributes { private string binaryKeyField; private bool binaryKeyFieldSet; private ISchemaElement parentElement; /// /// The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever /// file is installed by the parent component. /// public string BinaryKey { get { return this.binaryKeyField; } set { this.binaryKeyFieldSet = true; this.binaryKeyField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("FormatFile", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.binaryKeyFieldSet) { writer.WriteAttributeString("BinaryKey", this.binaryKeyField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("BinaryKey" == name)) { this.binaryKeyField = value; this.binaryKeyFieldSet = true; } } } /// /// Finds user groups on the local machine or specified Active Directory domain. The local machine will be /// searched for the group first then fallback to looking in Active Directory. This element is not capable /// of creating new groups but can be used to add new or existing users to an existing group. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class Group : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string nameField; private bool nameFieldSet; private string domainField; private bool domainFieldSet; private ISchemaElement parentElement; /// /// Unique identifier in your installation package for this group. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// A /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// An optional /// public string Domain { get { return this.domainField; } set { this.domainFieldSet = true; this.domainField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("Group", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.domainFieldSet) { writer.WriteAttributeString("Domain", this.domainField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Domain" == name)) { this.domainField = value; this.domainFieldSet = true; } } } /// /// Used to join a user to a group /// [GeneratedCode("XsdGen", "4.0.0.0")] public class GroupRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("GroupRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Creates a shortcut to a URL. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class InternetShortcut : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string directoryField; private bool directoryFieldSet; private string nameField; private bool nameFieldSet; private string targetField; private bool targetFieldSet; private TypeType typeField; private bool typeFieldSet; private string iconFileField; private bool iconFileFieldSet; private int iconIndexField; private bool iconIndexFieldSet; private ISchemaElement parentElement; /// /// Unique identifier in your installation package for this Internet shortcut. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory. /// public string Directory { get { return this.directoryField; } set { this.directoryFieldSet = true; this.directoryField = value; } } /// /// The name of the shortcut file, which is visible to the user. (The .lnk /// extension is added automatically and by default, is not shown to the user.) /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// URL that should be opened when the user selects the shortcut. Windows /// opens the URL in the appropriate handler for the protocol specified /// in the URL. Note that this is a formatted field, so you can use /// [#fileId] syntax to refer to a file being installed (using the file: /// protocol). /// public string Target { get { return this.targetField; } set { this.targetFieldSet = true; this.targetField = value; } } /// /// Which type of shortcut should be created. /// public TypeType Type { get { return this.typeField; } set { this.typeFieldSet = true; this.typeField = value; } } /// /// Icon file that should be displayed. Note that this is a formatted field, so you can use /// [#fileId] syntax to refer to a file being installed (using the file: /// protocol). /// public string IconFile { get { return this.iconFileField; } set { this.iconFileFieldSet = true; this.iconFileField = value; } } /// /// Index of the icon being referenced /// public int IconIndex { get { return this.iconIndexField; } set { this.iconIndexFieldSet = true; this.iconIndexField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a TypeType from a string. /// public static TypeType ParseTypeType(string value) { TypeType parsedValue; InternetShortcut.TryParseTypeType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a TypeType from a string. /// public static bool TryParseTypeType(string value, out TypeType parsedValue) { parsedValue = TypeType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("url" == value)) { parsedValue = TypeType.url; } else { if (("link" == value)) { parsedValue = TypeType.link; } else { parsedValue = TypeType.IllegalValue; return false; } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("InternetShortcut", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.directoryFieldSet) { writer.WriteAttributeString("Directory", this.directoryField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.targetFieldSet) { writer.WriteAttributeString("Target", this.targetField); } if (this.typeFieldSet) { if ((this.typeField == TypeType.url)) { writer.WriteAttributeString("Type", "url"); } if ((this.typeField == TypeType.link)) { writer.WriteAttributeString("Type", "link"); } } if (this.iconFileFieldSet) { writer.WriteAttributeString("IconFile", this.iconFileField); } if (this.iconIndexFieldSet) { writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Directory" == name)) { this.directoryField = value; this.directoryFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Target" == name)) { this.targetField = value; this.targetFieldSet = true; } if (("Type" == name)) { this.typeField = InternetShortcut.ParseTypeType(value); this.typeFieldSet = true; } if (("IconFile" == name)) { this.iconFileField = value; this.iconFileFieldSet = true; } if (("IconIndex" == name)) { this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.iconIndexFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum TypeType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Creates .url files using IUniformResourceLocatorW. /// url, /// /// Creates .lnk files using IShellLinkW (default). /// link, } } /// /// Used to create performance categories and configure performance counters. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class PerformanceCategory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes { private ElementCollection children; private string idField; private bool idFieldSet; private string nameField; private bool nameFieldSet; private string helpField; private bool helpFieldSet; private YesNoType multiInstanceField; private bool multiInstanceFieldSet; private string libraryField; private bool libraryFieldSet; private string openField; private bool openFieldSet; private string closeField; private bool closeFieldSet; private string collectField; private bool collectFieldSet; private PerformanceCounterLanguageType defaultLanguageField; private bool defaultLanguageFieldSet; private ISchemaElement parentElement; public PerformanceCategory() { ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PerformanceCounter))); this.children = childCollection0; } public virtual IEnumerable Children { get { return this.children; } } [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] public virtual IEnumerable this[System.Type childType] { get { return this.children.Filter(childType); } } /// /// Unique identifier in your installation package for this performance counter category. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name for the performance counter category. If this attribute is not provided the Id attribute is used as the name of the performance counter category. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// Optional help text for the performance counter category. /// public string Help { get { return this.helpField; } set { this.helpFieldSet = true; this.helpField = value; } } /// /// Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance. /// public YesNoType MultiInstance { get { return this.multiInstanceField; } set { this.multiInstanceFieldSet = true; this.multiInstanceField = value; } } /// /// DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters. /// public string Library { get { return this.libraryField; } set { this.libraryFieldSet = true; this.libraryField = value; } } /// /// Function entry point in to the Library DLL called when opening the performance counter. The default is "OpenPerformanceData" which should be used for all managed code performance counters. /// public string Open { get { return this.openField; } set { this.openFieldSet = true; this.openField = value; } } /// /// Function entry point in to the Library DLL called when closing the performance counter. The default is "ClosePerformanceData" which should be used for all managed code performance counters. /// public string Close { get { return this.closeField; } set { this.closeFieldSet = true; this.closeField = value; } } /// /// Function entry point in to the Library DLL called when collecting data from the performance counter. The default is "CollectPerformanceData" which should be used for all managed code performance counters. /// public string Collect { get { return this.collectField; } set { this.collectFieldSet = true; this.collectField = value; } } /// /// Default language for the performance category and contained counters' names and help text. /// public PerformanceCounterLanguageType DefaultLanguage { get { return this.defaultLanguageField; } set { this.defaultLanguageFieldSet = true; this.defaultLanguageField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } public virtual void AddChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.AddElement(child); child.ParentElement = this; } public virtual void RemoveChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.RemoveElement(child); child.ParentElement = null; } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ISchemaElement ICreateChildren.CreateChild(string childName) { if (String.IsNullOrEmpty(childName)) { throw new ArgumentNullException("childName"); } ISchemaElement childValue = null; if (("PerformanceCounter" == childName)) { childValue = new PerformanceCounter(); } if ((null == childValue)) { throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); } return childValue; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("PerformanceCategory", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.helpFieldSet) { writer.WriteAttributeString("Help", this.helpField); } if (this.multiInstanceFieldSet) { if ((this.multiInstanceField == YesNoType.no)) { writer.WriteAttributeString("MultiInstance", "no"); } if ((this.multiInstanceField == YesNoType.yes)) { writer.WriteAttributeString("MultiInstance", "yes"); } } if (this.libraryFieldSet) { writer.WriteAttributeString("Library", this.libraryField); } if (this.openFieldSet) { writer.WriteAttributeString("Open", this.openField); } if (this.closeFieldSet) { writer.WriteAttributeString("Close", this.closeField); } if (this.collectFieldSet) { writer.WriteAttributeString("Collect", this.collectField); } if (this.defaultLanguageFieldSet) { if ((this.defaultLanguageField == PerformanceCounterLanguageType.afrikaans)) { writer.WriteAttributeString("DefaultLanguage", "afrikaans"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.albanian)) { writer.WriteAttributeString("DefaultLanguage", "albanian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.arabic)) { writer.WriteAttributeString("DefaultLanguage", "arabic"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.armenian)) { writer.WriteAttributeString("DefaultLanguage", "armenian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.assamese)) { writer.WriteAttributeString("DefaultLanguage", "assamese"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.azeri)) { writer.WriteAttributeString("DefaultLanguage", "azeri"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.basque)) { writer.WriteAttributeString("DefaultLanguage", "basque"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.belarusian)) { writer.WriteAttributeString("DefaultLanguage", "belarusian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.bengali)) { writer.WriteAttributeString("DefaultLanguage", "bengali"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.bulgarian)) { writer.WriteAttributeString("DefaultLanguage", "bulgarian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.catalan)) { writer.WriteAttributeString("DefaultLanguage", "catalan"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.chinese)) { writer.WriteAttributeString("DefaultLanguage", "chinese"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.croatian)) { writer.WriteAttributeString("DefaultLanguage", "croatian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.czech)) { writer.WriteAttributeString("DefaultLanguage", "czech"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.danish)) { writer.WriteAttributeString("DefaultLanguage", "danish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.divehi)) { writer.WriteAttributeString("DefaultLanguage", "divehi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.dutch)) { writer.WriteAttributeString("DefaultLanguage", "dutch"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.english)) { writer.WriteAttributeString("DefaultLanguage", "english"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.estonian)) { writer.WriteAttributeString("DefaultLanguage", "estonian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.faeroese)) { writer.WriteAttributeString("DefaultLanguage", "faeroese"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.farsi)) { writer.WriteAttributeString("DefaultLanguage", "farsi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.finnish)) { writer.WriteAttributeString("DefaultLanguage", "finnish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.french)) { writer.WriteAttributeString("DefaultLanguage", "french"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.galician)) { writer.WriteAttributeString("DefaultLanguage", "galician"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.georgian)) { writer.WriteAttributeString("DefaultLanguage", "georgian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.german)) { writer.WriteAttributeString("DefaultLanguage", "german"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.greek)) { writer.WriteAttributeString("DefaultLanguage", "greek"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.gujarati)) { writer.WriteAttributeString("DefaultLanguage", "gujarati"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.hebrew)) { writer.WriteAttributeString("DefaultLanguage", "hebrew"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.hindi)) { writer.WriteAttributeString("DefaultLanguage", "hindi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.hungarian)) { writer.WriteAttributeString("DefaultLanguage", "hungarian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.icelandic)) { writer.WriteAttributeString("DefaultLanguage", "icelandic"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.indonesian)) { writer.WriteAttributeString("DefaultLanguage", "indonesian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.italian)) { writer.WriteAttributeString("DefaultLanguage", "italian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.japanese)) { writer.WriteAttributeString("DefaultLanguage", "japanese"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.kannada)) { writer.WriteAttributeString("DefaultLanguage", "kannada"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.kashmiri)) { writer.WriteAttributeString("DefaultLanguage", "kashmiri"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.kazak)) { writer.WriteAttributeString("DefaultLanguage", "kazak"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.konkani)) { writer.WriteAttributeString("DefaultLanguage", "konkani"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.korean)) { writer.WriteAttributeString("DefaultLanguage", "korean"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.kyrgyz)) { writer.WriteAttributeString("DefaultLanguage", "kyrgyz"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.latvian)) { writer.WriteAttributeString("DefaultLanguage", "latvian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.lithuanian)) { writer.WriteAttributeString("DefaultLanguage", "lithuanian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.macedonian)) { writer.WriteAttributeString("DefaultLanguage", "macedonian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.malay)) { writer.WriteAttributeString("DefaultLanguage", "malay"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.malayalam)) { writer.WriteAttributeString("DefaultLanguage", "malayalam"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.manipuri)) { writer.WriteAttributeString("DefaultLanguage", "manipuri"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.marathi)) { writer.WriteAttributeString("DefaultLanguage", "marathi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.mongolian)) { writer.WriteAttributeString("DefaultLanguage", "mongolian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.nepali)) { writer.WriteAttributeString("DefaultLanguage", "nepali"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.norwegian)) { writer.WriteAttributeString("DefaultLanguage", "norwegian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.oriya)) { writer.WriteAttributeString("DefaultLanguage", "oriya"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.polish)) { writer.WriteAttributeString("DefaultLanguage", "polish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.portuguese)) { writer.WriteAttributeString("DefaultLanguage", "portuguese"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.punjabi)) { writer.WriteAttributeString("DefaultLanguage", "punjabi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.romanian)) { writer.WriteAttributeString("DefaultLanguage", "romanian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.russian)) { writer.WriteAttributeString("DefaultLanguage", "russian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.sanskrit)) { writer.WriteAttributeString("DefaultLanguage", "sanskrit"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.serbian)) { writer.WriteAttributeString("DefaultLanguage", "serbian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.sindhi)) { writer.WriteAttributeString("DefaultLanguage", "sindhi"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovak)) { writer.WriteAttributeString("DefaultLanguage", "slovak"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovenian)) { writer.WriteAttributeString("DefaultLanguage", "slovenian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.spanish)) { writer.WriteAttributeString("DefaultLanguage", "spanish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.swahili)) { writer.WriteAttributeString("DefaultLanguage", "swahili"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.swedish)) { writer.WriteAttributeString("DefaultLanguage", "swedish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.syriac)) { writer.WriteAttributeString("DefaultLanguage", "syriac"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.tamil)) { writer.WriteAttributeString("DefaultLanguage", "tamil"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.tatar)) { writer.WriteAttributeString("DefaultLanguage", "tatar"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.telugu)) { writer.WriteAttributeString("DefaultLanguage", "telugu"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.thai)) { writer.WriteAttributeString("DefaultLanguage", "thai"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.turkish)) { writer.WriteAttributeString("DefaultLanguage", "turkish"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.ukrainian)) { writer.WriteAttributeString("DefaultLanguage", "ukrainian"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.urdu)) { writer.WriteAttributeString("DefaultLanguage", "urdu"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.uzbek)) { writer.WriteAttributeString("DefaultLanguage", "uzbek"); } if ((this.defaultLanguageField == PerformanceCounterLanguageType.vietnamese)) { writer.WriteAttributeString("DefaultLanguage", "vietnamese"); } } for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) { ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); childElement.OutputXml(writer); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Help" == name)) { this.helpField = value; this.helpFieldSet = true; } if (("MultiInstance" == name)) { this.multiInstanceField = Enums.ParseYesNoType(value); this.multiInstanceFieldSet = true; } if (("Library" == name)) { this.libraryField = value; this.libraryFieldSet = true; } if (("Open" == name)) { this.openField = value; this.openFieldSet = true; } if (("Close" == name)) { this.closeField = value; this.closeFieldSet = true; } if (("Collect" == name)) { this.collectField = value; this.collectFieldSet = true; } if (("DefaultLanguage" == name)) { this.defaultLanguageField = Enums.ParsePerformanceCounterLanguageType(value); this.defaultLanguageFieldSet = true; } } } /// /// Creates a performance counter in a performance category. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class PerformanceCounter : ISchemaElement, ISetAttributes { private string nameField; private bool nameFieldSet; private string helpField; private bool helpFieldSet; private PerformanceCounterTypesType typeField; private bool typeFieldSet; private PerformanceCounterLanguageType languageField; private bool languageFieldSet; private ISchemaElement parentElement; /// /// Name for the performance counter. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// Optional help text for the performance counter. /// public string Help { get { return this.helpField; } set { this.helpFieldSet = true; this.helpField = value; } } /// /// Type of the performance counter. /// public PerformanceCounterTypesType Type { get { return this.typeField; } set { this.typeFieldSet = true; this.typeField = value; } } /// /// Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute. /// public PerformanceCounterLanguageType Language { get { return this.languageField; } set { this.languageFieldSet = true; this.languageField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("PerformanceCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.helpFieldSet) { writer.WriteAttributeString("Help", this.helpField); } if (this.typeFieldSet) { if ((this.typeField == PerformanceCounterTypesType.averageBase)) { writer.WriteAttributeString("Type", "averageBase"); } if ((this.typeField == PerformanceCounterTypesType.averageCount64)) { writer.WriteAttributeString("Type", "averageCount64"); } if ((this.typeField == PerformanceCounterTypesType.averageTimer32)) { writer.WriteAttributeString("Type", "averageTimer32"); } if ((this.typeField == PerformanceCounterTypesType.counterDelta32)) { writer.WriteAttributeString("Type", "counterDelta32"); } if ((this.typeField == PerformanceCounterTypesType.counterTimerInverse)) { writer.WriteAttributeString("Type", "counterTimerInverse"); } if ((this.typeField == PerformanceCounterTypesType.sampleFraction)) { writer.WriteAttributeString("Type", "sampleFraction"); } if ((this.typeField == PerformanceCounterTypesType.timer100Ns)) { writer.WriteAttributeString("Type", "timer100Ns"); } if ((this.typeField == PerformanceCounterTypesType.counterTimer)) { writer.WriteAttributeString("Type", "counterTimer"); } if ((this.typeField == PerformanceCounterTypesType.rawFraction)) { writer.WriteAttributeString("Type", "rawFraction"); } if ((this.typeField == PerformanceCounterTypesType.timer100NsInverse)) { writer.WriteAttributeString("Type", "timer100NsInverse"); } if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer)) { writer.WriteAttributeString("Type", "counterMultiTimer"); } if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100Ns)) { writer.WriteAttributeString("Type", "counterMultiTimer100Ns"); } if ((this.typeField == PerformanceCounterTypesType.counterMultiTimerInverse)) { writer.WriteAttributeString("Type", "counterMultiTimerInverse"); } if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100NsInverse)) { writer.WriteAttributeString("Type", "counterMultiTimer100NsInverse"); } if ((this.typeField == PerformanceCounterTypesType.elapsedTime)) { writer.WriteAttributeString("Type", "elapsedTime"); } if ((this.typeField == PerformanceCounterTypesType.sampleBase)) { writer.WriteAttributeString("Type", "sampleBase"); } if ((this.typeField == PerformanceCounterTypesType.rawBase)) { writer.WriteAttributeString("Type", "rawBase"); } if ((this.typeField == PerformanceCounterTypesType.counterMultiBase)) { writer.WriteAttributeString("Type", "counterMultiBase"); } if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond64)) { writer.WriteAttributeString("Type", "rateOfCountsPerSecond64"); } if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond32)) { writer.WriteAttributeString("Type", "rateOfCountsPerSecond32"); } if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval64)) { writer.WriteAttributeString("Type", "countPerTimeInterval64"); } if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval32)) { writer.WriteAttributeString("Type", "countPerTimeInterval32"); } if ((this.typeField == PerformanceCounterTypesType.sampleCounter)) { writer.WriteAttributeString("Type", "sampleCounter"); } if ((this.typeField == PerformanceCounterTypesType.counterDelta64)) { writer.WriteAttributeString("Type", "counterDelta64"); } if ((this.typeField == PerformanceCounterTypesType.numberOfItems64)) { writer.WriteAttributeString("Type", "numberOfItems64"); } if ((this.typeField == PerformanceCounterTypesType.numberOfItems32)) { writer.WriteAttributeString("Type", "numberOfItems32"); } if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX64)) { writer.WriteAttributeString("Type", "numberOfItemsHEX64"); } if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX32)) { writer.WriteAttributeString("Type", "numberOfItemsHEX32"); } } if (this.languageFieldSet) { if ((this.languageField == PerformanceCounterLanguageType.afrikaans)) { writer.WriteAttributeString("Language", "afrikaans"); } if ((this.languageField == PerformanceCounterLanguageType.albanian)) { writer.WriteAttributeString("Language", "albanian"); } if ((this.languageField == PerformanceCounterLanguageType.arabic)) { writer.WriteAttributeString("Language", "arabic"); } if ((this.languageField == PerformanceCounterLanguageType.armenian)) { writer.WriteAttributeString("Language", "armenian"); } if ((this.languageField == PerformanceCounterLanguageType.assamese)) { writer.WriteAttributeString("Language", "assamese"); } if ((this.languageField == PerformanceCounterLanguageType.azeri)) { writer.WriteAttributeString("Language", "azeri"); } if ((this.languageField == PerformanceCounterLanguageType.basque)) { writer.WriteAttributeString("Language", "basque"); } if ((this.languageField == PerformanceCounterLanguageType.belarusian)) { writer.WriteAttributeString("Language", "belarusian"); } if ((this.languageField == PerformanceCounterLanguageType.bengali)) { writer.WriteAttributeString("Language", "bengali"); } if ((this.languageField == PerformanceCounterLanguageType.bulgarian)) { writer.WriteAttributeString("Language", "bulgarian"); } if ((this.languageField == PerformanceCounterLanguageType.catalan)) { writer.WriteAttributeString("Language", "catalan"); } if ((this.languageField == PerformanceCounterLanguageType.chinese)) { writer.WriteAttributeString("Language", "chinese"); } if ((this.languageField == PerformanceCounterLanguageType.croatian)) { writer.WriteAttributeString("Language", "croatian"); } if ((this.languageField == PerformanceCounterLanguageType.czech)) { writer.WriteAttributeString("Language", "czech"); } if ((this.languageField == PerformanceCounterLanguageType.danish)) { writer.WriteAttributeString("Language", "danish"); } if ((this.languageField == PerformanceCounterLanguageType.divehi)) { writer.WriteAttributeString("Language", "divehi"); } if ((this.languageField == PerformanceCounterLanguageType.dutch)) { writer.WriteAttributeString("Language", "dutch"); } if ((this.languageField == PerformanceCounterLanguageType.english)) { writer.WriteAttributeString("Language", "english"); } if ((this.languageField == PerformanceCounterLanguageType.estonian)) { writer.WriteAttributeString("Language", "estonian"); } if ((this.languageField == PerformanceCounterLanguageType.faeroese)) { writer.WriteAttributeString("Language", "faeroese"); } if ((this.languageField == PerformanceCounterLanguageType.farsi)) { writer.WriteAttributeString("Language", "farsi"); } if ((this.languageField == PerformanceCounterLanguageType.finnish)) { writer.WriteAttributeString("Language", "finnish"); } if ((this.languageField == PerformanceCounterLanguageType.french)) { writer.WriteAttributeString("Language", "french"); } if ((this.languageField == PerformanceCounterLanguageType.galician)) { writer.WriteAttributeString("Language", "galician"); } if ((this.languageField == PerformanceCounterLanguageType.georgian)) { writer.WriteAttributeString("Language", "georgian"); } if ((this.languageField == PerformanceCounterLanguageType.german)) { writer.WriteAttributeString("Language", "german"); } if ((this.languageField == PerformanceCounterLanguageType.greek)) { writer.WriteAttributeString("Language", "greek"); } if ((this.languageField == PerformanceCounterLanguageType.gujarati)) { writer.WriteAttributeString("Language", "gujarati"); } if ((this.languageField == PerformanceCounterLanguageType.hebrew)) { writer.WriteAttributeString("Language", "hebrew"); } if ((this.languageField == PerformanceCounterLanguageType.hindi)) { writer.WriteAttributeString("Language", "hindi"); } if ((this.languageField == PerformanceCounterLanguageType.hungarian)) { writer.WriteAttributeString("Language", "hungarian"); } if ((this.languageField == PerformanceCounterLanguageType.icelandic)) { writer.WriteAttributeString("Language", "icelandic"); } if ((this.languageField == PerformanceCounterLanguageType.indonesian)) { writer.WriteAttributeString("Language", "indonesian"); } if ((this.languageField == PerformanceCounterLanguageType.italian)) { writer.WriteAttributeString("Language", "italian"); } if ((this.languageField == PerformanceCounterLanguageType.japanese)) { writer.WriteAttributeString("Language", "japanese"); } if ((this.languageField == PerformanceCounterLanguageType.kannada)) { writer.WriteAttributeString("Language", "kannada"); } if ((this.languageField == PerformanceCounterLanguageType.kashmiri)) { writer.WriteAttributeString("Language", "kashmiri"); } if ((this.languageField == PerformanceCounterLanguageType.kazak)) { writer.WriteAttributeString("Language", "kazak"); } if ((this.languageField == PerformanceCounterLanguageType.konkani)) { writer.WriteAttributeString("Language", "konkani"); } if ((this.languageField == PerformanceCounterLanguageType.korean)) { writer.WriteAttributeString("Language", "korean"); } if ((this.languageField == PerformanceCounterLanguageType.kyrgyz)) { writer.WriteAttributeString("Language", "kyrgyz"); } if ((this.languageField == PerformanceCounterLanguageType.latvian)) { writer.WriteAttributeString("Language", "latvian"); } if ((this.languageField == PerformanceCounterLanguageType.lithuanian)) { writer.WriteAttributeString("Language", "lithuanian"); } if ((this.languageField == PerformanceCounterLanguageType.macedonian)) { writer.WriteAttributeString("Language", "macedonian"); } if ((this.languageField == PerformanceCounterLanguageType.malay)) { writer.WriteAttributeString("Language", "malay"); } if ((this.languageField == PerformanceCounterLanguageType.malayalam)) { writer.WriteAttributeString("Language", "malayalam"); } if ((this.languageField == PerformanceCounterLanguageType.manipuri)) { writer.WriteAttributeString("Language", "manipuri"); } if ((this.languageField == PerformanceCounterLanguageType.marathi)) { writer.WriteAttributeString("Language", "marathi"); } if ((this.languageField == PerformanceCounterLanguageType.mongolian)) { writer.WriteAttributeString("Language", "mongolian"); } if ((this.languageField == PerformanceCounterLanguageType.nepali)) { writer.WriteAttributeString("Language", "nepali"); } if ((this.languageField == PerformanceCounterLanguageType.norwegian)) { writer.WriteAttributeString("Language", "norwegian"); } if ((this.languageField == PerformanceCounterLanguageType.oriya)) { writer.WriteAttributeString("Language", "oriya"); } if ((this.languageField == PerformanceCounterLanguageType.polish)) { writer.WriteAttributeString("Language", "polish"); } if ((this.languageField == PerformanceCounterLanguageType.portuguese)) { writer.WriteAttributeString("Language", "portuguese"); } if ((this.languageField == PerformanceCounterLanguageType.punjabi)) { writer.WriteAttributeString("Language", "punjabi"); } if ((this.languageField == PerformanceCounterLanguageType.romanian)) { writer.WriteAttributeString("Language", "romanian"); } if ((this.languageField == PerformanceCounterLanguageType.russian)) { writer.WriteAttributeString("Language", "russian"); } if ((this.languageField == PerformanceCounterLanguageType.sanskrit)) { writer.WriteAttributeString("Language", "sanskrit"); } if ((this.languageField == PerformanceCounterLanguageType.serbian)) { writer.WriteAttributeString("Language", "serbian"); } if ((this.languageField == PerformanceCounterLanguageType.sindhi)) { writer.WriteAttributeString("Language", "sindhi"); } if ((this.languageField == PerformanceCounterLanguageType.slovak)) { writer.WriteAttributeString("Language", "slovak"); } if ((this.languageField == PerformanceCounterLanguageType.slovenian)) { writer.WriteAttributeString("Language", "slovenian"); } if ((this.languageField == PerformanceCounterLanguageType.spanish)) { writer.WriteAttributeString("Language", "spanish"); } if ((this.languageField == PerformanceCounterLanguageType.swahili)) { writer.WriteAttributeString("Language", "swahili"); } if ((this.languageField == PerformanceCounterLanguageType.swedish)) { writer.WriteAttributeString("Language", "swedish"); } if ((this.languageField == PerformanceCounterLanguageType.syriac)) { writer.WriteAttributeString("Language", "syriac"); } if ((this.languageField == PerformanceCounterLanguageType.tamil)) { writer.WriteAttributeString("Language", "tamil"); } if ((this.languageField == PerformanceCounterLanguageType.tatar)) { writer.WriteAttributeString("Language", "tatar"); } if ((this.languageField == PerformanceCounterLanguageType.telugu)) { writer.WriteAttributeString("Language", "telugu"); } if ((this.languageField == PerformanceCounterLanguageType.thai)) { writer.WriteAttributeString("Language", "thai"); } if ((this.languageField == PerformanceCounterLanguageType.turkish)) { writer.WriteAttributeString("Language", "turkish"); } if ((this.languageField == PerformanceCounterLanguageType.ukrainian)) { writer.WriteAttributeString("Language", "ukrainian"); } if ((this.languageField == PerformanceCounterLanguageType.urdu)) { writer.WriteAttributeString("Language", "urdu"); } if ((this.languageField == PerformanceCounterLanguageType.uzbek)) { writer.WriteAttributeString("Language", "uzbek"); } if ((this.languageField == PerformanceCounterLanguageType.vietnamese)) { writer.WriteAttributeString("Language", "vietnamese"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Help" == name)) { this.helpField = value; this.helpFieldSet = true; } if (("Type" == name)) { this.typeField = Enums.ParsePerformanceCounterTypesType(value); this.typeFieldSet = true; } if (("Language" == name)) { this.languageField = Enums.ParsePerformanceCounterLanguageType(value); this.languageFieldSet = true; } } } /// /// Used to install Perfmon counters. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class PerfCounter : ISchemaElement, ISetAttributes { private string nameField; private bool nameFieldSet; private ISchemaElement parentElement; public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("PerfCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } } } /// /// Used to install Perfmon Counter Manifests. /// Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute, /// InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see /// [GeneratedCode("XsdGen", "4.0.0.0")] public class PerfCounterManifest : ISchemaElement, ISetAttributes { private string resourceFileDirectoryField; private bool resourceFileDirectoryFieldSet; private ISchemaElement parentElement; /// /// The directory that holds the resource file of the providers in the perfmon counter manifest. Often the resource file path cannot be determined until setup time. Put the directory here and during perfmon manifest registrtion the path will be updated in the registry. If not specified, Perfmon will look for the resource file in the same directory of the perfmon counter manifest file. /// public string ResourceFileDirectory { get { return this.resourceFileDirectoryField; } set { this.resourceFileDirectoryFieldSet = true; this.resourceFileDirectoryField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("PerfCounterManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.resourceFileDirectoryFieldSet) { writer.WriteAttributeString("ResourceFileDirectory", this.resourceFileDirectoryField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("ResourceFileDirectory" == name)) { this.resourceFileDirectoryField = value; this.resourceFileDirectoryFieldSet = true; } } } /// /// Used to install Event Manifests. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class EventManifest : ISchemaElement, ISetAttributes { private string messageFileField; private bool messageFileFieldSet; private string parameterFileField; private bool parameterFileFieldSet; private string resourceFileField; private bool resourceFileFieldSet; private ISchemaElement parentElement; /// /// The message file (including path) of all the providers in the event manifest. Often the message file path cannot be determined until setup time. Put your MessageFile here and the messageFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. /// public string MessageFile { get { return this.messageFileField; } set { this.messageFileFieldSet = true; this.messageFileField = value; } } /// /// The parameter file (including path) of all the providers in the event manifest. Often the parameter file path cannot be determined until setup time. Put your ParameterFile here and the parameterFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. /// public string ParameterFile { get { return this.parameterFileField; } set { this.parameterFileFieldSet = true; this.parameterFileField = value; } } /// /// The resource file (including path) of all the providers in the event manifest. Often the resource file path cannot be determined until setup time. Put your ResourceFile here and the resourceFileName attribute of the all the providers in the manifest will be updated with the path before it is registered. /// public string ResourceFile { get { return this.resourceFileField; } set { this.resourceFileFieldSet = true; this.resourceFileField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("EventManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.messageFileFieldSet) { writer.WriteAttributeString("MessageFile", this.messageFileField); } if (this.parameterFileFieldSet) { writer.WriteAttributeString("ParameterFile", this.parameterFileField); } if (this.resourceFileFieldSet) { writer.WriteAttributeString("ResourceFile", this.resourceFileField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("MessageFile" == name)) { this.messageFileField = value; this.messageFileFieldSet = true; } if (("ParameterFile" == name)) { this.parameterFileField = value; this.parameterFileFieldSet = true; } if (("ResourceFile" == name)) { this.resourceFileField = value; this.resourceFileFieldSet = true; } } } /// /// Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. /// The table and key are taken from the parent element. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class PermissionEx : ISchemaElement, ISetAttributes { private string domainField; private bool domainFieldSet; private string userField; private bool userFieldSet; private YesNoType readField; private bool readFieldSet; private YesNoType deleteField; private bool deleteFieldSet; private YesNoType readPermissionField; private bool readPermissionFieldSet; private YesNoType changePermissionField; private bool changePermissionFieldSet; private YesNoType takeOwnershipField; private bool takeOwnershipFieldSet; private YesNoType readAttributesField; private bool readAttributesFieldSet; private YesNoType writeAttributesField; private bool writeAttributesFieldSet; private YesNoType readExtendedAttributesField; private bool readExtendedAttributesFieldSet; private YesNoType writeExtendedAttributesField; private bool writeExtendedAttributesFieldSet; private YesNoType synchronizeField; private bool synchronizeFieldSet; private YesNoType createFileField; private bool createFileFieldSet; private YesNoType createChildField; private bool createChildFieldSet; private YesNoType deleteChildField; private bool deleteChildFieldSet; private YesNoType traverseField; private bool traverseFieldSet; private YesNoType appendField; private bool appendFieldSet; private YesNoType executeField; private bool executeFieldSet; private YesNoType writeField; private bool writeFieldSet; private YesNoType createSubkeysField; private bool createSubkeysFieldSet; private YesNoType enumerateSubkeysField; private bool enumerateSubkeysFieldSet; private YesNoType notifyField; private bool notifyFieldSet; private YesNoType createLinkField; private bool createLinkFieldSet; private YesNoType genericAllField; private bool genericAllFieldSet; private YesNoType genericExecuteField; private bool genericExecuteFieldSet; private YesNoType genericWriteField; private bool genericWriteFieldSet; private YesNoType genericReadField; private bool genericReadFieldSet; private YesNoType serviceQueryConfigField; private bool serviceQueryConfigFieldSet; private YesNoType serviceChangeConfigField; private bool serviceChangeConfigFieldSet; private YesNoType serviceQueryStatusField; private bool serviceQueryStatusFieldSet; private YesNoType serviceEnumerateDependentsField; private bool serviceEnumerateDependentsFieldSet; private YesNoType serviceStartField; private bool serviceStartFieldSet; private YesNoType serviceStopField; private bool serviceStopFieldSet; private YesNoType servicePauseContinueField; private bool servicePauseContinueFieldSet; private YesNoType serviceInterrogateField; private bool serviceInterrogateFieldSet; private YesNoType serviceUserDefinedControlField; private bool serviceUserDefinedControlFieldSet; private ISchemaElement parentElement; public string Domain { get { return this.domainField; } set { this.domainFieldSet = true; this.domainField = value; } } public string User { get { return this.userField; } set { this.userFieldSet = true; this.userField = value; } } public YesNoType Read { get { return this.readField; } set { this.readFieldSet = true; this.readField = value; } } public YesNoType Delete { get { return this.deleteField; } set { this.deleteFieldSet = true; this.deleteField = value; } } public YesNoType ReadPermission { get { return this.readPermissionField; } set { this.readPermissionFieldSet = true; this.readPermissionField = value; } } public YesNoType ChangePermission { get { return this.changePermissionField; } set { this.changePermissionFieldSet = true; this.changePermissionField = value; } } public YesNoType TakeOwnership { get { return this.takeOwnershipField; } set { this.takeOwnershipFieldSet = true; this.takeOwnershipField = value; } } public YesNoType ReadAttributes { get { return this.readAttributesField; } set { this.readAttributesFieldSet = true; this.readAttributesField = value; } } public YesNoType WriteAttributes { get { return this.writeAttributesField; } set { this.writeAttributesFieldSet = true; this.writeAttributesField = value; } } public YesNoType ReadExtendedAttributes { get { return this.readExtendedAttributesField; } set { this.readExtendedAttributesFieldSet = true; this.readExtendedAttributesField = value; } } public YesNoType WriteExtendedAttributes { get { return this.writeExtendedAttributesField; } set { this.writeExtendedAttributesFieldSet = true; this.writeExtendedAttributesField = value; } } public YesNoType Synchronize { get { return this.synchronizeField; } set { this.synchronizeFieldSet = true; this.synchronizeField = value; } } /// /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. /// public YesNoType CreateFile { get { return this.createFileField; } set { this.createFileFieldSet = true; this.createFileField = value; } } /// /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. /// public YesNoType CreateChild { get { return this.createChildField; } set { this.createChildFieldSet = true; this.createChildField = value; } } /// /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent. /// public YesNoType DeleteChild { get { return this.deleteChildField; } set { this.deleteChildFieldSet = true; this.deleteChildField = value; } } /// /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent. /// public YesNoType Traverse { get { return this.traverseField; } set { this.traverseFieldSet = true; this.traverseField = value; } } public YesNoType Append { get { return this.appendField; } set { this.appendFieldSet = true; this.appendField = value; } } public YesNoType Execute { get { return this.executeField; } set { this.executeFieldSet = true; this.executeField = value; } } public YesNoType Write { get { return this.writeField; } set { this.writeFieldSet = true; this.writeField = value; } } public YesNoType CreateSubkeys { get { return this.createSubkeysField; } set { this.createSubkeysFieldSet = true; this.createSubkeysField = value; } } public YesNoType EnumerateSubkeys { get { return this.enumerateSubkeysField; } set { this.enumerateSubkeysFieldSet = true; this.enumerateSubkeysField = value; } } public YesNoType Notify { get { return this.notifyField; } set { this.notifyFieldSet = true; this.notifyField = value; } } public YesNoType CreateLink { get { return this.createLinkField; } set { this.createLinkFieldSet = true; this.createLinkField = value; } } public YesNoType GenericAll { get { return this.genericAllField; } set { this.genericAllFieldSet = true; this.genericAllField = value; } } public YesNoType GenericExecute { get { return this.genericExecuteField; } set { this.genericExecuteFieldSet = true; this.genericExecuteField = value; } } public YesNoType GenericWrite { get { return this.genericWriteField; } set { this.genericWriteFieldSet = true; this.genericWriteField = value; } } /// /// specifying this will fail to grant read access /// public YesNoType GenericRead { get { return this.genericReadField; } set { this.genericReadFieldSet = true; this.genericReadField = value; } } /// /// Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceQueryConfig { get { return this.serviceQueryConfigField; } set { this.serviceQueryConfigFieldSet = true; this.serviceQueryConfigField = value; } } /// /// Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceChangeConfig { get { return this.serviceChangeConfigField; } set { this.serviceChangeConfigFieldSet = true; this.serviceChangeConfigField = value; } } /// /// Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceQueryStatus { get { return this.serviceQueryStatusField; } set { this.serviceQueryStatusFieldSet = true; this.serviceQueryStatusField = value; } } /// /// Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceEnumerateDependents { get { return this.serviceEnumerateDependentsField; } set { this.serviceEnumerateDependentsFieldSet = true; this.serviceEnumerateDependentsField = value; } } /// /// Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceStart { get { return this.serviceStartField; } set { this.serviceStartFieldSet = true; this.serviceStartField = value; } } /// /// Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceStop { get { return this.serviceStopField; } set { this.serviceStopFieldSet = true; this.serviceStopField = value; } } /// /// Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServicePauseContinue { get { return this.servicePauseContinueField; } set { this.servicePauseContinueFieldSet = true; this.servicePauseContinueField = value; } } /// /// Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceInterrogate { get { return this.serviceInterrogateField; } set { this.serviceInterrogateFieldSet = true; this.serviceInterrogateField = value; } } /// /// Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent. /// public YesNoType ServiceUserDefinedControl { get { return this.serviceUserDefinedControlField; } set { this.serviceUserDefinedControlFieldSet = true; this.serviceUserDefinedControlField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.domainFieldSet) { writer.WriteAttributeString("Domain", this.domainField); } if (this.userFieldSet) { writer.WriteAttributeString("User", this.userField); } if (this.readFieldSet) { if ((this.readField == YesNoType.no)) { writer.WriteAttributeString("Read", "no"); } if ((this.readField == YesNoType.yes)) { writer.WriteAttributeString("Read", "yes"); } } if (this.deleteFieldSet) { if ((this.deleteField == YesNoType.no)) { writer.WriteAttributeString("Delete", "no"); } if ((this.deleteField == YesNoType.yes)) { writer.WriteAttributeString("Delete", "yes"); } } if (this.readPermissionFieldSet) { if ((this.readPermissionField == YesNoType.no)) { writer.WriteAttributeString("ReadPermission", "no"); } if ((this.readPermissionField == YesNoType.yes)) { writer.WriteAttributeString("ReadPermission", "yes"); } } if (this.changePermissionFieldSet) { if ((this.changePermissionField == YesNoType.no)) { writer.WriteAttributeString("ChangePermission", "no"); } if ((this.changePermissionField == YesNoType.yes)) { writer.WriteAttributeString("ChangePermission", "yes"); } } if (this.takeOwnershipFieldSet) { if ((this.takeOwnershipField == YesNoType.no)) { writer.WriteAttributeString("TakeOwnership", "no"); } if ((this.takeOwnershipField == YesNoType.yes)) { writer.WriteAttributeString("TakeOwnership", "yes"); } } if (this.readAttributesFieldSet) { if ((this.readAttributesField == YesNoType.no)) { writer.WriteAttributeString("ReadAttributes", "no"); } if ((this.readAttributesField == YesNoType.yes)) { writer.WriteAttributeString("ReadAttributes", "yes"); } } if (this.writeAttributesFieldSet) { if ((this.writeAttributesField == YesNoType.no)) { writer.WriteAttributeString("WriteAttributes", "no"); } if ((this.writeAttributesField == YesNoType.yes)) { writer.WriteAttributeString("WriteAttributes", "yes"); } } if (this.readExtendedAttributesFieldSet) { if ((this.readExtendedAttributesField == YesNoType.no)) { writer.WriteAttributeString("ReadExtendedAttributes", "no"); } if ((this.readExtendedAttributesField == YesNoType.yes)) { writer.WriteAttributeString("ReadExtendedAttributes", "yes"); } } if (this.writeExtendedAttributesFieldSet) { if ((this.writeExtendedAttributesField == YesNoType.no)) { writer.WriteAttributeString("WriteExtendedAttributes", "no"); } if ((this.writeExtendedAttributesField == YesNoType.yes)) { writer.WriteAttributeString("WriteExtendedAttributes", "yes"); } } if (this.synchronizeFieldSet) { if ((this.synchronizeField == YesNoType.no)) { writer.WriteAttributeString("Synchronize", "no"); } if ((this.synchronizeField == YesNoType.yes)) { writer.WriteAttributeString("Synchronize", "yes"); } } if (this.createFileFieldSet) { if ((this.createFileField == YesNoType.no)) { writer.WriteAttributeString("CreateFile", "no"); } if ((this.createFileField == YesNoType.yes)) { writer.WriteAttributeString("CreateFile", "yes"); } } if (this.createChildFieldSet) { if ((this.createChildField == YesNoType.no)) { writer.WriteAttributeString("CreateChild", "no"); } if ((this.createChildField == YesNoType.yes)) { writer.WriteAttributeString("CreateChild", "yes"); } } if (this.deleteChildFieldSet) { if ((this.deleteChildField == YesNoType.no)) { writer.WriteAttributeString("DeleteChild", "no"); } if ((this.deleteChildField == YesNoType.yes)) { writer.WriteAttributeString("DeleteChild", "yes"); } } if (this.traverseFieldSet) { if ((this.traverseField == YesNoType.no)) { writer.WriteAttributeString("Traverse", "no"); } if ((this.traverseField == YesNoType.yes)) { writer.WriteAttributeString("Traverse", "yes"); } } if (this.appendFieldSet) { if ((this.appendField == YesNoType.no)) { writer.WriteAttributeString("Append", "no"); } if ((this.appendField == YesNoType.yes)) { writer.WriteAttributeString("Append", "yes"); } } if (this.executeFieldSet) { if ((this.executeField == YesNoType.no)) { writer.WriteAttributeString("Execute", "no"); } if ((this.executeField == YesNoType.yes)) { writer.WriteAttributeString("Execute", "yes"); } } if (this.writeFieldSet) { if ((this.writeField == YesNoType.no)) { writer.WriteAttributeString("Write", "no"); } if ((this.writeField == YesNoType.yes)) { writer.WriteAttributeString("Write", "yes"); } } if (this.createSubkeysFieldSet) { if ((this.createSubkeysField == YesNoType.no)) { writer.WriteAttributeString("CreateSubkeys", "no"); } if ((this.createSubkeysField == YesNoType.yes)) { writer.WriteAttributeString("CreateSubkeys", "yes"); } } if (this.enumerateSubkeysFieldSet) { if ((this.enumerateSubkeysField == YesNoType.no)) { writer.WriteAttributeString("EnumerateSubkeys", "no"); } if ((this.enumerateSubkeysField == YesNoType.yes)) { writer.WriteAttributeString("EnumerateSubkeys", "yes"); } } if (this.notifyFieldSet) { if ((this.notifyField == YesNoType.no)) { writer.WriteAttributeString("Notify", "no"); } if ((this.notifyField == YesNoType.yes)) { writer.WriteAttributeString("Notify", "yes"); } } if (this.createLinkFieldSet) { if ((this.createLinkField == YesNoType.no)) { writer.WriteAttributeString("CreateLink", "no"); } if ((this.createLinkField == YesNoType.yes)) { writer.WriteAttributeString("CreateLink", "yes"); } } if (this.genericAllFieldSet) { if ((this.genericAllField == YesNoType.no)) { writer.WriteAttributeString("GenericAll", "no"); } if ((this.genericAllField == YesNoType.yes)) { writer.WriteAttributeString("GenericAll", "yes"); } } if (this.genericExecuteFieldSet) { if ((this.genericExecuteField == YesNoType.no)) { writer.WriteAttributeString("GenericExecute", "no"); } if ((this.genericExecuteField == YesNoType.yes)) { writer.WriteAttributeString("GenericExecute", "yes"); } } if (this.genericWriteFieldSet) { if ((this.genericWriteField == YesNoType.no)) { writer.WriteAttributeString("GenericWrite", "no"); } if ((this.genericWriteField == YesNoType.yes)) { writer.WriteAttributeString("GenericWrite", "yes"); } } if (this.genericReadFieldSet) { if ((this.genericReadField == YesNoType.no)) { writer.WriteAttributeString("GenericRead", "no"); } if ((this.genericReadField == YesNoType.yes)) { writer.WriteAttributeString("GenericRead", "yes"); } } if (this.serviceQueryConfigFieldSet) { if ((this.serviceQueryConfigField == YesNoType.no)) { writer.WriteAttributeString("ServiceQueryConfig", "no"); } if ((this.serviceQueryConfigField == YesNoType.yes)) { writer.WriteAttributeString("ServiceQueryConfig", "yes"); } } if (this.serviceChangeConfigFieldSet) { if ((this.serviceChangeConfigField == YesNoType.no)) { writer.WriteAttributeString("ServiceChangeConfig", "no"); } if ((this.serviceChangeConfigField == YesNoType.yes)) { writer.WriteAttributeString("ServiceChangeConfig", "yes"); } } if (this.serviceQueryStatusFieldSet) { if ((this.serviceQueryStatusField == YesNoType.no)) { writer.WriteAttributeString("ServiceQueryStatus", "no"); } if ((this.serviceQueryStatusField == YesNoType.yes)) { writer.WriteAttributeString("ServiceQueryStatus", "yes"); } } if (this.serviceEnumerateDependentsFieldSet) { if ((this.serviceEnumerateDependentsField == YesNoType.no)) { writer.WriteAttributeString("ServiceEnumerateDependents", "no"); } if ((this.serviceEnumerateDependentsField == YesNoType.yes)) { writer.WriteAttributeString("ServiceEnumerateDependents", "yes"); } } if (this.serviceStartFieldSet) { if ((this.serviceStartField == YesNoType.no)) { writer.WriteAttributeString("ServiceStart", "no"); } if ((this.serviceStartField == YesNoType.yes)) { writer.WriteAttributeString("ServiceStart", "yes"); } } if (this.serviceStopFieldSet) { if ((this.serviceStopField == YesNoType.no)) { writer.WriteAttributeString("ServiceStop", "no"); } if ((this.serviceStopField == YesNoType.yes)) { writer.WriteAttributeString("ServiceStop", "yes"); } } if (this.servicePauseContinueFieldSet) { if ((this.servicePauseContinueField == YesNoType.no)) { writer.WriteAttributeString("ServicePauseContinue", "no"); } if ((this.servicePauseContinueField == YesNoType.yes)) { writer.WriteAttributeString("ServicePauseContinue", "yes"); } } if (this.serviceInterrogateFieldSet) { if ((this.serviceInterrogateField == YesNoType.no)) { writer.WriteAttributeString("ServiceInterrogate", "no"); } if ((this.serviceInterrogateField == YesNoType.yes)) { writer.WriteAttributeString("ServiceInterrogate", "yes"); } } if (this.serviceUserDefinedControlFieldSet) { if ((this.serviceUserDefinedControlField == YesNoType.no)) { writer.WriteAttributeString("ServiceUserDefinedControl", "no"); } if ((this.serviceUserDefinedControlField == YesNoType.yes)) { writer.WriteAttributeString("ServiceUserDefinedControl", "yes"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Domain" == name)) { this.domainField = value; this.domainFieldSet = true; } if (("User" == name)) { this.userField = value; this.userFieldSet = true; } if (("Read" == name)) { this.readField = Enums.ParseYesNoType(value); this.readFieldSet = true; } if (("Delete" == name)) { this.deleteField = Enums.ParseYesNoType(value); this.deleteFieldSet = true; } if (("ReadPermission" == name)) { this.readPermissionField = Enums.ParseYesNoType(value); this.readPermissionFieldSet = true; } if (("ChangePermission" == name)) { this.changePermissionField = Enums.ParseYesNoType(value); this.changePermissionFieldSet = true; } if (("TakeOwnership" == name)) { this.takeOwnershipField = Enums.ParseYesNoType(value); this.takeOwnershipFieldSet = true; } if (("ReadAttributes" == name)) { this.readAttributesField = Enums.ParseYesNoType(value); this.readAttributesFieldSet = true; } if (("WriteAttributes" == name)) { this.writeAttributesField = Enums.ParseYesNoType(value); this.writeAttributesFieldSet = true; } if (("ReadExtendedAttributes" == name)) { this.readExtendedAttributesField = Enums.ParseYesNoType(value); this.readExtendedAttributesFieldSet = true; } if (("WriteExtendedAttributes" == name)) { this.writeExtendedAttributesField = Enums.ParseYesNoType(value); this.writeExtendedAttributesFieldSet = true; } if (("Synchronize" == name)) { this.synchronizeField = Enums.ParseYesNoType(value); this.synchronizeFieldSet = true; } if (("CreateFile" == name)) { this.createFileField = Enums.ParseYesNoType(value); this.createFileFieldSet = true; } if (("CreateChild" == name)) { this.createChildField = Enums.ParseYesNoType(value); this.createChildFieldSet = true; } if (("DeleteChild" == name)) { this.deleteChildField = Enums.ParseYesNoType(value); this.deleteChildFieldSet = true; } if (("Traverse" == name)) { this.traverseField = Enums.ParseYesNoType(value); this.traverseFieldSet = true; } if (("Append" == name)) { this.appendField = Enums.ParseYesNoType(value); this.appendFieldSet = true; } if (("Execute" == name)) { this.executeField = Enums.ParseYesNoType(value); this.executeFieldSet = true; } if (("Write" == name)) { this.writeField = Enums.ParseYesNoType(value); this.writeFieldSet = true; } if (("CreateSubkeys" == name)) { this.createSubkeysField = Enums.ParseYesNoType(value); this.createSubkeysFieldSet = true; } if (("EnumerateSubkeys" == name)) { this.enumerateSubkeysField = Enums.ParseYesNoType(value); this.enumerateSubkeysFieldSet = true; } if (("Notify" == name)) { this.notifyField = Enums.ParseYesNoType(value); this.notifyFieldSet = true; } if (("CreateLink" == name)) { this.createLinkField = Enums.ParseYesNoType(value); this.createLinkFieldSet = true; } if (("GenericAll" == name)) { this.genericAllField = Enums.ParseYesNoType(value); this.genericAllFieldSet = true; } if (("GenericExecute" == name)) { this.genericExecuteField = Enums.ParseYesNoType(value); this.genericExecuteFieldSet = true; } if (("GenericWrite" == name)) { this.genericWriteField = Enums.ParseYesNoType(value); this.genericWriteFieldSet = true; } if (("GenericRead" == name)) { this.genericReadField = Enums.ParseYesNoType(value); this.genericReadFieldSet = true; } if (("ServiceQueryConfig" == name)) { this.serviceQueryConfigField = Enums.ParseYesNoType(value); this.serviceQueryConfigFieldSet = true; } if (("ServiceChangeConfig" == name)) { this.serviceChangeConfigField = Enums.ParseYesNoType(value); this.serviceChangeConfigFieldSet = true; } if (("ServiceQueryStatus" == name)) { this.serviceQueryStatusField = Enums.ParseYesNoType(value); this.serviceQueryStatusFieldSet = true; } if (("ServiceEnumerateDependents" == name)) { this.serviceEnumerateDependentsField = Enums.ParseYesNoType(value); this.serviceEnumerateDependentsFieldSet = true; } if (("ServiceStart" == name)) { this.serviceStartField = Enums.ParseYesNoType(value); this.serviceStartFieldSet = true; } if (("ServiceStop" == name)) { this.serviceStopField = Enums.ParseYesNoType(value); this.serviceStopFieldSet = true; } if (("ServicePauseContinue" == name)) { this.servicePauseContinueField = Enums.ParseYesNoType(value); this.servicePauseContinueFieldSet = true; } if (("ServiceInterrogate" == name)) { this.serviceInterrogateField = Enums.ParseYesNoType(value); this.serviceInterrogateFieldSet = true; } if (("ServiceUserDefinedControl" == name)) { this.serviceUserDefinedControlField = Enums.ParseYesNoType(value); this.serviceUserDefinedControlFieldSet = true; } } } /// /// Describes a product search. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class ProductSearch : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string variableField; private bool variableFieldSet; private string conditionField; private bool conditionFieldSet; private string afterField; private bool afterFieldSet; private string guidField; private bool guidFieldSet; private string productCodeField; private bool productCodeFieldSet; private string upgradeCodeField; private bool upgradeCodeFieldSet; private ResultType resultField; private bool resultFieldSet; private ISchemaElement parentElement; /// /// Id of the search for ordering and dependency. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the variable in which to place the result of the search. /// public string Variable { get { return this.variableField; } set { this.variableFieldSet = true; this.variableField = value; } } /// /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. /// public string Condition { get { return this.conditionField; } set { this.conditionFieldSet = true; this.conditionField = value; } } /// /// Id of the search that this one should come after. /// public string After { get { return this.afterField; } set { this.afterFieldSet = true; this.afterField = value; } } /// /// The Guid attribute has been deprecated; use the ProductCode or UpgradeCode attribute instead. If this attribute is used, it is assumed to be a ProductCode. /// public string Guid { get { return this.guidField; } set { this.guidFieldSet = true; this.guidField = value; } } /// /// The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified. /// public string ProductCode { get { return this.productCodeField; } set { this.productCodeFieldSet = true; this.productCodeField = value; } } /// /// The UpgradeCode to use for the search. This attribute must be omitted if ProductCode is specified. Note that if multiple products are found, the highest versioned product will be used for the result. /// public string UpgradeCode { get { return this.upgradeCodeField; } set { this.upgradeCodeFieldSet = true; this.upgradeCodeField = value; } } /// /// Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead. /// public ResultType Result { get { return this.resultField; } set { this.resultFieldSet = true; this.resultField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a ResultType from a string. /// public static ResultType ParseResultType(string value) { ResultType parsedValue; ProductSearch.TryParseResultType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ResultType from a string. /// public static bool TryParseResultType(string value, out ResultType parsedValue) { parsedValue = ResultType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("version" == value)) { parsedValue = ResultType.version; } else { if (("language" == value)) { parsedValue = ResultType.language; } else { if (("state" == value)) { parsedValue = ResultType.state; } else { if (("assignment" == value)) { parsedValue = ResultType.assignment; } else { parsedValue = ResultType.IllegalValue; return false; } } } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.variableFieldSet) { writer.WriteAttributeString("Variable", this.variableField); } if (this.conditionFieldSet) { writer.WriteAttributeString("Condition", this.conditionField); } if (this.afterFieldSet) { writer.WriteAttributeString("After", this.afterField); } if (this.guidFieldSet) { writer.WriteAttributeString("Guid", this.guidField); } if (this.productCodeFieldSet) { writer.WriteAttributeString("ProductCode", this.productCodeField); } if (this.upgradeCodeFieldSet) { writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); } if (this.resultFieldSet) { if ((this.resultField == ResultType.version)) { writer.WriteAttributeString("Result", "version"); } if ((this.resultField == ResultType.language)) { writer.WriteAttributeString("Result", "language"); } if ((this.resultField == ResultType.state)) { writer.WriteAttributeString("Result", "state"); } if ((this.resultField == ResultType.assignment)) { writer.WriteAttributeString("Result", "assignment"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Variable" == name)) { this.variableField = value; this.variableFieldSet = true; } if (("Condition" == name)) { this.conditionField = value; this.conditionFieldSet = true; } if (("After" == name)) { this.afterField = value; this.afterFieldSet = true; } if (("Guid" == name)) { this.guidField = value; this.guidFieldSet = true; } if (("ProductCode" == name)) { this.productCodeField = value; this.productCodeFieldSet = true; } if (("UpgradeCode" == name)) { this.upgradeCodeField = value; this.upgradeCodeFieldSet = true; } if (("Result" == name)) { this.resultField = ProductSearch.ParseResultType(value); this.resultFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ResultType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default. /// version, /// /// Saves the language of a matching product if found; empty otherwise. /// language, /// /// Saves the state of the product: advertised (1), absent (2), or locally installed (5). /// state, /// /// Saves the assignment type of the product: per-user (0), or per-machine (1). /// assignment, } } /// /// References a ProductSearch. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class ProductSearchRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("ProductSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Remove a folder and all contained files and folders if the parent component is selected for installation or removal. /// The folder must be specified in the Property attribute as the name of a property that will have a value that resolves /// to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used. /// For more details, see the Remarks. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class RemoveFolderEx : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string propertyField; private bool propertyFieldSet; private OnType onField; private bool onFieldSet; private ISchemaElement parentElement; /// /// Primary key used to identify this particular entry. If this is not specified, a stable identifier /// will be generated at compile time based on the other attributes. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// The id of a property that resolves to the full path of the source directory. The property does not have /// to exist in the installer database at creation time; it could be created at installation time by a custom /// action, on the command line, etc. The property value can contain environment variables surrounded by /// percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before /// being evaluated for a full path. /// public string Property { get { return this.propertyField; } set { this.propertyFieldSet = true; this.propertyField = value; } } /// /// This value determines when the folder may be removed. /// public OnType On { get { return this.onField; } set { this.onFieldSet = true; this.onField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a OnType from a string. /// public static OnType ParseOnType(string value) { OnType parsedValue; RemoveFolderEx.TryParseOnType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a OnType from a string. /// public static bool TryParseOnType(string value, out OnType parsedValue) { parsedValue = OnType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("install" == value)) { parsedValue = OnType.install; } else { if (("uninstall" == value)) { parsedValue = OnType.uninstall; } else { if (("both" == value)) { parsedValue = OnType.both; } else { parsedValue = OnType.IllegalValue; return false; } } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("RemoveFolderEx", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.propertyFieldSet) { writer.WriteAttributeString("Property", this.propertyField); } if (this.onFieldSet) { if ((this.onField == OnType.install)) { writer.WriteAttributeString("On", "install"); } if ((this.onField == OnType.uninstall)) { writer.WriteAttributeString("On", "uninstall"); } if ((this.onField == OnType.both)) { writer.WriteAttributeString("On", "both"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Property" == name)) { this.propertyField = value; this.propertyFieldSet = true; } if (("On" == name)) { this.onField = RemoveFolderEx.ParseOnType(value); this.onFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum OnType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource). /// install, /// /// Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent). /// uninstall, /// /// Removes the folder when the parent component is being installed or removed. /// both, } } /// /// Registers a resource with the Restart Manager. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class RestartResource : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string pathField; private bool pathFieldSet; private string processNameField; private bool processNameFieldSet; private string serviceNameField; private bool serviceNameFieldSet; private ISchemaElement parentElement; /// /// The unique identifier for this resource. A unique identifier will /// be generated automatically if not specified. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// The full path to the process module to register with the Restart Manager. /// This can be a formatted value that resolves to a full path. /// public string Path { get { return this.pathField; } set { this.pathFieldSet = true; this.pathField = value; } } /// /// The name of a process to register with the Restart Manager. /// This can be a formatted value that resolves to a process name. /// public string ProcessName { get { return this.processNameField; } set { this.processNameFieldSet = true; this.processNameField = value; } } /// /// The name of a Windows service to register with the Restart Manager. /// This can be a formatted value that resolves to a service name. /// public string ServiceName { get { return this.serviceNameField; } set { this.serviceNameFieldSet = true; this.serviceNameField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("RestartResource", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.pathFieldSet) { writer.WriteAttributeString("Path", this.pathField); } if (this.processNameFieldSet) { writer.WriteAttributeString("ProcessName", this.processNameField); } if (this.serviceNameFieldSet) { writer.WriteAttributeString("ServiceName", this.serviceNameField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Path" == name)) { this.pathField = value; this.pathFieldSet = true; } if (("ProcessName" == name)) { this.processNameField = value; this.processNameFieldSet = true; } if (("ServiceName" == name)) { this.serviceNameField = value; this.serviceNameFieldSet = true; } } } /// /// Describes a registry search. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class RegistrySearch : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string variableField; private bool variableFieldSet; private string conditionField; private bool conditionFieldSet; private string afterField; private bool afterFieldSet; private RootType rootField; private bool rootFieldSet; private string keyField; private bool keyFieldSet; private string valueField; private bool valueFieldSet; private FormatType formatField; private bool formatFieldSet; private YesNoType expandEnvironmentVariablesField; private bool expandEnvironmentVariablesFieldSet; private ResultType resultField; private bool resultFieldSet; private YesNoType win64Field; private bool win64FieldSet; private ISchemaElement parentElement; /// /// Id of the search for ordering and dependency. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Name of the variable in which to place the result of the search. /// public string Variable { get { return this.variableField; } set { this.variableFieldSet = true; this.variableField = value; } } /// /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. /// public string Condition { get { return this.conditionField; } set { this.conditionFieldSet = true; this.conditionField = value; } } /// /// Id of the search that this one should come after. /// public string After { get { return this.afterField; } set { this.afterFieldSet = true; this.afterField = value; } } /// /// Registry root hive to search under. /// public RootType Root { get { return this.rootField; } set { this.rootFieldSet = true; this.rootField = value; } } /// /// Key to search for. /// public string Key { get { return this.keyField; } set { this.keyFieldSet = true; this.keyField = value; } } /// /// Optional value to search for under the given Key. /// public string Value { get { return this.valueField; } set { this.valueFieldSet = true; this.valueField = value; } } /// /// What format to return the value in. /// public FormatType Format { get { return this.formatField; } set { this.formatFieldSet = true; this.formatField = value; } } /// /// Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values. /// public YesNoType ExpandEnvironmentVariables { get { return this.expandEnvironmentVariablesField; } set { this.expandEnvironmentVariablesFieldSet = true; this.expandEnvironmentVariablesField = value; } } /// /// Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead. /// public ResultType Result { get { return this.resultField; } set { this.resultFieldSet = true; this.resultField = value; } } /// /// Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry. The default value is 'no'. /// public YesNoType Win64 { get { return this.win64Field; } set { this.win64FieldSet = true; this.win64Field = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a RootType from a string. /// public static RootType ParseRootType(string value) { RootType parsedValue; RegistrySearch.TryParseRootType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a RootType from a string. /// public static bool TryParseRootType(string value, out RootType parsedValue) { parsedValue = RootType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("HKLM" == value)) { parsedValue = RootType.HKLM; } else { if (("HKCU" == value)) { parsedValue = RootType.HKCU; } else { if (("HKCR" == value)) { parsedValue = RootType.HKCR; } else { if (("HKU" == value)) { parsedValue = RootType.HKU; } else { parsedValue = RootType.IllegalValue; return false; } } } } return true; } /// /// Parses a FormatType from a string. /// public static FormatType ParseFormatType(string value) { FormatType parsedValue; RegistrySearch.TryParseFormatType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a FormatType from a string. /// public static bool TryParseFormatType(string value, out FormatType parsedValue) { parsedValue = FormatType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("raw" == value)) { parsedValue = FormatType.raw; } else { if (("compatible" == value)) { parsedValue = FormatType.compatible; } else { parsedValue = FormatType.IllegalValue; return false; } } return true; } /// /// Parses a ResultType from a string. /// public static ResultType ParseResultType(string value) { ResultType parsedValue; RegistrySearch.TryParseResultType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ResultType from a string. /// public static bool TryParseResultType(string value, out ResultType parsedValue) { parsedValue = ResultType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("exists" == value)) { parsedValue = ResultType.exists; } else { if (("value" == value)) { parsedValue = ResultType.value; } else { parsedValue = ResultType.IllegalValue; return false; } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.variableFieldSet) { writer.WriteAttributeString("Variable", this.variableField); } if (this.conditionFieldSet) { writer.WriteAttributeString("Condition", this.conditionField); } if (this.afterFieldSet) { writer.WriteAttributeString("After", this.afterField); } if (this.rootFieldSet) { if ((this.rootField == RootType.HKLM)) { writer.WriteAttributeString("Root", "HKLM"); } if ((this.rootField == RootType.HKCU)) { writer.WriteAttributeString("Root", "HKCU"); } if ((this.rootField == RootType.HKCR)) { writer.WriteAttributeString("Root", "HKCR"); } if ((this.rootField == RootType.HKU)) { writer.WriteAttributeString("Root", "HKU"); } } if (this.keyFieldSet) { writer.WriteAttributeString("Key", this.keyField); } if (this.valueFieldSet) { writer.WriteAttributeString("Value", this.valueField); } if (this.formatFieldSet) { if ((this.formatField == FormatType.raw)) { writer.WriteAttributeString("Format", "raw"); } if ((this.formatField == FormatType.compatible)) { writer.WriteAttributeString("Format", "compatible"); } } if (this.expandEnvironmentVariablesFieldSet) { if ((this.expandEnvironmentVariablesField == YesNoType.no)) { writer.WriteAttributeString("ExpandEnvironmentVariables", "no"); } if ((this.expandEnvironmentVariablesField == YesNoType.yes)) { writer.WriteAttributeString("ExpandEnvironmentVariables", "yes"); } } if (this.resultFieldSet) { if ((this.resultField == ResultType.exists)) { writer.WriteAttributeString("Result", "exists"); } if ((this.resultField == ResultType.value)) { writer.WriteAttributeString("Result", "value"); } } if (this.win64FieldSet) { if ((this.win64Field == YesNoType.no)) { writer.WriteAttributeString("Win64", "no"); } if ((this.win64Field == YesNoType.yes)) { writer.WriteAttributeString("Win64", "yes"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Variable" == name)) { this.variableField = value; this.variableFieldSet = true; } if (("Condition" == name)) { this.conditionField = value; this.conditionFieldSet = true; } if (("After" == name)) { this.afterField = value; this.afterFieldSet = true; } if (("Root" == name)) { this.rootField = RegistrySearch.ParseRootType(value); this.rootFieldSet = true; } if (("Key" == name)) { this.keyField = value; this.keyFieldSet = true; } if (("Value" == name)) { this.valueField = value; this.valueFieldSet = true; } if (("Format" == name)) { this.formatField = RegistrySearch.ParseFormatType(value); this.formatFieldSet = true; } if (("ExpandEnvironmentVariables" == name)) { this.expandEnvironmentVariablesField = Enums.ParseYesNoType(value); this.expandEnvironmentVariablesFieldSet = true; } if (("Result" == name)) { this.resultField = RegistrySearch.ParseResultType(value); this.resultFieldSet = true; } if (("Win64" == name)) { this.win64Field = Enums.ParseYesNoType(value); this.win64FieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum RootType { IllegalValue = int.MaxValue, NotSet = -1, /// /// HKEY_LOCAL_MACHINE /// HKLM, /// /// HKEY_CURRENT_USER /// HKCU, /// /// HKEY_CLASSES_ROOT /// HKCR, /// /// HKEY_USERS /// HKU, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum FormatType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'. /// raw, /// /// Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'. /// compatible, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ResultType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Saves true if a matching registry entry is found; false otherwise. /// exists, /// /// Saves the value of the registry key in the variable. This is the default. /// value, } } /// /// References a RegistrySearch. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class RegistrySearchRef : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private ISchemaElement parentElement; public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } } } /// /// Service configuration information for failure actions. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class ServiceConfig : ISchemaElement, ISetAttributes { private string serviceNameField; private bool serviceNameFieldSet; private FirstFailureActionTypeType firstFailureActionTypeField; private bool firstFailureActionTypeFieldSet; private SecondFailureActionTypeType secondFailureActionTypeField; private bool secondFailureActionTypeFieldSet; private ThirdFailureActionTypeType thirdFailureActionTypeField; private bool thirdFailureActionTypeFieldSet; private int resetPeriodInDaysField; private bool resetPeriodInDaysFieldSet; private int restartServiceDelayInSecondsField; private bool restartServiceDelayInSecondsFieldSet; private string programCommandLineField; private bool programCommandLineFieldSet; private string rebootMessageField; private bool rebootMessageFieldSet; private ISchemaElement parentElement; /// /// Required if not under a ServiceInstall element. /// public string ServiceName { get { return this.serviceNameField; } set { this.serviceNameFieldSet = true; this.serviceNameField = value; } } /// /// Action to take on the first failure of the service. /// public FirstFailureActionTypeType FirstFailureActionType { get { return this.firstFailureActionTypeField; } set { this.firstFailureActionTypeFieldSet = true; this.firstFailureActionTypeField = value; } } /// /// Action to take on the second failure of the service. /// public SecondFailureActionTypeType SecondFailureActionType { get { return this.secondFailureActionTypeField; } set { this.secondFailureActionTypeFieldSet = true; this.secondFailureActionTypeField = value; } } /// /// Action to take on the third failure of the service. /// public ThirdFailureActionTypeType ThirdFailureActionType { get { return this.thirdFailureActionTypeField; } set { this.thirdFailureActionTypeFieldSet = true; this.thirdFailureActionTypeField = value; } } /// /// Number of days after which to reset the failure count to zero if there are no failures. /// public int ResetPeriodInDays { get { return this.resetPeriodInDaysField; } set { this.resetPeriodInDaysFieldSet = true; this.resetPeriodInDaysField = value; } } /// /// If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so. /// public int RestartServiceDelayInSeconds { get { return this.restartServiceDelayInSecondsField; } set { this.restartServiceDelayInSecondsFieldSet = true; this.restartServiceDelayInSecondsField = value; } } /// /// If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted. /// public string ProgramCommandLine { get { return this.programCommandLineField; } set { this.programCommandLineFieldSet = true; this.programCommandLineField = value; } } /// /// If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so. /// public string RebootMessage { get { return this.rebootMessageField; } set { this.rebootMessageFieldSet = true; this.rebootMessageField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a FirstFailureActionTypeType from a string. /// public static FirstFailureActionTypeType ParseFirstFailureActionTypeType(string value) { FirstFailureActionTypeType parsedValue; ServiceConfig.TryParseFirstFailureActionTypeType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a FirstFailureActionTypeType from a string. /// public static bool TryParseFirstFailureActionTypeType(string value, out FirstFailureActionTypeType parsedValue) { parsedValue = FirstFailureActionTypeType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("none" == value)) { parsedValue = FirstFailureActionTypeType.none; } else { if (("reboot" == value)) { parsedValue = FirstFailureActionTypeType.reboot; } else { if (("restart" == value)) { parsedValue = FirstFailureActionTypeType.restart; } else { if (("runCommand" == value)) { parsedValue = FirstFailureActionTypeType.runCommand; } else { parsedValue = FirstFailureActionTypeType.IllegalValue; return false; } } } } return true; } /// /// Parses a SecondFailureActionTypeType from a string. /// public static SecondFailureActionTypeType ParseSecondFailureActionTypeType(string value) { SecondFailureActionTypeType parsedValue; ServiceConfig.TryParseSecondFailureActionTypeType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a SecondFailureActionTypeType from a string. /// public static bool TryParseSecondFailureActionTypeType(string value, out SecondFailureActionTypeType parsedValue) { parsedValue = SecondFailureActionTypeType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("none" == value)) { parsedValue = SecondFailureActionTypeType.none; } else { if (("reboot" == value)) { parsedValue = SecondFailureActionTypeType.reboot; } else { if (("restart" == value)) { parsedValue = SecondFailureActionTypeType.restart; } else { if (("runCommand" == value)) { parsedValue = SecondFailureActionTypeType.runCommand; } else { parsedValue = SecondFailureActionTypeType.IllegalValue; return false; } } } } return true; } /// /// Parses a ThirdFailureActionTypeType from a string. /// public static ThirdFailureActionTypeType ParseThirdFailureActionTypeType(string value) { ThirdFailureActionTypeType parsedValue; ServiceConfig.TryParseThirdFailureActionTypeType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ThirdFailureActionTypeType from a string. /// public static bool TryParseThirdFailureActionTypeType(string value, out ThirdFailureActionTypeType parsedValue) { parsedValue = ThirdFailureActionTypeType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("none" == value)) { parsedValue = ThirdFailureActionTypeType.none; } else { if (("reboot" == value)) { parsedValue = ThirdFailureActionTypeType.reboot; } else { if (("restart" == value)) { parsedValue = ThirdFailureActionTypeType.restart; } else { if (("runCommand" == value)) { parsedValue = ThirdFailureActionTypeType.runCommand; } else { parsedValue = ThirdFailureActionTypeType.IllegalValue; return false; } } } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.serviceNameFieldSet) { writer.WriteAttributeString("ServiceName", this.serviceNameField); } if (this.firstFailureActionTypeFieldSet) { if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.none)) { writer.WriteAttributeString("FirstFailureActionType", "none"); } if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.reboot)) { writer.WriteAttributeString("FirstFailureActionType", "reboot"); } if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.restart)) { writer.WriteAttributeString("FirstFailureActionType", "restart"); } if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.runCommand)) { writer.WriteAttributeString("FirstFailureActionType", "runCommand"); } } if (this.secondFailureActionTypeFieldSet) { if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.none)) { writer.WriteAttributeString("SecondFailureActionType", "none"); } if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.reboot)) { writer.WriteAttributeString("SecondFailureActionType", "reboot"); } if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.restart)) { writer.WriteAttributeString("SecondFailureActionType", "restart"); } if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.runCommand)) { writer.WriteAttributeString("SecondFailureActionType", "runCommand"); } } if (this.thirdFailureActionTypeFieldSet) { if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.none)) { writer.WriteAttributeString("ThirdFailureActionType", "none"); } if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.reboot)) { writer.WriteAttributeString("ThirdFailureActionType", "reboot"); } if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.restart)) { writer.WriteAttributeString("ThirdFailureActionType", "restart"); } if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.runCommand)) { writer.WriteAttributeString("ThirdFailureActionType", "runCommand"); } } if (this.resetPeriodInDaysFieldSet) { writer.WriteAttributeString("ResetPeriodInDays", this.resetPeriodInDaysField.ToString(CultureInfo.InvariantCulture)); } if (this.restartServiceDelayInSecondsFieldSet) { writer.WriteAttributeString("RestartServiceDelayInSeconds", this.restartServiceDelayInSecondsField.ToString(CultureInfo.InvariantCulture)); } if (this.programCommandLineFieldSet) { writer.WriteAttributeString("ProgramCommandLine", this.programCommandLineField); } if (this.rebootMessageFieldSet) { writer.WriteAttributeString("RebootMessage", this.rebootMessageField); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("ServiceName" == name)) { this.serviceNameField = value; this.serviceNameFieldSet = true; } if (("FirstFailureActionType" == name)) { this.firstFailureActionTypeField = ServiceConfig.ParseFirstFailureActionTypeType(value); this.firstFailureActionTypeFieldSet = true; } if (("SecondFailureActionType" == name)) { this.secondFailureActionTypeField = ServiceConfig.ParseSecondFailureActionTypeType(value); this.secondFailureActionTypeFieldSet = true; } if (("ThirdFailureActionType" == name)) { this.thirdFailureActionTypeField = ServiceConfig.ParseThirdFailureActionTypeType(value); this.thirdFailureActionTypeFieldSet = true; } if (("ResetPeriodInDays" == name)) { this.resetPeriodInDaysField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.resetPeriodInDaysFieldSet = true; } if (("RestartServiceDelayInSeconds" == name)) { this.restartServiceDelayInSecondsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.restartServiceDelayInSecondsFieldSet = true; } if (("ProgramCommandLine" == name)) { this.programCommandLineField = value; this.programCommandLineFieldSet = true; } if (("RebootMessage" == name)) { this.rebootMessageField = value; this.rebootMessageFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum FirstFailureActionTypeType { IllegalValue = int.MaxValue, NotSet = -1, none, reboot, restart, runCommand, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum SecondFailureActionTypeType { IllegalValue = int.MaxValue, NotSet = -1, none, reboot, restart, runCommand, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ThirdFailureActionTypeType { IllegalValue = int.MaxValue, NotSet = -1, none, reboot, restart, runCommand, } } /// /// Updates the last modified date/time of a file. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class TouchFile : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string pathField; private bool pathFieldSet; private YesNoType onInstallField; private bool onInstallFieldSet; private YesNoType onReinstallField; private bool onReinstallFieldSet; private YesNoType onUninstallField; private bool onUninstallFieldSet; private YesNoType nonvitalField; private bool nonvitalFieldSet; private ISchemaElement parentElement; /// /// Identifier for the touch file operation. If the identifier is not specified it will be generated. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// Path of the file to update. This value is formatted. /// public string Path { get { return this.pathField; } set { this.pathFieldSet = true; this.pathField = value; } } /// /// Specifies whether or not the modified time of the file should be updated on install. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'. /// public YesNoType OnInstall { get { return this.onInstallField; } set { this.onInstallFieldSet = true; this.onInstallField = value; } } /// /// Specifies whether or not the modified time of the file should be updated on reinstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'. /// public YesNoType OnReinstall { get { return this.onReinstallField; } set { this.onReinstallFieldSet = true; this.onReinstallField = value; } } /// /// Specifies whether or not the modified time of the file should be updated on uninstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'no'. /// public YesNoType OnUninstall { get { return this.onUninstallField; } set { this.onUninstallFieldSet = true; this.onUninstallField = value; } } /// /// Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'. /// public YesNoType Nonvital { get { return this.nonvitalField; } set { this.nonvitalFieldSet = true; this.nonvitalField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Processes this element and all child elements into an XmlWriter. /// public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("TouchFile", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.pathFieldSet) { writer.WriteAttributeString("Path", this.pathField); } if (this.onInstallFieldSet) { if ((this.onInstallField == YesNoType.no)) { writer.WriteAttributeString("OnInstall", "no"); } if ((this.onInstallField == YesNoType.yes)) { writer.WriteAttributeString("OnInstall", "yes"); } } if (this.onReinstallFieldSet) { if ((this.onReinstallField == YesNoType.no)) { writer.WriteAttributeString("OnReinstall", "no"); } if ((this.onReinstallField == YesNoType.yes)) { writer.WriteAttributeString("OnReinstall", "yes"); } } if (this.onUninstallFieldSet) { if ((this.onUninstallField == YesNoType.no)) { writer.WriteAttributeString("OnUninstall", "no"); } if ((this.onUninstallField == YesNoType.yes)) { writer.WriteAttributeString("OnUninstall", "yes"); } } if (this.nonvitalFieldSet) { if ((this.nonvitalField == YesNoType.no)) { writer.WriteAttributeString("Nonvital", "no"); } if ((this.nonvitalField == YesNoType.yes)) { writer.WriteAttributeString("Nonvital", "yes"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Path" == name)) { this.pathField = value; this.pathFieldSet = true; } if (("OnInstall" == name)) { this.onInstallField = Enums.ParseYesNoType(value); this.onInstallFieldSet = true; } if (("OnReinstall" == name)) { this.onReinstallField = Enums.ParseYesNoType(value); this.onReinstallFieldSet = true; } if (("OnUninstall" == name)) { this.onUninstallField = Enums.ParseYesNoType(value); this.onUninstallFieldSet = true; } if (("Nonvital" == name)) { this.nonvitalField = Enums.ParseYesNoType(value); this.nonvitalFieldSet = true; } } } /// /// User for all kinds of things. When it is not nested under a component it is included in the MSI so it can be referenced by other elements such as the User attribute in the AppPool element. When it is nested under a Component element, the User will be created on install and can also be used for reference. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class User : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes { private ElementCollection children; private string idField; private bool idFieldSet; private string nameField; private bool nameFieldSet; private string domainField; private bool domainFieldSet; private string passwordField; private bool passwordFieldSet; private YesNoType passwordNeverExpiresField; private bool passwordNeverExpiresFieldSet; private YesNoType canNotChangePasswordField; private bool canNotChangePasswordFieldSet; private YesNoType removeOnUninstallField; private bool removeOnUninstallFieldSet; private YesNoType failIfExistsField; private bool failIfExistsFieldSet; private YesNoType logonAsServiceField; private bool logonAsServiceFieldSet; private YesNoType logonAsBatchJobField; private bool logonAsBatchJobFieldSet; private YesNoType updateIfExistsField; private bool updateIfExistsFieldSet; private YesNoType passwordExpiredField; private bool passwordExpiredFieldSet; private YesNoType disabledField; private bool disabledFieldSet; private YesNoType createUserField; private bool createUserFieldSet; private YesNoType vitalField; private bool vitalFieldSet; private ISchemaElement parentElement; public User() { ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(GroupRef))); this.children = childCollection0; } public virtual IEnumerable Children { get { return this.children; } } [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] public virtual IEnumerable this[System.Type childType] { get { return this.children.Filter(childType); } } public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// A /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// A /// public string Domain { get { return this.domainField; } set { this.domainFieldSet = true; this.domainField = value; } } /// /// Usually a Property that is passed in on the command-line to keep it more secure. /// public string Password { get { return this.passwordField; } set { this.passwordFieldSet = true; this.passwordField = value; } } /// /// The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD. /// public YesNoType PasswordNeverExpires { get { return this.passwordNeverExpiresField; } set { this.passwordNeverExpiresFieldSet = true; this.passwordNeverExpiresField = value; } } /// /// The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE. /// public YesNoType CanNotChangePassword { get { return this.canNotChangePasswordField; } set { this.canNotChangePasswordFieldSet = true; this.canNotChangePasswordField = value; } } /// /// Indicates whether the user account should be removed or left behind on uninstall. /// public YesNoType RemoveOnUninstall { get { return this.removeOnUninstallField; } set { this.removeOnUninstallFieldSet = true; this.removeOnUninstallField = value; } } /// /// Indicates if the install should fail if the user already exists. /// public YesNoType FailIfExists { get { return this.failIfExistsField; } set { this.failIfExistsFieldSet = true; this.failIfExistsField = value; } } /// /// Indicates whether or not the user can logon as a serivce. User creation can be skipped if all that is desired is to set this access right on the user. /// public YesNoType LogonAsService { get { return this.logonAsServiceField; } set { this.logonAsServiceFieldSet = true; this.logonAsServiceField = value; } } /// /// Indicates whether or not the user can logon as a batch job. User creation can be skipped if all that is desired is to set this access right on the user. /// public YesNoType LogonAsBatchJob { get { return this.logonAsBatchJobField; } set { this.logonAsBatchJobFieldSet = true; this.logonAsBatchJobField = value; } } /// /// Indicates if the user account properties should be updated if the user already exists. /// public YesNoType UpdateIfExists { get { return this.updateIfExistsField; } set { this.updateIfExistsFieldSet = true; this.updateIfExistsField = value; } } /// /// Indicates whether the user must change their password on their first login. /// public YesNoType PasswordExpired { get { return this.passwordExpiredField; } set { this.passwordExpiredFieldSet = true; this.passwordExpiredField = value; } } /// /// The account is disabled. Equivalent to UF_ACCOUNTDISABLE. /// public YesNoType Disabled { get { return this.disabledField; } set { this.disabledFieldSet = true; this.disabledField = value; } } /// /// Indicates whether or not to create the user. User creation can be skipped if all that is desired is to join a user to groups. /// public YesNoType CreateUser { get { return this.createUserField; } set { this.createUserFieldSet = true; this.createUserField = value; } } /// /// Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes". /// public YesNoType Vital { get { return this.vitalField; } set { this.vitalFieldSet = true; this.vitalField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } public virtual void AddChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.AddElement(child); child.ParentElement = this; } public virtual void RemoveChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.RemoveElement(child); child.ParentElement = null; } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ISchemaElement ICreateChildren.CreateChild(string childName) { if (String.IsNullOrEmpty(childName)) { throw new ArgumentNullException("childName"); } ISchemaElement childValue = null; if (("GroupRef" == childName)) { childValue = new GroupRef(); } if ((null == childValue)) { throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); } return childValue; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("User", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.domainFieldSet) { writer.WriteAttributeString("Domain", this.domainField); } if (this.passwordFieldSet) { writer.WriteAttributeString("Password", this.passwordField); } if (this.passwordNeverExpiresFieldSet) { if ((this.passwordNeverExpiresField == YesNoType.no)) { writer.WriteAttributeString("PasswordNeverExpires", "no"); } if ((this.passwordNeverExpiresField == YesNoType.yes)) { writer.WriteAttributeString("PasswordNeverExpires", "yes"); } } if (this.canNotChangePasswordFieldSet) { if ((this.canNotChangePasswordField == YesNoType.no)) { writer.WriteAttributeString("CanNotChangePassword", "no"); } if ((this.canNotChangePasswordField == YesNoType.yes)) { writer.WriteAttributeString("CanNotChangePassword", "yes"); } } if (this.removeOnUninstallFieldSet) { if ((this.removeOnUninstallField == YesNoType.no)) { writer.WriteAttributeString("RemoveOnUninstall", "no"); } if ((this.removeOnUninstallField == YesNoType.yes)) { writer.WriteAttributeString("RemoveOnUninstall", "yes"); } } if (this.failIfExistsFieldSet) { if ((this.failIfExistsField == YesNoType.no)) { writer.WriteAttributeString("FailIfExists", "no"); } if ((this.failIfExistsField == YesNoType.yes)) { writer.WriteAttributeString("FailIfExists", "yes"); } } if (this.logonAsServiceFieldSet) { if ((this.logonAsServiceField == YesNoType.no)) { writer.WriteAttributeString("LogonAsService", "no"); } if ((this.logonAsServiceField == YesNoType.yes)) { writer.WriteAttributeString("LogonAsService", "yes"); } } if (this.logonAsBatchJobFieldSet) { if ((this.logonAsBatchJobField == YesNoType.no)) { writer.WriteAttributeString("LogonAsBatchJob", "no"); } if ((this.logonAsBatchJobField == YesNoType.yes)) { writer.WriteAttributeString("LogonAsBatchJob", "yes"); } } if (this.updateIfExistsFieldSet) { if ((this.updateIfExistsField == YesNoType.no)) { writer.WriteAttributeString("UpdateIfExists", "no"); } if ((this.updateIfExistsField == YesNoType.yes)) { writer.WriteAttributeString("UpdateIfExists", "yes"); } } if (this.passwordExpiredFieldSet) { if ((this.passwordExpiredField == YesNoType.no)) { writer.WriteAttributeString("PasswordExpired", "no"); } if ((this.passwordExpiredField == YesNoType.yes)) { writer.WriteAttributeString("PasswordExpired", "yes"); } } if (this.disabledFieldSet) { if ((this.disabledField == YesNoType.no)) { writer.WriteAttributeString("Disabled", "no"); } if ((this.disabledField == YesNoType.yes)) { writer.WriteAttributeString("Disabled", "yes"); } } if (this.createUserFieldSet) { if ((this.createUserField == YesNoType.no)) { writer.WriteAttributeString("CreateUser", "no"); } if ((this.createUserField == YesNoType.yes)) { writer.WriteAttributeString("CreateUser", "yes"); } } if (this.vitalFieldSet) { if ((this.vitalField == YesNoType.no)) { writer.WriteAttributeString("Vital", "no"); } if ((this.vitalField == YesNoType.yes)) { writer.WriteAttributeString("Vital", "yes"); } } for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) { ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); childElement.OutputXml(writer); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Domain" == name)) { this.domainField = value; this.domainFieldSet = true; } if (("Password" == name)) { this.passwordField = value; this.passwordFieldSet = true; } if (("PasswordNeverExpires" == name)) { this.passwordNeverExpiresField = Enums.ParseYesNoType(value); this.passwordNeverExpiresFieldSet = true; } if (("CanNotChangePassword" == name)) { this.canNotChangePasswordField = Enums.ParseYesNoType(value); this.canNotChangePasswordFieldSet = true; } if (("RemoveOnUninstall" == name)) { this.removeOnUninstallField = Enums.ParseYesNoType(value); this.removeOnUninstallFieldSet = true; } if (("FailIfExists" == name)) { this.failIfExistsField = Enums.ParseYesNoType(value); this.failIfExistsFieldSet = true; } if (("LogonAsService" == name)) { this.logonAsServiceField = Enums.ParseYesNoType(value); this.logonAsServiceFieldSet = true; } if (("LogonAsBatchJob" == name)) { this.logonAsBatchJobField = Enums.ParseYesNoType(value); this.logonAsBatchJobFieldSet = true; } if (("UpdateIfExists" == name)) { this.updateIfExistsField = Enums.ParseYesNoType(value); this.updateIfExistsFieldSet = true; } if (("PasswordExpired" == name)) { this.passwordExpiredField = Enums.ParseYesNoType(value); this.passwordExpiredFieldSet = true; } if (("Disabled" == name)) { this.disabledField = Enums.ParseYesNoType(value); this.disabledFieldSet = true; } if (("CreateUser" == name)) { this.createUserField = Enums.ParseYesNoType(value); this.createUserFieldSet = true; } if (("Vital" == name)) { this.vitalField = Enums.ParseYesNoType(value); this.vitalFieldSet = true; } } } /// /// Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class XmlFile : ISchemaElement, ISetAttributes { private string idField; private bool idFieldSet; private string elementPathField; private bool elementPathFieldSet; private string fileField; private bool fileFieldSet; private string nameField; private bool nameFieldSet; private string valueField; private bool valueFieldSet; private ActionType actionField; private bool actionFieldSet; private YesNoType permanentField; private bool permanentFieldSet; private YesNoType preserveModifiedDateField; private bool preserveModifiedDateFieldSet; private int sequenceField; private bool sequenceFieldSet; private SelectionLanguageType selectionLanguageField; private bool selectionLanguageFieldSet; private ISchemaElement parentElement; /// /// Identifier for xml file modification. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } /// /// The XPath of the element to be modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. /// public string ElementPath { get { return this.elementPathField; } set { this.elementPathFieldSet = true; this.elementPathField = value; } } /// /// Path of the .xml file to configure. /// public string File { get { return this.fileField; } set { this.fileFieldSet = true; this.fileField = value; } } /// /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } /// /// The value to be written. See the /// public string Value { get { return this.valueField; } set { this.valueFieldSet = true; this.valueField = value; } } /// /// The type of modification to be made to the XML file when the component is installed. /// public ActionType Action { get { return this.actionField; } set { this.actionFieldSet = true; this.actionField = value; } } /// /// Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue. /// public YesNoType Permanent { get { return this.permanentField; } set { this.permanentFieldSet = true; this.permanentField = value; } } /// /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made. /// public YesNoType PreserveModifiedDate { get { return this.preserveModifiedDateField; } set { this.preserveModifiedDateFieldSet = true; this.preserveModifiedDateField = value; } } /// /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them. /// public int Sequence { get { return this.sequenceField; } set { this.sequenceFieldSet = true; this.sequenceField = value; } } /// /// Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language. /// public SelectionLanguageType SelectionLanguage { get { return this.selectionLanguageField; } set { this.selectionLanguageFieldSet = true; this.selectionLanguageField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } /// /// Parses a ActionType from a string. /// public static ActionType ParseActionType(string value) { ActionType parsedValue; XmlFile.TryParseActionType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ActionType from a string. /// public static bool TryParseActionType(string value, out ActionType parsedValue) { parsedValue = ActionType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("createElement" == value)) { parsedValue = ActionType.createElement; } else { if (("deleteValue" == value)) { parsedValue = ActionType.deleteValue; } else { if (("setValue" == value)) { parsedValue = ActionType.setValue; } else { if (("bulkSetValue" == value)) { parsedValue = ActionType.bulkSetValue; } else { parsedValue = ActionType.IllegalValue; return false; } } } } return true; } /// /// Parses a SelectionLanguageType from a string. /// public static SelectionLanguageType ParseSelectionLanguageType(string value) { SelectionLanguageType parsedValue; XmlFile.TryParseSelectionLanguageType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a SelectionLanguageType from a string. /// public static bool TryParseSelectionLanguageType(string value, out SelectionLanguageType parsedValue) { parsedValue = SelectionLanguageType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("XPath" == value)) { parsedValue = SelectionLanguageType.XPath; } else { if (("XSLPattern" == value)) { parsedValue = SelectionLanguageType.XSLPattern; } else { parsedValue = SelectionLanguageType.IllegalValue; return false; } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("XmlFile", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.elementPathFieldSet) { writer.WriteAttributeString("ElementPath", this.elementPathField); } if (this.fileFieldSet) { writer.WriteAttributeString("File", this.fileField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.valueFieldSet) { writer.WriteAttributeString("Value", this.valueField); } if (this.actionFieldSet) { if ((this.actionField == ActionType.createElement)) { writer.WriteAttributeString("Action", "createElement"); } if ((this.actionField == ActionType.deleteValue)) { writer.WriteAttributeString("Action", "deleteValue"); } if ((this.actionField == ActionType.setValue)) { writer.WriteAttributeString("Action", "setValue"); } if ((this.actionField == ActionType.bulkSetValue)) { writer.WriteAttributeString("Action", "bulkSetValue"); } } if (this.permanentFieldSet) { if ((this.permanentField == YesNoType.no)) { writer.WriteAttributeString("Permanent", "no"); } if ((this.permanentField == YesNoType.yes)) { writer.WriteAttributeString("Permanent", "yes"); } } if (this.preserveModifiedDateFieldSet) { if ((this.preserveModifiedDateField == YesNoType.no)) { writer.WriteAttributeString("PreserveModifiedDate", "no"); } if ((this.preserveModifiedDateField == YesNoType.yes)) { writer.WriteAttributeString("PreserveModifiedDate", "yes"); } } if (this.sequenceFieldSet) { writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); } if (this.selectionLanguageFieldSet) { if ((this.selectionLanguageField == SelectionLanguageType.XPath)) { writer.WriteAttributeString("SelectionLanguage", "XPath"); } if ((this.selectionLanguageField == SelectionLanguageType.XSLPattern)) { writer.WriteAttributeString("SelectionLanguage", "XSLPattern"); } } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("ElementPath" == name)) { this.elementPathField = value; this.elementPathFieldSet = true; } if (("File" == name)) { this.fileField = value; this.fileFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Value" == name)) { this.valueField = value; this.valueFieldSet = true; } if (("Action" == name)) { this.actionField = XmlFile.ParseActionType(value); this.actionFieldSet = true; } if (("Permanent" == name)) { this.permanentField = Enums.ParseYesNoType(value); this.permanentFieldSet = true; } if (("PreserveModifiedDate" == name)) { this.preserveModifiedDateField = Enums.ParseYesNoType(value); this.preserveModifiedDateFieldSet = true; } if (("Sequence" == name)) { this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.sequenceFieldSet = true; } if (("SelectionLanguage" == name)) { this.selectionLanguageField = XmlFile.ParseSelectionLanguageType(value); this.selectionLanguageFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ActionType { IllegalValue = int.MaxValue, NotSet = -1, /// /// Creates a new element under the element specified in ElementPath. The Name attribute is required in this case and specifies the name of the new element. The Value attribute is not necessary when createElement is specified as the action. If the Value attribute is set, it will cause the new element's text value to be set. /// createElement, /// /// Deletes a value from the element specified in the ElementPath. If Name is specified, the attribute with that name is deleted. If Name is not specified, the text value of the element specified in the ElementPath is deleted. The Value attribute is ignored if deleteValue is the action specified. /// deleteValue, /// /// Sets a value in the element specified in the ElementPath. If Name is specified, and attribute with that name is set to the value specified in Value. If Name is not specified, the text value of the element is set. Value is a required attribute if setValue is the action specified. /// setValue, /// /// Sets all the values in the elements that match the ElementPath. If Name is specified, attributes with that name are set to the same value specified in Value. If Name is not specified, the text values of the elements are set. Value is a required attribute if setBulkValue is the action specified. /// bulkSetValue, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum SelectionLanguageType { IllegalValue = int.MaxValue, NotSet = -1, XPath, XSLPattern, } } /// /// Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions. /// [GeneratedCode("XsdGen", "4.0.0.0")] public class XmlConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes { private ElementCollection children; private string idField; private bool idFieldSet; private ActionType actionField; private bool actionFieldSet; private string elementIdField; private bool elementIdFieldSet; private string elementPathField; private bool elementPathFieldSet; private string fileField; private bool fileFieldSet; private string nameField; private bool nameFieldSet; private NodeType nodeField; private bool nodeFieldSet; private OnType onField; private bool onFieldSet; private YesNoType preserveModifiedDateField; private bool preserveModifiedDateFieldSet; private int sequenceField; private bool sequenceFieldSet; private string valueField; private bool valueFieldSet; private string verifyPathField; private bool verifyPathFieldSet; private ISchemaElement parentElement; public XmlConfig() { ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(XmlConfig))); this.children = childCollection0; } public virtual IEnumerable Children { get { return this.children; } } [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] public virtual IEnumerable this[System.Type childType] { get { return this.children.Filter(childType); } } /// /// Identifier for xml file modification. /// public string Id { get { return this.idField; } set { this.idFieldSet = true; this.idField = value; } } public ActionType Action { get { return this.actionField; } set { this.actionFieldSet = true; this.actionField = value; } } /// /// The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted. /// public string ElementId { get { return this.elementIdField; } set { this.elementIdFieldSet = true; this.elementIdField = value; } } /// /// The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. /// public string ElementPath { get { return this.elementPathField; } set { this.elementPathFieldSet = true; this.elementPathField = value; } } /// /// Path of the .xml file to configure. /// public string File { get { return this.fileField; } set { this.fileFieldSet = true; this.fileField = value; } } /// /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set. /// public string Name { get { return this.nameField; } set { this.nameFieldSet = true; this.nameField = value; } } public NodeType Node { get { return this.nodeField; } set { this.nodeFieldSet = true; this.nodeField = value; } } public OnType On { get { return this.onField; } set { this.onFieldSet = true; this.onField = value; } } /// /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made. /// public YesNoType PreserveModifiedDate { get { return this.preserveModifiedDateField; } set { this.preserveModifiedDateFieldSet = true; this.preserveModifiedDateField = value; } } /// /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them. /// public int Sequence { get { return this.sequenceField; } set { this.sequenceFieldSet = true; this.sequenceField = value; } } /// /// The value to be written. See the /// public string Value { get { return this.valueField; } set { this.valueFieldSet = true; this.valueField = value; } } /// /// The XPath to the element being modified. This is required for 'delete' actions. For 'create' actions, VerifyPath is used to decide if the element already exists. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. /// public string VerifyPath { get { return this.verifyPathField; } set { this.verifyPathFieldSet = true; this.verifyPathField = value; } } public virtual ISchemaElement ParentElement { get { return this.parentElement; } set { this.parentElement = value; } } public virtual void AddChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.AddElement(child); child.ParentElement = this; } public virtual void RemoveChild(ISchemaElement child) { if ((null == child)) { throw new ArgumentNullException("child"); } this.children.RemoveElement(child); child.ParentElement = null; } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ISchemaElement ICreateChildren.CreateChild(string childName) { if (String.IsNullOrEmpty(childName)) { throw new ArgumentNullException("childName"); } ISchemaElement childValue = null; if (("XmlConfig" == childName)) { childValue = new XmlConfig(); } if ((null == childValue)) { throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); } return childValue; } /// /// Parses a ActionType from a string. /// public static ActionType ParseActionType(string value) { ActionType parsedValue; XmlConfig.TryParseActionType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a ActionType from a string. /// public static bool TryParseActionType(string value, out ActionType parsedValue) { parsedValue = ActionType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("create" == value)) { parsedValue = ActionType.create; } else { if (("delete" == value)) { parsedValue = ActionType.delete; } else { parsedValue = ActionType.IllegalValue; return false; } } return true; } /// /// Parses a NodeType from a string. /// public static NodeType ParseNodeType(string value) { NodeType parsedValue; XmlConfig.TryParseNodeType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a NodeType from a string. /// public static bool TryParseNodeType(string value, out NodeType parsedValue) { parsedValue = NodeType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("element" == value)) { parsedValue = NodeType.element; } else { if (("value" == value)) { parsedValue = NodeType.value; } else { if (("document" == value)) { parsedValue = NodeType.document; } else { parsedValue = NodeType.IllegalValue; return false; } } } return true; } /// /// Parses a OnType from a string. /// public static OnType ParseOnType(string value) { OnType parsedValue; XmlConfig.TryParseOnType(value, out parsedValue); return parsedValue; } /// /// Tries to parse a OnType from a string. /// public static bool TryParseOnType(string value, out OnType parsedValue) { parsedValue = OnType.NotSet; if (string.IsNullOrEmpty(value)) { return false; } if (("install" == value)) { parsedValue = OnType.install; } else { if (("uninstall" == value)) { parsedValue = OnType.uninstall; } else { parsedValue = OnType.IllegalValue; return false; } } return true; } /// /// Processes this element and all child elements into an XmlWriter. /// [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public virtual void OutputXml(XmlWriter writer) { if ((null == writer)) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("XmlConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); if (this.idFieldSet) { writer.WriteAttributeString("Id", this.idField); } if (this.actionFieldSet) { if ((this.actionField == ActionType.create)) { writer.WriteAttributeString("Action", "create"); } if ((this.actionField == ActionType.delete)) { writer.WriteAttributeString("Action", "delete"); } } if (this.elementIdFieldSet) { writer.WriteAttributeString("ElementId", this.elementIdField); } if (this.elementPathFieldSet) { writer.WriteAttributeString("ElementPath", this.elementPathField); } if (this.fileFieldSet) { writer.WriteAttributeString("File", this.fileField); } if (this.nameFieldSet) { writer.WriteAttributeString("Name", this.nameField); } if (this.nodeFieldSet) { if ((this.nodeField == NodeType.element)) { writer.WriteAttributeString("Node", "element"); } if ((this.nodeField == NodeType.value)) { writer.WriteAttributeString("Node", "value"); } if ((this.nodeField == NodeType.document)) { writer.WriteAttributeString("Node", "document"); } } if (this.onFieldSet) { if ((this.onField == OnType.install)) { writer.WriteAttributeString("On", "install"); } if ((this.onField == OnType.uninstall)) { writer.WriteAttributeString("On", "uninstall"); } } if (this.preserveModifiedDateFieldSet) { if ((this.preserveModifiedDateField == YesNoType.no)) { writer.WriteAttributeString("PreserveModifiedDate", "no"); } if ((this.preserveModifiedDateField == YesNoType.yes)) { writer.WriteAttributeString("PreserveModifiedDate", "yes"); } } if (this.sequenceFieldSet) { writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); } if (this.valueFieldSet) { writer.WriteAttributeString("Value", this.valueField); } if (this.verifyPathFieldSet) { writer.WriteAttributeString("VerifyPath", this.verifyPathField); } for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) { ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); childElement.OutputXml(writer); } writer.WriteEndElement(); } [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] void ISetAttributes.SetAttribute(string name, string value) { if (String.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (("Id" == name)) { this.idField = value; this.idFieldSet = true; } if (("Action" == name)) { this.actionField = XmlConfig.ParseActionType(value); this.actionFieldSet = true; } if (("ElementId" == name)) { this.elementIdField = value; this.elementIdFieldSet = true; } if (("ElementPath" == name)) { this.elementPathField = value; this.elementPathFieldSet = true; } if (("File" == name)) { this.fileField = value; this.fileFieldSet = true; } if (("Name" == name)) { this.nameField = value; this.nameFieldSet = true; } if (("Node" == name)) { this.nodeField = XmlConfig.ParseNodeType(value); this.nodeFieldSet = true; } if (("On" == name)) { this.onField = XmlConfig.ParseOnType(value); this.onFieldSet = true; } if (("PreserveModifiedDate" == name)) { this.preserveModifiedDateField = Enums.ParseYesNoType(value); this.preserveModifiedDateFieldSet = true; } if (("Sequence" == name)) { this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); this.sequenceFieldSet = true; } if (("Value" == name)) { this.valueField = value; this.valueFieldSet = true; } if (("VerifyPath" == name)) { this.verifyPathField = value; this.verifyPathFieldSet = true; } } [GeneratedCode("XsdGen", "4.0.0.0")] public enum ActionType { IllegalValue = int.MaxValue, NotSet = -1, create, delete, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum NodeType { IllegalValue = int.MaxValue, NotSet = -1, element, value, document, } [GeneratedCode("XsdGen", "4.0.0.0")] public enum OnType { IllegalValue = int.MaxValue, NotSet = -1, install, uninstall, } } }