//------------------------------------------------------------------------------
// <auto-generated>
//     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.
// </auto-generated>
//------------------------------------------------------------------------------

#pragma warning disable 1591
namespace WixToolset.Harvesters.Serialize.VS
{
    using System;
    using System.CodeDom.Compiler;
    using System.Collections;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization;
    using System.Xml;
    using WixToolset.Harvesters.Serialize;


    /// <summary>
    /// Values of this type will either be "yes" or "no".
    /// </summary>
    [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
    {
        
        /// <summary>
        /// Parses a YesNoType from a string.
        /// </summary>
        public static YesNoType ParseYesNoType(string value)
        {
            YesNoType parsedValue;
            Enums.TryParseYesNoType(value, out parsedValue);
            return parsedValue;
        }
        
        /// <summary>
        /// Tries to parse a YesNoType from a string.
        /// </summary>
        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;
        }
    }
    
    /// <summary>
    /// Help Namespace for a help collection.  The parent file is the key for the HxC (Collection) file.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpCollection : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
    {
        
        private ElementCollection children;
        
        private string idField;
        
        private bool idFieldSet;
        
        private string descriptionField;
        
        private bool descriptionFieldSet;
        
        private string nameField;
        
        private bool nameFieldSet;
        
        private YesNoType suppressCustomActionsField;
        
        private bool suppressCustomActionsFieldSet;
        
        private ISchemaElement parentElement;
        
        public HelpCollection()
        {
            ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
            childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef)));
            childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFilterRef)));
            childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PlugCollectionInto)));
            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);
            }
        }
        
        /// <summary>
        /// Primary Key for HelpNamespace.
        /// </summary>
        public string Id
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idFieldSet = true;
                this.idField = value;
            }
        }
        
        /// <summary>
        /// Friendly name for Namespace.
        /// </summary>
        public string Description
        {
            get
            {
                return this.descriptionField;
            }
            set
            {
                this.descriptionFieldSet = true;
                this.descriptionField = value;
            }
        }
        
        /// <summary>
        /// Internal Microsoft Help ID for this Namespace.
        /// </summary>
        public string Name
        {
            get
            {
                return this.nameField;
            }
            set
            {
                this.nameFieldSet = true;
                this.nameField = value;
            }
        }
        
        /// <summary>
        /// Suppress linking Help registration custom actions.  Help redistributable merge modules will be required.  Use this when building a merge module.
        /// </summary>
        public YesNoType SuppressCustomActions
        {
            get
            {
                return this.suppressCustomActionsField;
            }
            set
            {
                this.suppressCustomActionsFieldSet = true;
                this.suppressCustomActionsField = 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 (("HelpFileRef" == childName))
            {
                childValue = new HelpFileRef();
            }
            if (("HelpFilterRef" == childName))
            {
                childValue = new HelpFilterRef();
            }
            if (("PlugCollectionInto" == childName))
            {
                childValue = new PlugCollectionInto();
            }
            if ((null == childValue))
            {
                throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
            }
            return childValue;
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpCollection", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.idFieldSet)
            {
                writer.WriteAttributeString("Id", this.idField);
            }
            if (this.descriptionFieldSet)
            {
                writer.WriteAttributeString("Description", this.descriptionField);
            }
            if (this.nameFieldSet)
            {
                writer.WriteAttributeString("Name", this.nameField);
            }
            if (this.suppressCustomActionsFieldSet)
            {
                if ((this.suppressCustomActionsField == YesNoType.no))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "no");
                }
                if ((this.suppressCustomActionsField == YesNoType.yes))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "yes");
                }
            }
            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 (("Description" == name))
            {
                this.descriptionField = value;
                this.descriptionFieldSet = true;
            }
            if (("Name" == name))
            {
                this.nameField = value;
                this.nameFieldSet = true;
            }
            if (("SuppressCustomActions" == name))
            {
                this.suppressCustomActionsField = Enums.ParseYesNoType(value);
                this.suppressCustomActionsFieldSet = true;
            }
        }
    }
    
    /// <summary>
    /// Filter for Help Namespace.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpFilter : ISchemaElement, ISetAttributes
    {
        
        private string idField;
        
        private bool idFieldSet;
        
        private string filterDefinitionField;
        
        private bool filterDefinitionFieldSet;
        
        private string nameField;
        
        private bool nameFieldSet;
        
        private YesNoType suppressCustomActionsField;
        
        private bool suppressCustomActionsFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Primary Key for HelpFilter.
        /// </summary>
        public string Id
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idFieldSet = true;
                this.idField = value;
            }
        }
        
        /// <summary>
        /// Query String for Help Filter.
        /// </summary>
        public string FilterDefinition
        {
            get
            {
                return this.filterDefinitionField;
            }
            set
            {
                this.filterDefinitionFieldSet = true;
                this.filterDefinitionField = value;
            }
        }
        
        /// <summary>
        /// Friendly name for Filter.
        /// </summary>
        public string Name
        {
            get
            {
                return this.nameField;
            }
            set
            {
                this.nameFieldSet = true;
                this.nameField = value;
            }
        }
        
        /// <summary>
        /// Suppress linking Help registration custom actions.  Help redistributable merge modules will be required.  Use this when building a merge module.
        /// </summary>
        public YesNoType SuppressCustomActions
        {
            get
            {
                return this.suppressCustomActionsField;
            }
            set
            {
                this.suppressCustomActionsFieldSet = true;
                this.suppressCustomActionsField = value;
            }
        }
        
        public virtual ISchemaElement ParentElement
        {
            get
            {
                return this.parentElement;
            }
            set
            {
                this.parentElement = value;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpFilter", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.idFieldSet)
            {
                writer.WriteAttributeString("Id", this.idField);
            }
            if (this.filterDefinitionFieldSet)
            {
                writer.WriteAttributeString("FilterDefinition", this.filterDefinitionField);
            }
            if (this.nameFieldSet)
            {
                writer.WriteAttributeString("Name", this.nameField);
            }
            if (this.suppressCustomActionsFieldSet)
            {
                if ((this.suppressCustomActionsField == YesNoType.no))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "no");
                }
                if ((this.suppressCustomActionsField == YesNoType.yes))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "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 (("FilterDefinition" == name))
            {
                this.filterDefinitionField = value;
                this.filterDefinitionFieldSet = true;
            }
            if (("Name" == name))
            {
                this.nameField = value;
                this.nameFieldSet = true;
            }
            if (("SuppressCustomActions" == name))
            {
                this.suppressCustomActionsField = Enums.ParseYesNoType(value);
                this.suppressCustomActionsFieldSet = true;
            }
        }
    }
    
    /// <summary>
    /// File for Help Namespace.  The parent file is the key for HxS (Title) file.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpFile : ISchemaElement, ISetAttributes
    {
        
        private string idField;
        
        private bool idFieldSet;
        
        private string attributeIndexField;
        
        private bool attributeIndexFieldSet;
        
        private string indexField;
        
        private bool indexFieldSet;
        
        private int languageField;
        
        private bool languageFieldSet;
        
        private string nameField;
        
        private bool nameFieldSet;
        
        private string sampleLocationField;
        
        private bool sampleLocationFieldSet;
        
        private string searchField;
        
        private bool searchFieldSet;
        
        private YesNoType suppressCustomActionsField;
        
        private bool suppressCustomActionsFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Primary Key for HelpFile Table.
        /// </summary>
        public string Id
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idFieldSet = true;
                this.idField = value;
            }
        }
        
        /// <summary>
        /// Key for HxR (Attributes) file.
        /// </summary>
        public string AttributeIndex
        {
            get
            {
                return this.attributeIndexField;
            }
            set
            {
                this.attributeIndexFieldSet = true;
                this.attributeIndexField = value;
            }
        }
        
        /// <summary>
        /// Key for HxI (Index) file.
        /// </summary>
        public string Index
        {
            get
            {
                return this.indexField;
            }
            set
            {
                this.indexFieldSet = true;
                this.indexField = value;
            }
        }
        
        /// <summary>
        /// Language ID for content file.
        /// </summary>
        public int Language
        {
            get
            {
                return this.languageField;
            }
            set
            {
                this.languageFieldSet = true;
                this.languageField = value;
            }
        }
        
        /// <summary>
        /// Internal Microsoft Help ID for this HelpFile.
        /// </summary>
        public string Name
        {
            get
            {
                return this.nameField;
            }
            set
            {
                this.nameFieldSet = true;
                this.nameField = value;
            }
        }
        
        /// <summary>
        /// Key for a file that is in the "root" of the samples directory for this HelpFile.
        /// </summary>
        public string SampleLocation
        {
            get
            {
                return this.sampleLocationField;
            }
            set
            {
                this.sampleLocationFieldSet = true;
                this.sampleLocationField = value;
            }
        }
        
        /// <summary>
        /// Key for HxQ (Query) file.
        /// </summary>
        public string Search
        {
            get
            {
                return this.searchField;
            }
            set
            {
                this.searchFieldSet = true;
                this.searchField = value;
            }
        }
        
        /// <summary>
        /// Suppress linking Help registration custom actions.  Help redistributable merge modules will be required.  Use this when building a merge module.
        /// </summary>
        public YesNoType SuppressCustomActions
        {
            get
            {
                return this.suppressCustomActionsField;
            }
            set
            {
                this.suppressCustomActionsFieldSet = true;
                this.suppressCustomActionsField = value;
            }
        }
        
        public virtual ISchemaElement ParentElement
        {
            get
            {
                return this.parentElement;
            }
            set
            {
                this.parentElement = value;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpFile", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.idFieldSet)
            {
                writer.WriteAttributeString("Id", this.idField);
            }
            if (this.attributeIndexFieldSet)
            {
                writer.WriteAttributeString("AttributeIndex", this.attributeIndexField);
            }
            if (this.indexFieldSet)
            {
                writer.WriteAttributeString("Index", this.indexField);
            }
            if (this.languageFieldSet)
            {
                writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture));
            }
            if (this.nameFieldSet)
            {
                writer.WriteAttributeString("Name", this.nameField);
            }
            if (this.sampleLocationFieldSet)
            {
                writer.WriteAttributeString("SampleLocation", this.sampleLocationField);
            }
            if (this.searchFieldSet)
            {
                writer.WriteAttributeString("Search", this.searchField);
            }
            if (this.suppressCustomActionsFieldSet)
            {
                if ((this.suppressCustomActionsField == YesNoType.no))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "no");
                }
                if ((this.suppressCustomActionsField == YesNoType.yes))
                {
                    writer.WriteAttributeString("SuppressCustomActions", "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 (("AttributeIndex" == name))
            {
                this.attributeIndexField = value;
                this.attributeIndexFieldSet = true;
            }
            if (("Index" == name))
            {
                this.indexField = value;
                this.indexFieldSet = true;
            }
            if (("Language" == name))
            {
                this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
                this.languageFieldSet = true;
            }
            if (("Name" == name))
            {
                this.nameField = value;
                this.nameFieldSet = true;
            }
            if (("SampleLocation" == name))
            {
                this.sampleLocationField = value;
                this.sampleLocationFieldSet = true;
            }
            if (("Search" == name))
            {
                this.searchField = value;
                this.searchFieldSet = true;
            }
            if (("SuppressCustomActions" == name))
            {
                this.suppressCustomActionsField = Enums.ParseYesNoType(value);
                this.suppressCustomActionsFieldSet = true;
            }
        }
    }
    
    /// <summary>
    /// Plugin for Help Namespace.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class PlugCollectionInto : ISchemaElement, ISetAttributes
    {
        
        private string attributesField;
        
        private bool attributesFieldSet;
        
        private string tableOfContentsField;
        
        private bool tableOfContentsFieldSet;
        
        private string targetCollectionField;
        
        private bool targetCollectionFieldSet;
        
        private string targetTableOfContentsField;
        
        private bool targetTableOfContentsFieldSet;
        
        private string targetFeatureField;
        
        private bool targetFeatureFieldSet;
        
        private YesNoType suppressExternalNamespacesField;
        
        private bool suppressExternalNamespacesFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Key for HxA (Attributes) file of child namespace.
        /// </summary>
        public string Attributes
        {
            get
            {
                return this.attributesField;
            }
            set
            {
                this.attributesFieldSet = true;
                this.attributesField = value;
            }
        }
        
        /// <summary>
        /// Key for HxT  file of child namespace.
        /// </summary>
        public string TableOfContents
        {
            get
            {
                return this.tableOfContentsField;
            }
            set
            {
                this.tableOfContentsFieldSet = true;
                this.tableOfContentsField = value;
            }
        }
        
        /// <summary>
        /// Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted.
        /// The following special keys can be used to plug into external namespaces defined outside of the installer.
        /// MS_VSIPCC_v80 : Visual Studio 2005
        /// MS.VSIPCC.v90 : Visual Studio 2008
        /// </summary>
        public string TargetCollection
        {
            get
            {
                return this.targetCollectionField;
            }
            set
            {
                this.targetCollectionFieldSet = true;
                this.targetCollectionField = value;
            }
        }
        
        /// <summary>
        /// Key for HxT  file of parent namespace that now includes the new child namespace.
        /// </summary>
        public string TargetTableOfContents
        {
            get
            {
                return this.targetTableOfContentsField;
            }
            set
            {
                this.targetTableOfContentsFieldSet = true;
                this.targetTableOfContentsField = value;
            }
        }
        
        /// <summary>
        /// Key for the feature parent of this help collection.  Required only when plugging into external namespaces.
        /// </summary>
        public string TargetFeature
        {
            get
            {
                return this.targetFeatureField;
            }
            set
            {
                this.targetFeatureFieldSet = true;
                this.targetFeatureField = value;
            }
        }
        
        /// <summary>
        /// Suppress linking Visual Studio Help namespaces.  Help redistributable merge modules will be required.  Use this when building a merge module.
        /// </summary>
        public YesNoType SuppressExternalNamespaces
        {
            get
            {
                return this.suppressExternalNamespacesField;
            }
            set
            {
                this.suppressExternalNamespacesFieldSet = true;
                this.suppressExternalNamespacesField = value;
            }
        }
        
        public virtual ISchemaElement ParentElement
        {
            get
            {
                return this.parentElement;
            }
            set
            {
                this.parentElement = value;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("PlugCollectionInto", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.attributesFieldSet)
            {
                writer.WriteAttributeString("Attributes", this.attributesField);
            }
            if (this.tableOfContentsFieldSet)
            {
                writer.WriteAttributeString("TableOfContents", this.tableOfContentsField);
            }
            if (this.targetCollectionFieldSet)
            {
                writer.WriteAttributeString("TargetCollection", this.targetCollectionField);
            }
            if (this.targetTableOfContentsFieldSet)
            {
                writer.WriteAttributeString("TargetTableOfContents", this.targetTableOfContentsField);
            }
            if (this.targetFeatureFieldSet)
            {
                writer.WriteAttributeString("TargetFeature", this.targetFeatureField);
            }
            if (this.suppressExternalNamespacesFieldSet)
            {
                if ((this.suppressExternalNamespacesField == YesNoType.no))
                {
                    writer.WriteAttributeString("SuppressExternalNamespaces", "no");
                }
                if ((this.suppressExternalNamespacesField == YesNoType.yes))
                {
                    writer.WriteAttributeString("SuppressExternalNamespaces", "yes");
                }
            }
            writer.WriteEndElement();
        }
        
        [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        void ISetAttributes.SetAttribute(string name, string value)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }
            if (("Attributes" == name))
            {
                this.attributesField = value;
                this.attributesFieldSet = true;
            }
            if (("TableOfContents" == name))
            {
                this.tableOfContentsField = value;
                this.tableOfContentsFieldSet = true;
            }
            if (("TargetCollection" == name))
            {
                this.targetCollectionField = value;
                this.targetCollectionFieldSet = true;
            }
            if (("TargetTableOfContents" == name))
            {
                this.targetTableOfContentsField = value;
                this.targetTableOfContentsFieldSet = true;
            }
            if (("TargetFeature" == name))
            {
                this.targetFeatureField = value;
                this.targetFeatureFieldSet = true;
            }
            if (("SuppressExternalNamespaces" == name))
            {
                this.suppressExternalNamespacesField = Enums.ParseYesNoType(value);
                this.suppressExternalNamespacesFieldSet = true;
            }
        }
    }
    
    /// <summary>
    /// Create a reference to a HelpFile element in another Fragment.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpFileRef : ISchemaElement, ISetAttributes
    {
        
        private string idField;
        
        private bool idFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Primary Key for HelpFile Table.
        /// </summary>
        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;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpFileRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
            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;
            }
        }
    }
    
    /// <summary>
    /// Create a reference to a HelpFile element in another Fragment.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpFilterRef : ISchemaElement, ISetAttributes
    {
        
        private string idField;
        
        private bool idFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Primary Key for HelpFilter.
        /// </summary>
        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;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpFilterRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
            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;
            }
        }
    }
    
    /// <summary>
    /// Create a reference to a HelpCollection element in another Fragment.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class HelpCollectionRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
    {
        
        private ElementCollection children;
        
        private string idField;
        
        private bool idFieldSet;
        
        private ISchemaElement parentElement;
        
        public HelpCollectionRef()
        {
            ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
            childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef)));
            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);
            }
        }
        
        /// <summary>
        /// Primary Key for HelpNamespace Table.
        /// </summary>
        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;
            }
        }
        
        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 (("HelpFileRef" == childName))
            {
                childValue = new HelpFileRef();
            }
            if ((null == childValue))
            {
                throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
            }
            return childValue;
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("HelpCollectionRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.idFieldSet)
            {
                writer.WriteAttributeString("Id", this.idField);
            }
            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;
            }
        }
    }
    
    /// <summary>
    /// This element provides the metdata required to install/uninstall a file as
    /// a VSIX Package. The VSIX package file will be installed as part of the MSI
    /// then passed to the VSIX installer to install the VSIX package. To avoid the
    /// duplication, simply use the MSI to install the VSIX package itself.
    /// </summary>
    [GeneratedCode("XsdGen", "4.0.0.0")]
    public class VsixPackage : ISchemaElement, ISetAttributes
    {
        
        private string fileField;
        
        private bool fileFieldSet;
        
        private string packageIdField;
        
        private bool packageIdFieldSet;
        
        private YesNoType permanentField;
        
        private bool permanentFieldSet;
        
        private string targetField;
        
        private bool targetFieldSet;
        
        private string targetVersionField;
        
        private bool targetVersionFieldSet;
        
        private YesNoType vitalField;
        
        private bool vitalFieldSet;
        
        private string vsixInstallerPathPropertyField;
        
        private bool vsixInstallerPathPropertyFieldSet;
        
        private ISchemaElement parentElement;
        
        /// <summary>
        /// Reference to file identifer. This attribute is required when the element is not a
        /// child of a File element and is invalid when the element is a child of the File element.
        /// </summary>
        public string File
        {
            get
            {
                return this.fileField;
            }
            set
            {
                this.fileFieldSet = true;
                this.fileField = value;
            }
        }
        
        /// <summary>
        /// Identity of the VSIX package per its internal manifest. If this value is not correct
        /// the VSIX package will not correctly uninstall.
        /// </summary>
        public string PackageId
        {
            get
            {
                return this.packageIdField;
            }
            set
            {
                this.packageIdFieldSet = true;
                this.packageIdField = value;
            }
        }
        
        /// <summary>
        /// Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled.
        /// The default is 'no'.
        /// </summary>
        public YesNoType Permanent
        {
            get
            {
                return this.permanentField;
            }
            set
            {
                this.permanentFieldSet = true;
                this.permanentField = value;
            }
        }
        
        /// <summary>
        /// Specifies the SKU of Visual Studio in which to register the extension. If no target
        /// is specified the extension is registered with all installed SKUs. If the Target
        /// attribute is specified the TargetVersion attribute must also be specified. The
        /// following is a list of known Visual Studio targets: integratedShell, professional,
        /// premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress
        /// </summary>
        public string Target
        {
            get
            {
                return this.targetField;
            }
            set
            {
                this.targetFieldSet = true;
                this.targetField = value;
            }
        }
        
        /// <summary>
        /// Specifies the version of Visual Studio in which to register the extension. This attribute
        /// is required if the Target attribute is specified.
        /// </summary>
        public string TargetVersion
        {
            get
            {
                return this.targetVersionField;
            }
            set
            {
                this.targetVersionFieldSet = true;
                this.targetVersionField = value;
            }
        }
        
        /// <summary>
        /// Indicates whether failure to install the VSIX package causes the installation to rollback.
        /// The default is 'yes'.
        /// </summary>
        public YesNoType Vital
        {
            get
            {
                return this.vitalField;
            }
            set
            {
                this.vitalFieldSet = true;
                this.vitalField = value;
            }
        }
        
        /// <summary>
        /// Optional reference to a Property element that contains the path to the VsixInstaller.exe.
        /// By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX
        /// package. It is highly recommended that this attribute is *not* used.
        /// </summary>
        public string VsixInstallerPathProperty
        {
            get
            {
                return this.vsixInstallerPathPropertyField;
            }
            set
            {
                this.vsixInstallerPathPropertyFieldSet = true;
                this.vsixInstallerPathPropertyField = value;
            }
        }
        
        public virtual ISchemaElement ParentElement
        {
            get
            {
                return this.parentElement;
            }
            set
            {
                this.parentElement = value;
            }
        }
        
        /// <summary>
        /// Processes this element and all child elements into an XmlWriter.
        /// </summary>
        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
        public virtual void OutputXml(XmlWriter writer)
        {
            if ((null == writer))
            {
                throw new ArgumentNullException("writer");
            }
            writer.WriteStartElement("VsixPackage", "http://wixtoolset.org/schemas/v4/wxs/vs");
            if (this.fileFieldSet)
            {
                writer.WriteAttributeString("File", this.fileField);
            }
            if (this.packageIdFieldSet)
            {
                writer.WriteAttributeString("PackageId", this.packageIdField);
            }
            if (this.permanentFieldSet)
            {
                if ((this.permanentField == YesNoType.no))
                {
                    writer.WriteAttributeString("Permanent", "no");
                }
                if ((this.permanentField == YesNoType.yes))
                {
                    writer.WriteAttributeString("Permanent", "yes");
                }
            }
            if (this.targetFieldSet)
            {
                writer.WriteAttributeString("Target", this.targetField);
            }
            if (this.targetVersionFieldSet)
            {
                writer.WriteAttributeString("TargetVersion", this.targetVersionField);
            }
            if (this.vitalFieldSet)
            {
                if ((this.vitalField == YesNoType.no))
                {
                    writer.WriteAttributeString("Vital", "no");
                }
                if ((this.vitalField == YesNoType.yes))
                {
                    writer.WriteAttributeString("Vital", "yes");
                }
            }
            if (this.vsixInstallerPathPropertyFieldSet)
            {
                writer.WriteAttributeString("VsixInstallerPathProperty", this.vsixInstallerPathPropertyField);
            }
            writer.WriteEndElement();
        }
        
        [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        void ISetAttributes.SetAttribute(string name, string value)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }
            if (("File" == name))
            {
                this.fileField = value;
                this.fileFieldSet = true;
            }
            if (("PackageId" == name))
            {
                this.packageIdField = value;
                this.packageIdFieldSet = true;
            }
            if (("Permanent" == name))
            {
                this.permanentField = Enums.ParseYesNoType(value);
                this.permanentFieldSet = true;
            }
            if (("Target" == name))
            {
                this.targetField = value;
                this.targetFieldSet = true;
            }
            if (("TargetVersion" == name))
            {
                this.targetVersionField = value;
                this.targetVersionFieldSet = true;
            }
            if (("Vital" == name))
            {
                this.vitalField = Enums.ParseYesNoType(value);
                this.vitalFieldSet = true;
            }
            if (("VsixInstallerPathProperty" == name))
            {
                this.vsixInstallerPathPropertyField = value;
                this.vsixInstallerPathPropertyFieldSet = true;
            }
        }
    }
}