//------------------------------------------------------------------------------
//
// 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.IIs
{
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 YesNoDefaultType from a string.
///
public static YesNoDefaultType ParseYesNoDefaultType(string value)
{
YesNoDefaultType parsedValue;
Enums.TryParseYesNoDefaultType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a YesNoDefaultType from a string.
///
public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue)
{
parsedValue = YesNoDefaultType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("default" == value))
{
parsedValue = YesNoDefaultType.@default;
}
else
{
if (("no" == value))
{
parsedValue = YesNoDefaultType.no;
}
else
{
if (("yes" == value))
{
parsedValue = YesNoDefaultType.yes;
}
else
{
parsedValue = YesNoDefaultType.IllegalValue;
return false;
}
}
}
return true;
}
}
///
/// Values of this type will either be "default", "yes", or "no".
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum YesNoDefaultType
{
IllegalValue = int.MaxValue,
NotSet = -1,
@default,
no,
yes,
}
///
/// WebDirProperties used by one or more WebSites. Lists properties common to IIS web sites and vroots. Corresponding properties can be viewed through the IIS Manager snap-in. One property entry can be reused by multiple sites or vroots using the Id field as a reference, using WebVirtualDir.DirProperties, WebSite.DirProperties, or WebDir.DirProperties.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebDirProperties : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private YesNoType readField;
private bool readFieldSet;
private YesNoType writeField;
private bool writeFieldSet;
private YesNoType scriptField;
private bool scriptFieldSet;
private YesNoType executeField;
private bool executeFieldSet;
private YesNoType anonymousAccessField;
private bool anonymousAccessFieldSet;
private string anonymousUserField;
private bool anonymousUserFieldSet;
private YesNoType iIsControlledPasswordField;
private bool iIsControlledPasswordFieldSet;
private YesNoType windowsAuthenticationField;
private bool windowsAuthenticationFieldSet;
private YesNoType digestAuthenticationField;
private bool digestAuthenticationFieldSet;
private YesNoType basicAuthenticationField;
private bool basicAuthenticationFieldSet;
private YesNoType passportAuthenticationField;
private bool passportAuthenticationFieldSet;
private YesNoType logVisitsField;
private bool logVisitsFieldSet;
private YesNoType indexField;
private bool indexFieldSet;
private string defaultDocumentsField;
private bool defaultDocumentsFieldSet;
private YesNoType aspDetailedErrorField;
private bool aspDetailedErrorFieldSet;
private string httpExpiresField;
private bool httpExpiresFieldSet;
private long cacheControlMaxAgeField;
private bool cacheControlMaxAgeFieldSet;
private string cacheControlCustomField;
private bool cacheControlCustomFieldSet;
private YesNoType clearCustomErrorField;
private bool clearCustomErrorFieldSet;
private YesNoType accessSSLField;
private bool accessSSLFieldSet;
private YesNoType accessSSL128Field;
private bool accessSSL128FieldSet;
private YesNoType accessSSLMapCertField;
private bool accessSSLMapCertFieldSet;
private YesNoType accessSSLNegotiateCertField;
private bool accessSSLNegotiateCertFieldSet;
private YesNoType accessSSLRequireCertField;
private bool accessSSLRequireCertFieldSet;
private string authenticationProvidersField;
private bool authenticationProvidersFieldSet;
private ISchemaElement parentElement;
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
public YesNoType Read
{
get
{
return this.readField;
}
set
{
this.readFieldSet = true;
this.readField = value;
}
}
public YesNoType Write
{
get
{
return this.writeField;
}
set
{
this.writeFieldSet = true;
this.writeField = value;
}
}
public YesNoType Script
{
get
{
return this.scriptField;
}
set
{
this.scriptFieldSet = true;
this.scriptField = value;
}
}
public YesNoType Execute
{
get
{
return this.executeField;
}
set
{
this.executeFieldSet = true;
this.executeField = value;
}
}
///
/// Sets the Enable Anonymous Access checkbox, which maps anonymous users to a Windows user account. When setting this to 'yes' you should also provide the user account using the AnonymousUser attribute, and determine what setting to use for the IIsControlledPassword attribute. Defaults to 'no.'
///
public YesNoType AnonymousAccess
{
get
{
return this.anonymousAccessField;
}
set
{
this.anonymousAccessFieldSet = true;
this.anonymousAccessField = value;
}
}
///
/// Reference to the Id attribute on the User element to be used as the anonymous user for the directory. See the User element for more information.
///
public string AnonymousUser
{
get
{
return this.anonymousUserField;
}
set
{
this.anonymousUserFieldSet = true;
this.anonymousUserField = value;
}
}
///
/// Sets whether IIS should control the password used for the Windows account specified in the AnonymousUser attribute. Defaults to 'no.'
///
public YesNoType IIsControlledPassword
{
get
{
return this.iIsControlledPasswordField;
}
set
{
this.iIsControlledPasswordFieldSet = true;
this.iIsControlledPasswordField = value;
}
}
///
/// Sets the Windows Authentication option, which enables integrated Windows authentication to be used on the site. Defaults to 'no.'
///
public YesNoType WindowsAuthentication
{
get
{
return this.windowsAuthenticationField;
}
set
{
this.windowsAuthenticationFieldSet = true;
this.windowsAuthenticationField = value;
}
}
///
/// Sets the Digest Authentication option, which allows using digest authentication with domain user accounts. Defaults to 'no.'
///
public YesNoType DigestAuthentication
{
get
{
return this.digestAuthenticationField;
}
set
{
this.digestAuthenticationFieldSet = true;
this.digestAuthenticationField = value;
}
}
///
/// Sets the Basic Authentication option, which allows clients to provide credentials in plaintext over the wire. Defaults to 'no.'
///
public YesNoType BasicAuthentication
{
get
{
return this.basicAuthenticationField;
}
set
{
this.basicAuthenticationFieldSet = true;
this.basicAuthenticationField = value;
}
}
///
/// Sets the Passport Authentication option, which allows clients to provide credentials via a .Net Passport account. Defaults to 'no.'
///
public YesNoType PassportAuthentication
{
get
{
return this.passportAuthenticationField;
}
set
{
this.passportAuthenticationFieldSet = true;
this.passportAuthenticationField = value;
}
}
///
/// Sets whether visits to this site should be logged. Defaults to 'no.'
///
public YesNoType LogVisits
{
get
{
return this.logVisitsField;
}
set
{
this.logVisitsFieldSet = true;
this.logVisitsField = value;
}
}
///
/// Sets the Index Resource option, which specifies whether this web directory should be indexed. Defaults to 'no.'
///
public YesNoType Index
{
get
{
return this.indexField;
}
set
{
this.indexFieldSet = true;
this.indexField = value;
}
}
///
/// The list of default documents to set for this web directory, in comma-delimited format.
///
public string DefaultDocuments
{
get
{
return this.defaultDocumentsField;
}
set
{
this.defaultDocumentsFieldSet = true;
this.defaultDocumentsField = value;
}
}
///
/// Sets the option for whether to send detailed ASP errors back to the client on script error. Default is 'no.'
///
public YesNoType AspDetailedError
{
get
{
return this.aspDetailedErrorField;
}
set
{
this.aspDetailedErrorFieldSet = true;
this.aspDetailedErrorField = value;
}
}
///
/// Value to set the HttpExpires attribute to for a Web Dir in the metabase.
///
public string HttpExpires
{
get
{
return this.httpExpiresField;
}
set
{
this.httpExpiresFieldSet = true;
this.httpExpiresField = value;
}
}
///
/// Integer value specifying the cache control maximum age value.
///
public long CacheControlMaxAge
{
get
{
return this.cacheControlMaxAgeField;
}
set
{
this.cacheControlMaxAgeFieldSet = true;
this.cacheControlMaxAgeField = value;
}
}
///
/// Custom HTTP 1.1 cache control directives.
///
public string CacheControlCustom
{
get
{
return this.cacheControlCustomField;
}
set
{
this.cacheControlCustomFieldSet = true;
this.cacheControlCustomField = value;
}
}
///
/// Specifies whether IIs will return custom errors for this directory.
///
public YesNoType ClearCustomError
{
get
{
return this.clearCustomErrorField;
}
set
{
this.clearCustomErrorFieldSet = true;
this.clearCustomErrorField = value;
}
}
///
/// A value of true indicates that file access requires SSL file permission processing, with or without a client certificate. This corresponds to AccessSSL flag for AccessSSLFlags IIS metabase property.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType AccessSSL
{
get
{
return this.accessSSLField;
}
set
{
this.accessSSLFieldSet = true;
this.accessSSLField = value;
}
}
///
/// A value of true indicates that file access requires SSL file permission processing with a minimum key size of 128 bits, with or without a client certificate. This corresponds to AccessSSL128 flag for AccessSSLFlags IIS metabase property.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType AccessSSL128
{
get
{
return this.accessSSL128Field;
}
set
{
this.accessSSL128FieldSet = true;
this.accessSSL128Field = value;
}
}
///
/// This corresponds to AccessSSLMapCert flag for AccessSSLFlags IIS metabase property.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType AccessSSLMapCert
{
get
{
return this.accessSSLMapCertField;
}
set
{
this.accessSSLMapCertFieldSet = true;
this.accessSSLMapCertField = value;
}
}
///
/// This corresponds to AccessSSLNegotiateCert flag for AccessSSLFlags IIS metabase property.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType AccessSSLNegotiateCert
{
get
{
return this.accessSSLNegotiateCertField;
}
set
{
this.accessSSLNegotiateCertFieldSet = true;
this.accessSSLNegotiateCertField = value;
}
}
///
/// This corresponds to AccessSSLRequireCert flag for AccessSSLFlags IIS metabase property.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType AccessSSLRequireCert
{
get
{
return this.accessSSLRequireCertField;
}
set
{
this.accessSSLRequireCertFieldSet = true;
this.accessSSLRequireCertField = value;
}
}
///
/// Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others.
///
public string AuthenticationProviders
{
get
{
return this.authenticationProvidersField;
}
set
{
this.authenticationProvidersFieldSet = true;
this.authenticationProvidersField = 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("WebDirProperties", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.readFieldSet)
{
if ((this.readField == YesNoType.no))
{
writer.WriteAttributeString("Read", "no");
}
if ((this.readField == YesNoType.yes))
{
writer.WriteAttributeString("Read", "yes");
}
}
if (this.writeFieldSet)
{
if ((this.writeField == YesNoType.no))
{
writer.WriteAttributeString("Write", "no");
}
if ((this.writeField == YesNoType.yes))
{
writer.WriteAttributeString("Write", "yes");
}
}
if (this.scriptFieldSet)
{
if ((this.scriptField == YesNoType.no))
{
writer.WriteAttributeString("Script", "no");
}
if ((this.scriptField == YesNoType.yes))
{
writer.WriteAttributeString("Script", "yes");
}
}
if (this.executeFieldSet)
{
if ((this.executeField == YesNoType.no))
{
writer.WriteAttributeString("Execute", "no");
}
if ((this.executeField == YesNoType.yes))
{
writer.WriteAttributeString("Execute", "yes");
}
}
if (this.anonymousAccessFieldSet)
{
if ((this.anonymousAccessField == YesNoType.no))
{
writer.WriteAttributeString("AnonymousAccess", "no");
}
if ((this.anonymousAccessField == YesNoType.yes))
{
writer.WriteAttributeString("AnonymousAccess", "yes");
}
}
if (this.anonymousUserFieldSet)
{
writer.WriteAttributeString("AnonymousUser", this.anonymousUserField);
}
if (this.iIsControlledPasswordFieldSet)
{
if ((this.iIsControlledPasswordField == YesNoType.no))
{
writer.WriteAttributeString("IIsControlledPassword", "no");
}
if ((this.iIsControlledPasswordField == YesNoType.yes))
{
writer.WriteAttributeString("IIsControlledPassword", "yes");
}
}
if (this.windowsAuthenticationFieldSet)
{
if ((this.windowsAuthenticationField == YesNoType.no))
{
writer.WriteAttributeString("WindowsAuthentication", "no");
}
if ((this.windowsAuthenticationField == YesNoType.yes))
{
writer.WriteAttributeString("WindowsAuthentication", "yes");
}
}
if (this.digestAuthenticationFieldSet)
{
if ((this.digestAuthenticationField == YesNoType.no))
{
writer.WriteAttributeString("DigestAuthentication", "no");
}
if ((this.digestAuthenticationField == YesNoType.yes))
{
writer.WriteAttributeString("DigestAuthentication", "yes");
}
}
if (this.basicAuthenticationFieldSet)
{
if ((this.basicAuthenticationField == YesNoType.no))
{
writer.WriteAttributeString("BasicAuthentication", "no");
}
if ((this.basicAuthenticationField == YesNoType.yes))
{
writer.WriteAttributeString("BasicAuthentication", "yes");
}
}
if (this.passportAuthenticationFieldSet)
{
if ((this.passportAuthenticationField == YesNoType.no))
{
writer.WriteAttributeString("PassportAuthentication", "no");
}
if ((this.passportAuthenticationField == YesNoType.yes))
{
writer.WriteAttributeString("PassportAuthentication", "yes");
}
}
if (this.logVisitsFieldSet)
{
if ((this.logVisitsField == YesNoType.no))
{
writer.WriteAttributeString("LogVisits", "no");
}
if ((this.logVisitsField == YesNoType.yes))
{
writer.WriteAttributeString("LogVisits", "yes");
}
}
if (this.indexFieldSet)
{
if ((this.indexField == YesNoType.no))
{
writer.WriteAttributeString("Index", "no");
}
if ((this.indexField == YesNoType.yes))
{
writer.WriteAttributeString("Index", "yes");
}
}
if (this.defaultDocumentsFieldSet)
{
writer.WriteAttributeString("DefaultDocuments", this.defaultDocumentsField);
}
if (this.aspDetailedErrorFieldSet)
{
if ((this.aspDetailedErrorField == YesNoType.no))
{
writer.WriteAttributeString("AspDetailedError", "no");
}
if ((this.aspDetailedErrorField == YesNoType.yes))
{
writer.WriteAttributeString("AspDetailedError", "yes");
}
}
if (this.httpExpiresFieldSet)
{
writer.WriteAttributeString("HttpExpires", this.httpExpiresField);
}
if (this.cacheControlMaxAgeFieldSet)
{
writer.WriteAttributeString("CacheControlMaxAge", this.cacheControlMaxAgeField.ToString(CultureInfo.InvariantCulture));
}
if (this.cacheControlCustomFieldSet)
{
writer.WriteAttributeString("CacheControlCustom", this.cacheControlCustomField);
}
if (this.clearCustomErrorFieldSet)
{
if ((this.clearCustomErrorField == YesNoType.no))
{
writer.WriteAttributeString("ClearCustomError", "no");
}
if ((this.clearCustomErrorField == YesNoType.yes))
{
writer.WriteAttributeString("ClearCustomError", "yes");
}
}
if (this.accessSSLFieldSet)
{
if ((this.accessSSLField == YesNoType.no))
{
writer.WriteAttributeString("AccessSSL", "no");
}
if ((this.accessSSLField == YesNoType.yes))
{
writer.WriteAttributeString("AccessSSL", "yes");
}
}
if (this.accessSSL128FieldSet)
{
if ((this.accessSSL128Field == YesNoType.no))
{
writer.WriteAttributeString("AccessSSL128", "no");
}
if ((this.accessSSL128Field == YesNoType.yes))
{
writer.WriteAttributeString("AccessSSL128", "yes");
}
}
if (this.accessSSLMapCertFieldSet)
{
if ((this.accessSSLMapCertField == YesNoType.no))
{
writer.WriteAttributeString("AccessSSLMapCert", "no");
}
if ((this.accessSSLMapCertField == YesNoType.yes))
{
writer.WriteAttributeString("AccessSSLMapCert", "yes");
}
}
if (this.accessSSLNegotiateCertFieldSet)
{
if ((this.accessSSLNegotiateCertField == YesNoType.no))
{
writer.WriteAttributeString("AccessSSLNegotiateCert", "no");
}
if ((this.accessSSLNegotiateCertField == YesNoType.yes))
{
writer.WriteAttributeString("AccessSSLNegotiateCert", "yes");
}
}
if (this.accessSSLRequireCertFieldSet)
{
if ((this.accessSSLRequireCertField == YesNoType.no))
{
writer.WriteAttributeString("AccessSSLRequireCert", "no");
}
if ((this.accessSSLRequireCertField == YesNoType.yes))
{
writer.WriteAttributeString("AccessSSLRequireCert", "yes");
}
}
if (this.authenticationProvidersFieldSet)
{
writer.WriteAttributeString("AuthenticationProviders", this.authenticationProvidersField);
}
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 (("Read" == name))
{
this.readField = Enums.ParseYesNoType(value);
this.readFieldSet = true;
}
if (("Write" == name))
{
this.writeField = Enums.ParseYesNoType(value);
this.writeFieldSet = true;
}
if (("Script" == name))
{
this.scriptField = Enums.ParseYesNoType(value);
this.scriptFieldSet = true;
}
if (("Execute" == name))
{
this.executeField = Enums.ParseYesNoType(value);
this.executeFieldSet = true;
}
if (("AnonymousAccess" == name))
{
this.anonymousAccessField = Enums.ParseYesNoType(value);
this.anonymousAccessFieldSet = true;
}
if (("AnonymousUser" == name))
{
this.anonymousUserField = value;
this.anonymousUserFieldSet = true;
}
if (("IIsControlledPassword" == name))
{
this.iIsControlledPasswordField = Enums.ParseYesNoType(value);
this.iIsControlledPasswordFieldSet = true;
}
if (("WindowsAuthentication" == name))
{
this.windowsAuthenticationField = Enums.ParseYesNoType(value);
this.windowsAuthenticationFieldSet = true;
}
if (("DigestAuthentication" == name))
{
this.digestAuthenticationField = Enums.ParseYesNoType(value);
this.digestAuthenticationFieldSet = true;
}
if (("BasicAuthentication" == name))
{
this.basicAuthenticationField = Enums.ParseYesNoType(value);
this.basicAuthenticationFieldSet = true;
}
if (("PassportAuthentication" == name))
{
this.passportAuthenticationField = Enums.ParseYesNoType(value);
this.passportAuthenticationFieldSet = true;
}
if (("LogVisits" == name))
{
this.logVisitsField = Enums.ParseYesNoType(value);
this.logVisitsFieldSet = true;
}
if (("Index" == name))
{
this.indexField = Enums.ParseYesNoType(value);
this.indexFieldSet = true;
}
if (("DefaultDocuments" == name))
{
this.defaultDocumentsField = value;
this.defaultDocumentsFieldSet = true;
}
if (("AspDetailedError" == name))
{
this.aspDetailedErrorField = Enums.ParseYesNoType(value);
this.aspDetailedErrorFieldSet = true;
}
if (("HttpExpires" == name))
{
this.httpExpiresField = value;
this.httpExpiresFieldSet = true;
}
if (("CacheControlMaxAge" == name))
{
this.cacheControlMaxAgeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.cacheControlMaxAgeFieldSet = true;
}
if (("CacheControlCustom" == name))
{
this.cacheControlCustomField = value;
this.cacheControlCustomFieldSet = true;
}
if (("ClearCustomError" == name))
{
this.clearCustomErrorField = Enums.ParseYesNoType(value);
this.clearCustomErrorFieldSet = true;
}
if (("AccessSSL" == name))
{
this.accessSSLField = Enums.ParseYesNoType(value);
this.accessSSLFieldSet = true;
}
if (("AccessSSL128" == name))
{
this.accessSSL128Field = Enums.ParseYesNoType(value);
this.accessSSL128FieldSet = true;
}
if (("AccessSSLMapCert" == name))
{
this.accessSSLMapCertField = Enums.ParseYesNoType(value);
this.accessSSLMapCertFieldSet = true;
}
if (("AccessSSLNegotiateCert" == name))
{
this.accessSSLNegotiateCertField = Enums.ParseYesNoType(value);
this.accessSSLNegotiateCertFieldSet = true;
}
if (("AccessSSLRequireCert" == name))
{
this.accessSSLRequireCertField = Enums.ParseYesNoType(value);
this.accessSSLRequireCertFieldSet = true;
}
if (("AuthenticationProviders" == name))
{
this.authenticationProvidersField = value;
this.authenticationProvidersFieldSet = true;
}
}
}
///
/// Custom Web Errors used by WebSites and Virtual Directories.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebError : ISchemaElement, ISetAttributes
{
private int errorCodeField;
private bool errorCodeFieldSet;
private int subCodeField;
private bool subCodeFieldSet;
private string fileField;
private bool fileFieldSet;
private string uRLField;
private bool uRLFieldSet;
private ISchemaElement parentElement;
///
/// HTTP 1.1 error code.
///
public int ErrorCode
{
get
{
return this.errorCodeField;
}
set
{
this.errorCodeFieldSet = true;
this.errorCodeField = value;
}
}
///
/// Error sub code. Set to 0 to get the wild card "*".
///
public int SubCode
{
get
{
return this.subCodeField;
}
set
{
this.subCodeFieldSet = true;
this.subCodeField = value;
}
}
///
/// File to be sent to the client for this error code and sub code. This can be formatted. For example: [#FileId].
///
public string File
{
get
{
return this.fileField;
}
set
{
this.fileFieldSet = true;
this.fileField = value;
}
}
///
/// URL to be sent to the client for this error code and sub code. This can be formatted.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public string URL
{
get
{
return this.uRLField;
}
set
{
this.uRLFieldSet = true;
this.uRLField = 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("WebError", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.errorCodeFieldSet)
{
writer.WriteAttributeString("ErrorCode", this.errorCodeField.ToString(CultureInfo.InvariantCulture));
}
if (this.subCodeFieldSet)
{
writer.WriteAttributeString("SubCode", this.subCodeField.ToString(CultureInfo.InvariantCulture));
}
if (this.fileFieldSet)
{
writer.WriteAttributeString("File", this.fileField);
}
if (this.uRLFieldSet)
{
writer.WriteAttributeString("URL", this.uRLField);
}
writer.WriteEndElement();
}
[SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void ISetAttributes.SetAttribute(string name, string value)
{
if (String.IsNullOrEmpty(name))
{
throw new ArgumentNullException("name");
}
if (("ErrorCode" == name))
{
this.errorCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.errorCodeFieldSet = true;
}
if (("SubCode" == name))
{
this.subCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.subCodeFieldSet = true;
}
if (("File" == name))
{
this.fileField = value;
this.fileFieldSet = true;
}
if (("URL" == name))
{
this.uRLField = value;
this.uRLFieldSet = true;
}
}
}
///
/// Custom HTTP Header definition for IIS resources such as WebSite and WebVirtualDir.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class HttpHeader : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string nameField;
private bool nameFieldSet;
private string valueField;
private bool valueFieldSet;
private ISchemaElement parentElement;
///
/// Primary key for custom HTTP Header entry. This will default to the Name attribute.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Name of the custom HTTP Header.
///
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameFieldSet = true;
this.nameField = value;
}
}
///
/// Value for the custom HTTP Header. This attribute can contain a formatted string that is processed at install time to insert the values of properties using [PropertyName] syntax. Also supported are environment variables, file installation paths, and component installation directories; see
///
public string Value
{
get
{
return this.valueField;
}
set
{
this.valueFieldSet = true;
this.valueField = 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("HttpHeader", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.nameFieldSet)
{
writer.WriteAttributeString("Name", this.nameField);
}
if (this.valueFieldSet)
{
writer.WriteAttributeString("Value", this.valueField);
}
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 (("Value" == name))
{
this.valueField = value;
this.valueFieldSet = true;
}
}
}
///
/// MimeMap definition for IIS resources.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class MimeMap : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string typeField;
private bool typeFieldSet;
private string extensionField;
private bool extensionFieldSet;
private ISchemaElement parentElement;
///
/// Id for the MimeMap.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Mime-type covered by the MimeMap.
///
public string Type
{
get
{
return this.typeField;
}
set
{
this.typeFieldSet = true;
this.typeField = value;
}
}
///
/// Extension covered by the MimeMap. Must begin with a dot.
///
public string Extension
{
get
{
return this.extensionField;
}
set
{
this.extensionFieldSet = true;
this.extensionField = 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("MimeMap", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.typeFieldSet)
{
writer.WriteAttributeString("Type", this.typeField);
}
if (this.extensionFieldSet)
{
writer.WriteAttributeString("Extension", this.extensionField);
}
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 (("Type" == name))
{
this.typeField = value;
this.typeFieldSet = true;
}
if (("Extension" == name))
{
this.extensionField = value;
this.extensionFieldSet = true;
}
}
}
///
/// IIs Filter for a Component
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebFilter : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string nameField;
private bool nameFieldSet;
private string pathField;
private bool pathFieldSet;
private string webSiteField;
private bool webSiteFieldSet;
private string descriptionField;
private bool descriptionFieldSet;
private int flagsField;
private bool flagsFieldSet;
private string loadOrderField;
private bool loadOrderFieldSet;
private ISchemaElement parentElement;
///
/// The unique Id for the web filter.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// The name of the filter to be used in IIS.
///
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameFieldSet = true;
this.nameField = value;
}
}
///
/// The path of the filter executable file.
/// This should usually be a value like '[!FileId]', where 'FileId' is the file identifier
/// of the filter executable file.
///
public string Path
{
get
{
return this.pathField;
}
set
{
this.pathFieldSet = true;
this.pathField = value;
}
}
///
/// Specifies the parent website for this filter (if there is one).
/// If this is a global filter, then this attribute should not be specified.
///
public string WebSite
{
get
{
return this.webSiteField;
}
set
{
this.webSiteFieldSet = true;
this.webSiteField = value;
}
}
///
/// Description of the filter.
///
public string Description
{
get
{
return this.descriptionField;
}
set
{
this.descriptionFieldSet = true;
this.descriptionField = value;
}
}
///
/// Sets the MD_FILTER_FLAGS metabase key for the filter. This must be an integer. See MSDN 'FilterFlags' documentation for more details.
///
public int Flags
{
get
{
return this.flagsField;
}
set
{
this.flagsFieldSet = true;
this.flagsField = value;
}
}
///
/// The legal values are "first", "last", or a number.
/// If a number is specified, it must be greater than 0.
///
public string LoadOrder
{
get
{
return this.loadOrderField;
}
set
{
this.loadOrderFieldSet = true;
this.loadOrderField = 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("WebFilter", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.nameFieldSet)
{
writer.WriteAttributeString("Name", this.nameField);
}
if (this.pathFieldSet)
{
writer.WriteAttributeString("Path", this.pathField);
}
if (this.webSiteFieldSet)
{
writer.WriteAttributeString("WebSite", this.webSiteField);
}
if (this.descriptionFieldSet)
{
writer.WriteAttributeString("Description", this.descriptionField);
}
if (this.flagsFieldSet)
{
writer.WriteAttributeString("Flags", this.flagsField.ToString(CultureInfo.InvariantCulture));
}
if (this.loadOrderFieldSet)
{
writer.WriteAttributeString("LoadOrder", this.loadOrderField);
}
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 (("Path" == name))
{
this.pathField = value;
this.pathFieldSet = true;
}
if (("WebSite" == name))
{
this.webSiteField = value;
this.webSiteFieldSet = true;
}
if (("Description" == name))
{
this.descriptionField = value;
this.descriptionFieldSet = true;
}
if (("Flags" == name))
{
this.flagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.flagsFieldSet = true;
}
if (("LoadOrder" == name))
{
this.loadOrderField = value;
this.loadOrderFieldSet = true;
}
}
}
///
/// Extension for WebApplication
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebApplicationExtension : ISchemaElement, ISetAttributes
{
private string executableField;
private bool executableFieldSet;
private string extensionField;
private bool extensionFieldSet;
private string verbsField;
private bool verbsFieldSet;
private YesNoType scriptField;
private bool scriptFieldSet;
private YesNoType checkPathField;
private bool checkPathFieldSet;
private ISchemaElement parentElement;
///
/// usually a Property that resolves to short file name path
///
public string Executable
{
get
{
return this.executableField;
}
set
{
this.executableFieldSet = true;
this.executableField = value;
}
}
///
/// Extension being registered. Do not prefix with a '.' (e.g. you should use "html", not ".html"). To register for all extensions, use Extension="*". To register a wildcard application map (which handles all requests, even those for directories or files with no extension) omit the Extension attribute completely.
///
public string Extension
{
get
{
return this.extensionField;
}
set
{
this.extensionFieldSet = true;
this.extensionField = value;
}
}
public string Verbs
{
get
{
return this.verbsField;
}
set
{
this.verbsFieldSet = true;
this.verbsField = value;
}
}
public YesNoType Script
{
get
{
return this.scriptField;
}
set
{
this.scriptFieldSet = true;
this.scriptField = value;
}
}
public YesNoType CheckPath
{
get
{
return this.checkPathField;
}
set
{
this.checkPathFieldSet = true;
this.checkPathField = 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("WebApplicationExtension", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.executableFieldSet)
{
writer.WriteAttributeString("Executable", this.executableField);
}
if (this.extensionFieldSet)
{
writer.WriteAttributeString("Extension", this.extensionField);
}
if (this.verbsFieldSet)
{
writer.WriteAttributeString("Verbs", this.verbsField);
}
if (this.scriptFieldSet)
{
if ((this.scriptField == YesNoType.no))
{
writer.WriteAttributeString("Script", "no");
}
if ((this.scriptField == YesNoType.yes))
{
writer.WriteAttributeString("Script", "yes");
}
}
if (this.checkPathFieldSet)
{
if ((this.checkPathField == YesNoType.no))
{
writer.WriteAttributeString("CheckPath", "no");
}
if ((this.checkPathField == YesNoType.yes))
{
writer.WriteAttributeString("CheckPath", "yes");
}
}
writer.WriteEndElement();
}
[SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void ISetAttributes.SetAttribute(string name, string value)
{
if (String.IsNullOrEmpty(name))
{
throw new ArgumentNullException("name");
}
if (("Executable" == name))
{
this.executableField = value;
this.executableFieldSet = true;
}
if (("Extension" == name))
{
this.extensionField = value;
this.extensionFieldSet = true;
}
if (("Verbs" == name))
{
this.verbsField = value;
this.verbsFieldSet = true;
}
if (("Script" == name))
{
this.scriptField = Enums.ParseYesNoType(value);
this.scriptFieldSet = true;
}
if (("CheckPath" == name))
{
this.checkPathField = Enums.ParseYesNoType(value);
this.checkPathFieldSet = true;
}
}
}
///
/// IIS6 Application Pool
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebAppPool : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
{
private ElementCollection children;
private string idField;
private bool idFieldSet;
private string nameField;
private bool nameFieldSet;
private string userField;
private bool userFieldSet;
private int recycleMinutesField;
private bool recycleMinutesFieldSet;
private int recycleRequestsField;
private bool recycleRequestsFieldSet;
private int virtualMemoryField;
private bool virtualMemoryFieldSet;
private int privateMemoryField;
private bool privateMemoryFieldSet;
private int idleTimeoutField;
private bool idleTimeoutFieldSet;
private int queueLimitField;
private bool queueLimitFieldSet;
private long maxCpuUsageField;
private bool maxCpuUsageFieldSet;
private int refreshCpuField;
private bool refreshCpuFieldSet;
private CpuActionType cpuActionField;
private bool cpuActionFieldSet;
private int maxWorkerProcessesField;
private bool maxWorkerProcessesFieldSet;
private IdentityType identityField;
private bool identityFieldSet;
private string managedPipelineModeField;
private bool managedPipelineModeFieldSet;
private string managedRuntimeVersionField;
private bool managedRuntimeVersionFieldSet;
private ISchemaElement parentElement;
public WebAppPool()
{
ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RecycleTime)));
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);
}
}
///
/// Id of the AppPool.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Name of the AppPool to be shown in IIs.
///
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameFieldSet = true;
this.nameField = value;
}
}
///
/// User account to run the AppPool as. To use this, you must set the Identity attribute to 'other'.
///
public string User
{
get
{
return this.userField;
}
set
{
this.userFieldSet = true;
this.userField = value;
}
}
///
/// How often, in minutes, you want the AppPool to be recycled.
///
public int RecycleMinutes
{
get
{
return this.recycleMinutesField;
}
set
{
this.recycleMinutesFieldSet = true;
this.recycleMinutesField = value;
}
}
///
/// How often, in requests, you want the AppPool to be recycled.
///
public int RecycleRequests
{
get
{
return this.recycleRequestsField;
}
set
{
this.recycleRequestsFieldSet = true;
this.recycleRequestsField = value;
}
}
///
/// Specifies the amount of virtual memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.
///
public int VirtualMemory
{
get
{
return this.virtualMemoryField;
}
set
{
this.virtualMemoryFieldSet = true;
this.virtualMemoryField = value;
}
}
///
/// Specifies the amount of private memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.
///
public int PrivateMemory
{
get
{
return this.privateMemoryField;
}
set
{
this.privateMemoryFieldSet = true;
this.privateMemoryField = value;
}
}
///
/// Shutdown worker process after being idle for (time in minutes).
///
public int IdleTimeout
{
get
{
return this.idleTimeoutField;
}
set
{
this.idleTimeoutFieldSet = true;
this.idleTimeoutField = value;
}
}
///
/// Limit the kernel request queue (number of requests).
///
public int QueueLimit
{
get
{
return this.queueLimitField;
}
set
{
this.queueLimitFieldSet = true;
this.queueLimitField = value;
}
}
///
/// Maximum CPU usage (percent).
///
public long MaxCpuUsage
{
get
{
return this.maxCpuUsageField;
}
set
{
this.maxCpuUsageFieldSet = true;
this.maxCpuUsageField = value;
}
}
///
/// Refresh CPU usage numbers (in minutes).
///
public int RefreshCpu
{
get
{
return this.refreshCpuField;
}
set
{
this.refreshCpuFieldSet = true;
this.refreshCpuField = value;
}
}
///
/// Action taken when CPU exceeds maximum CPU use (as defined with MaxCpuUsage and RefreshCpu).
///
public CpuActionType CpuAction
{
get
{
return this.cpuActionField;
}
set
{
this.cpuActionFieldSet = true;
this.cpuActionField = value;
}
}
///
/// Maximum number of worker processes.
///
public int MaxWorkerProcesses
{
get
{
return this.maxWorkerProcessesField;
}
set
{
this.maxWorkerProcessesFieldSet = true;
this.maxWorkerProcessesField = value;
}
}
///
/// Identity you want the AppPool to run under (applicationPoolIdentity is only available on IIS7). Use the 'other' value in conjunction with the User attribute to specify non-standard user.
///
public IdentityType Identity
{
get
{
return this.identityField;
}
set
{
this.identityFieldSet = true;
this.identityField = value;
}
}
///
/// Specifies the request-processing mode that is used to process requests for managed content. Only available on IIS7, ignored on IIS6.
/// See
///
public string ManagedPipelineMode
{
get
{
return this.managedPipelineModeField;
}
set
{
this.managedPipelineModeFieldSet = true;
this.managedPipelineModeField = value;
}
}
///
/// Specifies the .NET Framework version to be used by the application pool. Only available on IIS7, ignored on IIS6.
/// See
///
public string ManagedRuntimeVersion
{
get
{
return this.managedRuntimeVersionField;
}
set
{
this.managedRuntimeVersionFieldSet = true;
this.managedRuntimeVersionField = 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 (("RecycleTime" == childName))
{
childValue = new RecycleTime();
}
if ((null == childValue))
{
throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
}
return childValue;
}
///
/// Parses a CpuActionType from a string.
///
public static CpuActionType ParseCpuActionType(string value)
{
CpuActionType parsedValue;
WebAppPool.TryParseCpuActionType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a CpuActionType from a string.
///
public static bool TryParseCpuActionType(string value, out CpuActionType parsedValue)
{
parsedValue = CpuActionType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("none" == value))
{
parsedValue = CpuActionType.none;
}
else
{
if (("shutdown" == value))
{
parsedValue = CpuActionType.shutdown;
}
else
{
parsedValue = CpuActionType.IllegalValue;
return false;
}
}
return true;
}
///
/// Parses a IdentityType from a string.
///
public static IdentityType ParseIdentityType(string value)
{
IdentityType parsedValue;
WebAppPool.TryParseIdentityType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a IdentityType from a string.
///
public static bool TryParseIdentityType(string value, out IdentityType parsedValue)
{
parsedValue = IdentityType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("networkService" == value))
{
parsedValue = IdentityType.networkService;
}
else
{
if (("localService" == value))
{
parsedValue = IdentityType.localService;
}
else
{
if (("localSystem" == value))
{
parsedValue = IdentityType.localSystem;
}
else
{
if (("other" == value))
{
parsedValue = IdentityType.other;
}
else
{
if (("applicationPoolIdentity" == value))
{
parsedValue = IdentityType.applicationPoolIdentity;
}
else
{
parsedValue = IdentityType.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("WebAppPool", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.nameFieldSet)
{
writer.WriteAttributeString("Name", this.nameField);
}
if (this.userFieldSet)
{
writer.WriteAttributeString("User", this.userField);
}
if (this.recycleMinutesFieldSet)
{
writer.WriteAttributeString("RecycleMinutes", this.recycleMinutesField.ToString(CultureInfo.InvariantCulture));
}
if (this.recycleRequestsFieldSet)
{
writer.WriteAttributeString("RecycleRequests", this.recycleRequestsField.ToString(CultureInfo.InvariantCulture));
}
if (this.virtualMemoryFieldSet)
{
writer.WriteAttributeString("VirtualMemory", this.virtualMemoryField.ToString(CultureInfo.InvariantCulture));
}
if (this.privateMemoryFieldSet)
{
writer.WriteAttributeString("PrivateMemory", this.privateMemoryField.ToString(CultureInfo.InvariantCulture));
}
if (this.idleTimeoutFieldSet)
{
writer.WriteAttributeString("IdleTimeout", this.idleTimeoutField.ToString(CultureInfo.InvariantCulture));
}
if (this.queueLimitFieldSet)
{
writer.WriteAttributeString("QueueLimit", this.queueLimitField.ToString(CultureInfo.InvariantCulture));
}
if (this.maxCpuUsageFieldSet)
{
writer.WriteAttributeString("MaxCpuUsage", this.maxCpuUsageField.ToString(CultureInfo.InvariantCulture));
}
if (this.refreshCpuFieldSet)
{
writer.WriteAttributeString("RefreshCpu", this.refreshCpuField.ToString(CultureInfo.InvariantCulture));
}
if (this.cpuActionFieldSet)
{
if ((this.cpuActionField == CpuActionType.none))
{
writer.WriteAttributeString("CpuAction", "none");
}
if ((this.cpuActionField == CpuActionType.shutdown))
{
writer.WriteAttributeString("CpuAction", "shutdown");
}
}
if (this.maxWorkerProcessesFieldSet)
{
writer.WriteAttributeString("MaxWorkerProcesses", this.maxWorkerProcessesField.ToString(CultureInfo.InvariantCulture));
}
if (this.identityFieldSet)
{
if ((this.identityField == IdentityType.networkService))
{
writer.WriteAttributeString("Identity", "networkService");
}
if ((this.identityField == IdentityType.localService))
{
writer.WriteAttributeString("Identity", "localService");
}
if ((this.identityField == IdentityType.localSystem))
{
writer.WriteAttributeString("Identity", "localSystem");
}
if ((this.identityField == IdentityType.other))
{
writer.WriteAttributeString("Identity", "other");
}
if ((this.identityField == IdentityType.applicationPoolIdentity))
{
writer.WriteAttributeString("Identity", "applicationPoolIdentity");
}
}
if (this.managedPipelineModeFieldSet)
{
writer.WriteAttributeString("ManagedPipelineMode", this.managedPipelineModeField);
}
if (this.managedRuntimeVersionFieldSet)
{
writer.WriteAttributeString("ManagedRuntimeVersion", this.managedRuntimeVersionField);
}
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 (("User" == name))
{
this.userField = value;
this.userFieldSet = true;
}
if (("RecycleMinutes" == name))
{
this.recycleMinutesField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.recycleMinutesFieldSet = true;
}
if (("RecycleRequests" == name))
{
this.recycleRequestsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.recycleRequestsFieldSet = true;
}
if (("VirtualMemory" == name))
{
this.virtualMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.virtualMemoryFieldSet = true;
}
if (("PrivateMemory" == name))
{
this.privateMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.privateMemoryFieldSet = true;
}
if (("IdleTimeout" == name))
{
this.idleTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.idleTimeoutFieldSet = true;
}
if (("QueueLimit" == name))
{
this.queueLimitField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.queueLimitFieldSet = true;
}
if (("MaxCpuUsage" == name))
{
this.maxCpuUsageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.maxCpuUsageFieldSet = true;
}
if (("RefreshCpu" == name))
{
this.refreshCpuField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.refreshCpuFieldSet = true;
}
if (("CpuAction" == name))
{
this.cpuActionField = WebAppPool.ParseCpuActionType(value);
this.cpuActionFieldSet = true;
}
if (("MaxWorkerProcesses" == name))
{
this.maxWorkerProcessesField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.maxWorkerProcessesFieldSet = true;
}
if (("Identity" == name))
{
this.identityField = WebAppPool.ParseIdentityType(value);
this.identityFieldSet = true;
}
if (("ManagedPipelineMode" == name))
{
this.managedPipelineModeField = value;
this.managedPipelineModeFieldSet = true;
}
if (("ManagedRuntimeVersion" == name))
{
this.managedRuntimeVersionField = value;
this.managedRuntimeVersionFieldSet = true;
}
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum CpuActionType
{
IllegalValue = int.MaxValue,
NotSet = -1,
none,
shutdown,
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum IdentityType
{
IllegalValue = int.MaxValue,
NotSet = -1,
networkService,
localService,
localSystem,
other,
applicationPoolIdentity,
}
}
///
/// IIS6 Application Pool Recycle Times on 24 hour clock.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class RecycleTime : ISchemaElement, ISetAttributes
{
private string valueField;
private bool valueFieldSet;
private ISchemaElement parentElement;
public string Value
{
get
{
return this.valueField;
}
set
{
this.valueFieldSet = true;
this.valueField = 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("RecycleTime", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.valueFieldSet)
{
writer.WriteAttributeString("Value", this.valueField);
}
writer.WriteEndElement();
}
[SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void ISetAttributes.SetAttribute(string name, string value)
{
if (String.IsNullOrEmpty(name))
{
throw new ArgumentNullException("name");
}
if (("Value" == name))
{
this.valueField = value;
this.valueFieldSet = true;
}
}
}
///
/// Used to install and uninstall certificates.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class Certificate : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string nameField;
private bool nameFieldSet;
private StoreNameType storeNameField;
private bool storeNameFieldSet;
private StoreLocationType storeLocationField;
private bool storeLocationFieldSet;
private YesNoType overwriteField;
private bool overwriteFieldSet;
private YesNoType requestField;
private bool requestFieldSet;
private string binaryKeyField;
private bool binaryKeyFieldSet;
private string certificatePathField;
private bool certificatePathFieldSet;
private string pFXPasswordField;
private bool pFXPasswordFieldSet;
private ISchemaElement parentElement;
///
/// Unique identifier for this certificate in the installation package.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Name of the certificate that will be installed or uninstalled in the specified store.
/// This attribute may be set via a formatted Property (e.g. [MyProperty]).
///
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameFieldSet = true;
this.nameField = value;
}
}
public StoreNameType StoreName
{
get
{
return this.storeNameField;
}
set
{
this.storeNameFieldSet = true;
this.storeNameField = value;
}
}
public StoreLocationType StoreLocation
{
get
{
return this.storeLocationField;
}
set
{
this.storeLocationFieldSet = true;
this.storeLocationField = value;
}
}
public YesNoType Overwrite
{
get
{
return this.overwriteField;
}
set
{
this.overwriteFieldSet = true;
this.overwriteField = value;
}
}
///
/// This attribute controls whether the CertificatePath attribute is a path to a certificate file (Request='no') or the
/// certificate authority to request the certificate from (Request='yes').
///
public YesNoType Request
{
get
{
return this.requestField;
}
set
{
this.requestFieldSet = true;
this.requestField = value;
}
}
///
/// Reference to a Binary element that will store the certificate as a stream inside the package. This attribute cannot be specified with
/// the CertificatePath attribute.
///
public string BinaryKey
{
get
{
return this.binaryKeyField;
}
set
{
this.binaryKeyFieldSet = true;
this.binaryKeyField = value;
}
}
///
/// If the Request attribute is "no" then this attribute is the path to the certificate file outside of the package.
/// If the Request attribute is "yes" then this atribute is the certificate authority to request the certificate from.
/// This attribute may be set via a formatted Property (e.g. [MyProperty]).
///
public string CertificatePath
{
get
{
return this.certificatePathField;
}
set
{
this.certificatePathFieldSet = true;
this.certificatePathField = value;
}
}
///
/// If the Binary stream or path to the file outside of the package is a password protected PFX file, the password for that
/// PFX must be specified here. This attribute may be set via a formatted Property (e.g. [MyProperty]).
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public string PFXPassword
{
get
{
return this.pFXPasswordField;
}
set
{
this.pFXPasswordFieldSet = true;
this.pFXPasswordField = value;
}
}
public virtual ISchemaElement ParentElement
{
get
{
return this.parentElement;
}
set
{
this.parentElement = value;
}
}
///
/// Parses a StoreNameType from a string.
///
public static StoreNameType ParseStoreNameType(string value)
{
StoreNameType parsedValue;
Certificate.TryParseStoreNameType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a StoreNameType from a string.
///
public static bool TryParseStoreNameType(string value, out StoreNameType parsedValue)
{
parsedValue = StoreNameType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("ca" == value))
{
parsedValue = StoreNameType.ca;
}
else
{
if (("my" == value))
{
parsedValue = StoreNameType.my;
}
else
{
if (("personal" == value))
{
parsedValue = StoreNameType.personal;
}
else
{
if (("request" == value))
{
parsedValue = StoreNameType.request;
}
else
{
if (("root" == value))
{
parsedValue = StoreNameType.root;
}
else
{
if (("otherPeople" == value))
{
parsedValue = StoreNameType.otherPeople;
}
else
{
if (("trustedPeople" == value))
{
parsedValue = StoreNameType.trustedPeople;
}
else
{
if (("trustedPublisher" == value))
{
parsedValue = StoreNameType.trustedPublisher;
}
else
{
parsedValue = StoreNameType.IllegalValue;
return false;
}
}
}
}
}
}
}
}
return true;
}
///
/// Parses a StoreLocationType from a string.
///
public static StoreLocationType ParseStoreLocationType(string value)
{
StoreLocationType parsedValue;
Certificate.TryParseStoreLocationType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a StoreLocationType from a string.
///
public static bool TryParseStoreLocationType(string value, out StoreLocationType parsedValue)
{
parsedValue = StoreLocationType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("currentUser" == value))
{
parsedValue = StoreLocationType.currentUser;
}
else
{
if (("localMachine" == value))
{
parsedValue = StoreLocationType.localMachine;
}
else
{
parsedValue = StoreLocationType.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("Certificate", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.nameFieldSet)
{
writer.WriteAttributeString("Name", this.nameField);
}
if (this.storeNameFieldSet)
{
if ((this.storeNameField == StoreNameType.ca))
{
writer.WriteAttributeString("StoreName", "ca");
}
if ((this.storeNameField == StoreNameType.my))
{
writer.WriteAttributeString("StoreName", "my");
}
if ((this.storeNameField == StoreNameType.personal))
{
writer.WriteAttributeString("StoreName", "personal");
}
if ((this.storeNameField == StoreNameType.request))
{
writer.WriteAttributeString("StoreName", "request");
}
if ((this.storeNameField == StoreNameType.root))
{
writer.WriteAttributeString("StoreName", "root");
}
if ((this.storeNameField == StoreNameType.otherPeople))
{
writer.WriteAttributeString("StoreName", "otherPeople");
}
if ((this.storeNameField == StoreNameType.trustedPeople))
{
writer.WriteAttributeString("StoreName", "trustedPeople");
}
if ((this.storeNameField == StoreNameType.trustedPublisher))
{
writer.WriteAttributeString("StoreName", "trustedPublisher");
}
}
if (this.storeLocationFieldSet)
{
if ((this.storeLocationField == StoreLocationType.currentUser))
{
writer.WriteAttributeString("StoreLocation", "currentUser");
}
if ((this.storeLocationField == StoreLocationType.localMachine))
{
writer.WriteAttributeString("StoreLocation", "localMachine");
}
}
if (this.overwriteFieldSet)
{
if ((this.overwriteField == YesNoType.no))
{
writer.WriteAttributeString("Overwrite", "no");
}
if ((this.overwriteField == YesNoType.yes))
{
writer.WriteAttributeString("Overwrite", "yes");
}
}
if (this.requestFieldSet)
{
if ((this.requestField == YesNoType.no))
{
writer.WriteAttributeString("Request", "no");
}
if ((this.requestField == YesNoType.yes))
{
writer.WriteAttributeString("Request", "yes");
}
}
if (this.binaryKeyFieldSet)
{
writer.WriteAttributeString("BinaryKey", this.binaryKeyField);
}
if (this.certificatePathFieldSet)
{
writer.WriteAttributeString("CertificatePath", this.certificatePathField);
}
if (this.pFXPasswordFieldSet)
{
writer.WriteAttributeString("PFXPassword", this.pFXPasswordField);
}
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 (("StoreName" == name))
{
this.storeNameField = Certificate.ParseStoreNameType(value);
this.storeNameFieldSet = true;
}
if (("StoreLocation" == name))
{
this.storeLocationField = Certificate.ParseStoreLocationType(value);
this.storeLocationFieldSet = true;
}
if (("Overwrite" == name))
{
this.overwriteField = Enums.ParseYesNoType(value);
this.overwriteFieldSet = true;
}
if (("Request" == name))
{
this.requestField = Enums.ParseYesNoType(value);
this.requestFieldSet = true;
}
if (("BinaryKey" == name))
{
this.binaryKeyField = value;
this.binaryKeyFieldSet = true;
}
if (("CertificatePath" == name))
{
this.certificatePathField = value;
this.certificatePathFieldSet = true;
}
if (("PFXPassword" == name))
{
this.pFXPasswordField = value;
this.pFXPasswordFieldSet = true;
}
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum StoreNameType
{
IllegalValue = int.MaxValue,
NotSet = -1,
///
/// Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator.
///
ca,
///
/// Use the "personal" value instead.
///
my,
///
/// Contains personal certificates. These certificates will usually have an associated private key. This store is often
/// referred to as the "MY" certificate store.
///
personal,
request,
///
/// Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator. Certificates in this store are typically self-signed.
///
root,
///
/// Contains the certificates of those that the user normally sends enveloped messages to or receives signed messages from.
/// See
///
otherPeople,
///
/// Contains the certificates of those directly trusted people and resources.
/// See
///
trustedPeople,
///
/// Contains the certificates of those publishers who are trusted.
/// See
///
trustedPublisher,
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum StoreLocationType
{
IllegalValue = int.MaxValue,
NotSet = -1,
currentUser,
localMachine,
}
}
///
/// Associates a certificate with the parent WebSite. The Certificate element should be
/// in the same Component as the parent WebSite.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class CertificateRef : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private ISchemaElement parentElement;
///
/// The identifier of the referenced Certificate.
///
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("CertificateRef", "http://wixtoolset.org/schemas/v4/wxs/iis");
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;
}
}
}
///
/// IIS Properties
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebProperty : ISchemaElement, ISetAttributes
{
private IdType idField;
private bool idFieldSet;
private string valueField;
private bool valueFieldSet;
private ISchemaElement parentElement;
public IdType Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// The value to be used for the WebProperty specified in the Id attribute. See
/// the remarks section for information on acceptable values for each Id.
///
public string Value
{
get
{
return this.valueField;
}
set
{
this.valueFieldSet = true;
this.valueField = value;
}
}
public virtual ISchemaElement ParentElement
{
get
{
return this.parentElement;
}
set
{
this.parentElement = value;
}
}
///
/// Parses a IdType from a string.
///
public static IdType ParseIdType(string value)
{
IdType parsedValue;
WebProperty.TryParseIdType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a IdType from a string.
///
public static bool TryParseIdType(string value, out IdType parsedValue)
{
parsedValue = IdType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("ETagChangeNumber" == value))
{
parsedValue = IdType.ETagChangeNumber;
}
else
{
if (("IIs5IsolationMode" == value))
{
parsedValue = IdType.IIs5IsolationMode;
}
else
{
if (("MaxGlobalBandwidth" == value))
{
parsedValue = IdType.MaxGlobalBandwidth;
}
else
{
if (("LogInUTF8" == value))
{
parsedValue = IdType.LogInUTF8;
}
else
{
parsedValue = IdType.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("WebProperty", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
if ((this.idField == IdType.ETagChangeNumber))
{
writer.WriteAttributeString("Id", "ETagChangeNumber");
}
if ((this.idField == IdType.IIs5IsolationMode))
{
writer.WriteAttributeString("Id", "IIs5IsolationMode");
}
if ((this.idField == IdType.MaxGlobalBandwidth))
{
writer.WriteAttributeString("Id", "MaxGlobalBandwidth");
}
if ((this.idField == IdType.LogInUTF8))
{
writer.WriteAttributeString("Id", "LogInUTF8");
}
}
if (this.valueFieldSet)
{
writer.WriteAttributeString("Value", this.valueField);
}
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 = WebProperty.ParseIdType(value);
this.idFieldSet = true;
}
if (("Value" == name))
{
this.valueField = value;
this.valueFieldSet = true;
}
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum IdType
{
IllegalValue = int.MaxValue,
NotSet = -1,
ETagChangeNumber,
IIs5IsolationMode,
MaxGlobalBandwidth,
LogInUTF8,
}
}
///
/// Defines properties for a web application. These properties can be used for more than one application defined in a web site or vroot, by defining this element in a common location and referring to it by setting the WebApplication attribute of the WebSite and WebVirtualDir elements.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
{
private ElementCollection children;
private string idField;
private bool idFieldSet;
private string nameField;
private bool nameFieldSet;
private IsolationType isolationField;
private bool isolationFieldSet;
private YesNoDefaultType allowSessionsField;
private bool allowSessionsFieldSet;
private int sessionTimeoutField;
private bool sessionTimeoutFieldSet;
private YesNoDefaultType bufferField;
private bool bufferFieldSet;
private YesNoDefaultType parentPathsField;
private bool parentPathsFieldSet;
private DefaultScriptType defaultScriptField;
private bool defaultScriptFieldSet;
private int scriptTimeoutField;
private bool scriptTimeoutFieldSet;
private YesNoDefaultType serverDebuggingField;
private bool serverDebuggingFieldSet;
private YesNoDefaultType clientDebuggingField;
private bool clientDebuggingFieldSet;
private string webAppPoolField;
private bool webAppPoolFieldSet;
private ISchemaElement parentElement;
public WebApplication()
{
ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(WebApplicationExtension)));
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;
}
}
///
/// Sets the name of this application.
///
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameFieldSet = true;
this.nameField = value;
}
}
///
/// Sets the application isolation level for this application for pre-IIS 6 applications.
///
public IsolationType Isolation
{
get
{
return this.isolationField;
}
set
{
this.isolationFieldSet = true;
this.isolationField = value;
}
}
///
/// Sets the Enable Session State option. When enabled, you can set the session timeout using the SessionTimeout attribute.
///
public YesNoDefaultType AllowSessions
{
get
{
return this.allowSessionsField;
}
set
{
this.allowSessionsFieldSet = true;
this.allowSessionsField = value;
}
}
///
/// Sets the timeout value for sessions in minutes.
///
public int SessionTimeout
{
get
{
return this.sessionTimeoutField;
}
set
{
this.sessionTimeoutFieldSet = true;
this.sessionTimeoutField = value;
}
}
///
/// Sets the option that enables response buffering in the application, which allows ASP script to set response headers anywhere in the script.
///
public YesNoDefaultType Buffer
{
get
{
return this.bufferField;
}
set
{
this.bufferFieldSet = true;
this.bufferField = value;
}
}
///
/// Sets the parent paths option, which allows a client to use relative paths to reach parent directories from this application.
///
public YesNoDefaultType ParentPaths
{
get
{
return this.parentPathsField;
}
set
{
this.parentPathsFieldSet = true;
this.parentPathsField = value;
}
}
///
/// Sets the default script language for the site.
///
public DefaultScriptType DefaultScript
{
get
{
return this.defaultScriptField;
}
set
{
this.defaultScriptFieldSet = true;
this.defaultScriptField = value;
}
}
///
/// Sets the timeout value in seconds for executing ASP scripts.
///
public int ScriptTimeout
{
get
{
return this.scriptTimeoutField;
}
set
{
this.scriptTimeoutFieldSet = true;
this.scriptTimeoutField = value;
}
}
///
/// Enable ASP server-side script debugging.
///
public YesNoDefaultType ServerDebugging
{
get
{
return this.serverDebuggingField;
}
set
{
this.serverDebuggingFieldSet = true;
this.serverDebuggingField = value;
}
}
///
/// Enable ASP client-side script debugging.
///
public YesNoDefaultType ClientDebugging
{
get
{
return this.clientDebuggingField;
}
set
{
this.clientDebuggingFieldSet = true;
this.clientDebuggingField = value;
}
}
///
/// References the Id attribute of a WebAppPool element to use as the application pool for this application in IIS 6 applications.
///
public string WebAppPool
{
get
{
return this.webAppPoolField;
}
set
{
this.webAppPoolFieldSet = true;
this.webAppPoolField = 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 (("WebApplicationExtension" == childName))
{
childValue = new WebApplicationExtension();
}
if ((null == childValue))
{
throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
}
return childValue;
}
///
/// Parses a IsolationType from a string.
///
public static IsolationType ParseIsolationType(string value)
{
IsolationType parsedValue;
WebApplication.TryParseIsolationType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a IsolationType from a string.
///
public static bool TryParseIsolationType(string value, out IsolationType parsedValue)
{
parsedValue = IsolationType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("low" == value))
{
parsedValue = IsolationType.low;
}
else
{
if (("medium" == value))
{
parsedValue = IsolationType.medium;
}
else
{
if (("high" == value))
{
parsedValue = IsolationType.high;
}
else
{
parsedValue = IsolationType.IllegalValue;
return false;
}
}
}
return true;
}
///
/// Parses a DefaultScriptType from a string.
///
public static DefaultScriptType ParseDefaultScriptType(string value)
{
DefaultScriptType parsedValue;
WebApplication.TryParseDefaultScriptType(value, out parsedValue);
return parsedValue;
}
///
/// Tries to parse a DefaultScriptType from a string.
///
public static bool TryParseDefaultScriptType(string value, out DefaultScriptType parsedValue)
{
parsedValue = DefaultScriptType.NotSet;
if (string.IsNullOrEmpty(value))
{
return false;
}
if (("VBScript" == value))
{
parsedValue = DefaultScriptType.VBScript;
}
else
{
if (("JScript" == value))
{
parsedValue = DefaultScriptType.JScript;
}
else
{
parsedValue = DefaultScriptType.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("WebApplication", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.nameFieldSet)
{
writer.WriteAttributeString("Name", this.nameField);
}
if (this.isolationFieldSet)
{
if ((this.isolationField == IsolationType.low))
{
writer.WriteAttributeString("Isolation", "low");
}
if ((this.isolationField == IsolationType.medium))
{
writer.WriteAttributeString("Isolation", "medium");
}
if ((this.isolationField == IsolationType.high))
{
writer.WriteAttributeString("Isolation", "high");
}
}
if (this.allowSessionsFieldSet)
{
if ((this.allowSessionsField == YesNoDefaultType.@default))
{
writer.WriteAttributeString("AllowSessions", "default");
}
if ((this.allowSessionsField == YesNoDefaultType.no))
{
writer.WriteAttributeString("AllowSessions", "no");
}
if ((this.allowSessionsField == YesNoDefaultType.yes))
{
writer.WriteAttributeString("AllowSessions", "yes");
}
}
if (this.sessionTimeoutFieldSet)
{
writer.WriteAttributeString("SessionTimeout", this.sessionTimeoutField.ToString(CultureInfo.InvariantCulture));
}
if (this.bufferFieldSet)
{
if ((this.bufferField == YesNoDefaultType.@default))
{
writer.WriteAttributeString("Buffer", "default");
}
if ((this.bufferField == YesNoDefaultType.no))
{
writer.WriteAttributeString("Buffer", "no");
}
if ((this.bufferField == YesNoDefaultType.yes))
{
writer.WriteAttributeString("Buffer", "yes");
}
}
if (this.parentPathsFieldSet)
{
if ((this.parentPathsField == YesNoDefaultType.@default))
{
writer.WriteAttributeString("ParentPaths", "default");
}
if ((this.parentPathsField == YesNoDefaultType.no))
{
writer.WriteAttributeString("ParentPaths", "no");
}
if ((this.parentPathsField == YesNoDefaultType.yes))
{
writer.WriteAttributeString("ParentPaths", "yes");
}
}
if (this.defaultScriptFieldSet)
{
if ((this.defaultScriptField == DefaultScriptType.VBScript))
{
writer.WriteAttributeString("DefaultScript", "VBScript");
}
if ((this.defaultScriptField == DefaultScriptType.JScript))
{
writer.WriteAttributeString("DefaultScript", "JScript");
}
}
if (this.scriptTimeoutFieldSet)
{
writer.WriteAttributeString("ScriptTimeout", this.scriptTimeoutField.ToString(CultureInfo.InvariantCulture));
}
if (this.serverDebuggingFieldSet)
{
if ((this.serverDebuggingField == YesNoDefaultType.@default))
{
writer.WriteAttributeString("ServerDebugging", "default");
}
if ((this.serverDebuggingField == YesNoDefaultType.no))
{
writer.WriteAttributeString("ServerDebugging", "no");
}
if ((this.serverDebuggingField == YesNoDefaultType.yes))
{
writer.WriteAttributeString("ServerDebugging", "yes");
}
}
if (this.clientDebuggingFieldSet)
{
if ((this.clientDebuggingField == YesNoDefaultType.@default))
{
writer.WriteAttributeString("ClientDebugging", "default");
}
if ((this.clientDebuggingField == YesNoDefaultType.no))
{
writer.WriteAttributeString("ClientDebugging", "no");
}
if ((this.clientDebuggingField == YesNoDefaultType.yes))
{
writer.WriteAttributeString("ClientDebugging", "yes");
}
}
if (this.webAppPoolFieldSet)
{
writer.WriteAttributeString("WebAppPool", this.webAppPoolField);
}
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 (("Isolation" == name))
{
this.isolationField = WebApplication.ParseIsolationType(value);
this.isolationFieldSet = true;
}
if (("AllowSessions" == name))
{
this.allowSessionsField = Enums.ParseYesNoDefaultType(value);
this.allowSessionsFieldSet = true;
}
if (("SessionTimeout" == name))
{
this.sessionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.sessionTimeoutFieldSet = true;
}
if (("Buffer" == name))
{
this.bufferField = Enums.ParseYesNoDefaultType(value);
this.bufferFieldSet = true;
}
if (("ParentPaths" == name))
{
this.parentPathsField = Enums.ParseYesNoDefaultType(value);
this.parentPathsFieldSet = true;
}
if (("DefaultScript" == name))
{
this.defaultScriptField = WebApplication.ParseDefaultScriptType(value);
this.defaultScriptFieldSet = true;
}
if (("ScriptTimeout" == name))
{
this.scriptTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.scriptTimeoutFieldSet = true;
}
if (("ServerDebugging" == name))
{
this.serverDebuggingField = Enums.ParseYesNoDefaultType(value);
this.serverDebuggingFieldSet = true;
}
if (("ClientDebugging" == name))
{
this.clientDebuggingField = Enums.ParseYesNoDefaultType(value);
this.clientDebuggingFieldSet = true;
}
if (("WebAppPool" == name))
{
this.webAppPoolField = value;
this.webAppPoolFieldSet = true;
}
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum IsolationType
{
IllegalValue = int.MaxValue,
NotSet = -1,
///
/// Means the application executes within the IIS process.
///
low,
///
/// Executes pooled in a separate process.
///
medium,
///
/// Means execution alone in a separate process.
///
high,
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum DefaultScriptType
{
IllegalValue = int.MaxValue,
NotSet = -1,
VBScript,
JScript,
}
}
///
/// WebAddress for WebSite
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebAddress : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string iPField;
private bool iPFieldSet;
private string portField;
private bool portFieldSet;
private string headerField;
private bool headerFieldSet;
private YesNoType secureField;
private bool secureFieldSet;
private ISchemaElement parentElement;
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// The IP address to locate an existing WebSite or create a new WebSite. When the WebAddress is part of a WebSite element
/// used to locate an existing web site the following rules are used:
///
public string IP
{
get
{
return this.iPField;
}
set
{
this.iPFieldSet = true;
this.iPField = value;
}
}
public string Port
{
get
{
return this.portField;
}
set
{
this.portFieldSet = true;
this.portField = value;
}
}
public string Header
{
get
{
return this.headerField;
}
set
{
this.headerFieldSet = true;
this.headerField = value;
}
}
///
/// Determines if this address represents a secure binding. The default is 'no'.
///
public YesNoType Secure
{
get
{
return this.secureField;
}
set
{
this.secureFieldSet = true;
this.secureField = 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("WebAddress", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.iPFieldSet)
{
writer.WriteAttributeString("IP", this.iPField);
}
if (this.portFieldSet)
{
writer.WriteAttributeString("Port", this.portField);
}
if (this.headerFieldSet)
{
writer.WriteAttributeString("Header", this.headerField);
}
if (this.secureFieldSet)
{
if ((this.secureField == YesNoType.no))
{
writer.WriteAttributeString("Secure", "no");
}
if ((this.secureField == YesNoType.yes))
{
writer.WriteAttributeString("Secure", "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 (("IP" == name))
{
this.iPField = value;
this.iPFieldSet = true;
}
if (("Port" == name))
{
this.portField = value;
this.portFieldSet = true;
}
if (("Header" == name))
{
this.headerField = value;
this.headerFieldSet = true;
}
if (("Secure" == name))
{
this.secureField = Enums.ParseYesNoType(value);
this.secureFieldSet = true;
}
}
}
///
/// Defines an IIS virtual directory. When this element is a child of WebSite element, the virtual directory is defined within that web site. Otherwise this virtual directory must reference a WebSite element via the WebSite attribute
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebVirtualDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
{
private ElementCollection children;
private string idField;
private bool idFieldSet;
private string webSiteField;
private bool webSiteFieldSet;
private string aliasField;
private bool aliasFieldSet;
private string directoryField;
private bool directoryFieldSet;
private string dirPropertiesField;
private bool dirPropertiesFieldSet;
private string webApplicationField;
private bool webApplicationFieldSet;
private ISchemaElement parentElement;
public WebVirtualDir()
{
ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap)));
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;
}
}
///
/// References the Id attribute for a WebSite in which this virtual directory belongs. Required when this element is not a child of WebSite element.
///
public string WebSite
{
get
{
return this.webSiteField;
}
set
{
this.webSiteFieldSet = true;
this.webSiteField = value;
}
}
///
/// Sets the application name, which is the URL relative path used to access this virtual directory
///
public string Alias
{
get
{
return this.aliasField;
}
set
{
this.aliasFieldSet = true;
this.aliasField = value;
}
}
///
/// References the Id attribute for a Directory element that points to the content for this virtual directory.
///
public string Directory
{
get
{
return this.directoryField;
}
set
{
this.directoryFieldSet = true;
this.directoryField = value;
}
}
///
/// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this virtual directory.
/// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
///
public string DirProperties
{
get
{
return this.dirPropertiesField;
}
set
{
this.dirPropertiesFieldSet = true;
this.dirPropertiesField = value;
}
}
///
/// References the Id attribute for a WebApplication element that specifies web application settings for this virtual directory. If a WebApplication child is not specified, the virtual directory does not host web applications.
///
public string WebApplication
{
get
{
return this.webApplicationField;
}
set
{
this.webApplicationFieldSet = true;
this.webApplicationField = 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")]
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
ISchemaElement ICreateChildren.CreateChild(string childName)
{
if (String.IsNullOrEmpty(childName))
{
throw new ArgumentNullException("childName");
}
ISchemaElement childValue = null;
if (("WebApplication" == childName))
{
childValue = new WebApplication();
}
if (("WebDirProperties" == childName))
{
childValue = new WebDirProperties();
}
if (("WebError" == childName))
{
childValue = new WebError();
}
if (("WebVirtualDir" == childName))
{
childValue = new WebVirtualDir();
}
if (("HttpHeader" == childName))
{
childValue = new HttpHeader();
}
if (("MimeMap" == childName))
{
childValue = new MimeMap();
}
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("WebVirtualDir", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.webSiteFieldSet)
{
writer.WriteAttributeString("WebSite", this.webSiteField);
}
if (this.aliasFieldSet)
{
writer.WriteAttributeString("Alias", this.aliasField);
}
if (this.directoryFieldSet)
{
writer.WriteAttributeString("Directory", this.directoryField);
}
if (this.dirPropertiesFieldSet)
{
writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
}
if (this.webApplicationFieldSet)
{
writer.WriteAttributeString("WebApplication", this.webApplicationField);
}
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 (("WebSite" == name))
{
this.webSiteField = value;
this.webSiteFieldSet = true;
}
if (("Alias" == name))
{
this.aliasField = value;
this.aliasFieldSet = true;
}
if (("Directory" == name))
{
this.directoryField = value;
this.directoryFieldSet = true;
}
if (("DirProperties" == name))
{
this.dirPropertiesField = value;
this.dirPropertiesFieldSet = true;
}
if (("WebApplication" == name))
{
this.webApplicationField = value;
this.webApplicationFieldSet = true;
}
}
}
///
/// Defines a subdirectory within an IIS web site. When this element is a child of WebSite, the web directory is defined within that web site. Otherwise the web directory must reference a WebSite element via the WebSite attribute.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
{
private ElementCollection children;
private string idField;
private bool idFieldSet;
private string webSiteField;
private bool webSiteFieldSet;
private string pathField;
private bool pathFieldSet;
private string dirPropertiesField;
private bool dirPropertiesFieldSet;
private ISchemaElement parentElement;
public WebDir()
{
ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
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;
}
}
///
/// References the Id attribute for a WebSite element in which this directory belongs. Required when this element is not a child of a WebSite element.
///
public string WebSite
{
get
{
return this.webSiteField;
}
set
{
this.webSiteFieldSet = true;
this.webSiteField = value;
}
}
///
/// Specifies the name of this web directory.
///
public string Path
{
get
{
return this.pathField;
}
set
{
this.pathFieldSet = true;
this.pathField = value;
}
}
///
/// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this web directory.
/// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
///
public string DirProperties
{
get
{
return this.dirPropertiesField;
}
set
{
this.dirPropertiesFieldSet = true;
this.dirPropertiesField = 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 (("WebApplication" == childName))
{
childValue = new WebApplication();
}
if (("WebDirProperties" == childName))
{
childValue = new WebDirProperties();
}
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("WebDir", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.webSiteFieldSet)
{
writer.WriteAttributeString("WebSite", this.webSiteField);
}
if (this.pathFieldSet)
{
writer.WriteAttributeString("Path", this.pathField);
}
if (this.dirPropertiesFieldSet)
{
writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
}
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 (("WebSite" == name))
{
this.webSiteField = value;
this.webSiteFieldSet = true;
}
if (("Path" == name))
{
this.pathField = value;
this.pathFieldSet = true;
}
if (("DirProperties" == name))
{
this.dirPropertiesField = value;
this.dirPropertiesFieldSet = true;
}
}
}
///
/// IIs Web Site
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebSite : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
{
private ElementCollection children;
private string idField;
private bool idFieldSet;
private YesNoType autoStartField;
private bool autoStartFieldSet;
private YesNoType configureIfExistsField;
private bool configureIfExistsFieldSet;
private long connectionTimeoutField;
private bool connectionTimeoutFieldSet;
private string descriptionField;
private bool descriptionFieldSet;
private string directoryField;
private bool directoryFieldSet;
private string dirPropertiesField;
private bool dirPropertiesFieldSet;
private int sequenceField;
private bool sequenceFieldSet;
private string siteIdField;
private bool siteIdFieldSet;
private YesNoType startOnInstallField;
private bool startOnInstallFieldSet;
private string webApplicationField;
private bool webApplicationFieldSet;
private string webLogField;
private bool webLogFieldSet;
private ISchemaElement parentElement;
public WebSite()
{
ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebAddress)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CertificateRef)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDir)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebFilter)));
childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir)));
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 WebSite. Used within the MSI package only.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Specifies whether to automatically start the web site.
///
public YesNoType AutoStart
{
get
{
return this.autoStartField;
}
set
{
this.autoStartFieldSet = true;
this.autoStartField = value;
}
}
///
/// Specifies whether to configure the web site if it already exists. Note: This will not affect uninstall behavior. If the web site exists on uninstall, it will be removed.
///
public YesNoType ConfigureIfExists
{
get
{
return this.configureIfExistsField;
}
set
{
this.configureIfExistsFieldSet = true;
this.configureIfExistsField = value;
}
}
///
/// Sets the timeout value for connections in seconds.
///
public long ConnectionTimeout
{
get
{
return this.connectionTimeoutField;
}
set
{
this.connectionTimeoutFieldSet = true;
this.connectionTimeoutField = value;
}
}
///
/// This is the name of the web site that will show up in the IIS management console.
///
public string Description
{
get
{
return this.descriptionField;
}
set
{
this.descriptionFieldSet = true;
this.descriptionField = value;
}
}
///
/// Root directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions.
///
public string Directory
{
get
{
return this.directoryField;
}
set
{
this.directoryFieldSet = true;
this.directoryField = value;
}
}
///
/// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory.
/// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
///
public string DirProperties
{
get
{
return this.dirPropertiesField;
}
set
{
this.dirPropertiesFieldSet = true;
this.dirPropertiesField = value;
}
}
///
/// Sequence that the web site is to be created in.
///
public int Sequence
{
get
{
return this.sequenceField;
}
set
{
this.sequenceFieldSet = true;
this.sequenceField = value;
}
}
///
/// Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web
/// sites in a web garden get the same site id. If a number is provided, the site id must be unique
/// on all target machines. If "*" is used, the Description attribute will be hashed to create a unique
/// value for the site id. This value must be a positive number or a "*" or a formatted value that resolves
/// to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then
/// the web site will be located using the WebAddress element associated with the web site.
///
public string SiteId
{
get
{
return this.siteIdField;
}
set
{
this.siteIdFieldSet = true;
this.siteIdField = value;
}
}
///
/// Specifies whether to start the web site on install.
///
public YesNoType StartOnInstall
{
get
{
return this.startOnInstallField;
}
set
{
this.startOnInstallFieldSet = true;
this.startOnInstallField = value;
}
}
///
/// Reference to a WebApplication that is to be installed as part of this web site.
///
public string WebApplication
{
get
{
return this.webApplicationField;
}
set
{
this.webApplicationFieldSet = true;
this.webApplicationField = value;
}
}
///
/// Reference to WebLog definition.
///
public string WebLog
{
get
{
return this.webLogField;
}
set
{
this.webLogFieldSet = true;
this.webLogField = 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")]
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
ISchemaElement ICreateChildren.CreateChild(string childName)
{
if (String.IsNullOrEmpty(childName))
{
throw new ArgumentNullException("childName");
}
ISchemaElement childValue = null;
if (("WebAddress" == childName))
{
childValue = new WebAddress();
}
if (("WebApplication" == childName))
{
childValue = new WebApplication();
}
if (("WebDirProperties" == childName))
{
childValue = new WebDirProperties();
}
if (("MimeMap" == childName))
{
childValue = new MimeMap();
}
if (("CertificateRef" == childName))
{
childValue = new CertificateRef();
}
if (("HttpHeader" == childName))
{
childValue = new HttpHeader();
}
if (("WebDir" == childName))
{
childValue = new WebDir();
}
if (("WebError" == childName))
{
childValue = new WebError();
}
if (("WebFilter" == childName))
{
childValue = new WebFilter();
}
if (("WebVirtualDir" == childName))
{
childValue = new WebVirtualDir();
}
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("WebSite", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.autoStartFieldSet)
{
if ((this.autoStartField == YesNoType.no))
{
writer.WriteAttributeString("AutoStart", "no");
}
if ((this.autoStartField == YesNoType.yes))
{
writer.WriteAttributeString("AutoStart", "yes");
}
}
if (this.configureIfExistsFieldSet)
{
if ((this.configureIfExistsField == YesNoType.no))
{
writer.WriteAttributeString("ConfigureIfExists", "no");
}
if ((this.configureIfExistsField == YesNoType.yes))
{
writer.WriteAttributeString("ConfigureIfExists", "yes");
}
}
if (this.connectionTimeoutFieldSet)
{
writer.WriteAttributeString("ConnectionTimeout", this.connectionTimeoutField.ToString(CultureInfo.InvariantCulture));
}
if (this.descriptionFieldSet)
{
writer.WriteAttributeString("Description", this.descriptionField);
}
if (this.directoryFieldSet)
{
writer.WriteAttributeString("Directory", this.directoryField);
}
if (this.dirPropertiesFieldSet)
{
writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
}
if (this.sequenceFieldSet)
{
writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
}
if (this.siteIdFieldSet)
{
writer.WriteAttributeString("SiteId", this.siteIdField);
}
if (this.startOnInstallFieldSet)
{
if ((this.startOnInstallField == YesNoType.no))
{
writer.WriteAttributeString("StartOnInstall", "no");
}
if ((this.startOnInstallField == YesNoType.yes))
{
writer.WriteAttributeString("StartOnInstall", "yes");
}
}
if (this.webApplicationFieldSet)
{
writer.WriteAttributeString("WebApplication", this.webApplicationField);
}
if (this.webLogFieldSet)
{
writer.WriteAttributeString("WebLog", this.webLogField);
}
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 (("AutoStart" == name))
{
this.autoStartField = Enums.ParseYesNoType(value);
this.autoStartFieldSet = true;
}
if (("ConfigureIfExists" == name))
{
this.configureIfExistsField = Enums.ParseYesNoType(value);
this.configureIfExistsFieldSet = true;
}
if (("ConnectionTimeout" == name))
{
this.connectionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.connectionTimeoutFieldSet = true;
}
if (("Description" == name))
{
this.descriptionField = value;
this.descriptionFieldSet = true;
}
if (("Directory" == name))
{
this.directoryField = value;
this.directoryFieldSet = true;
}
if (("DirProperties" == name))
{
this.dirPropertiesField = value;
this.dirPropertiesFieldSet = true;
}
if (("Sequence" == name))
{
this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
this.sequenceFieldSet = true;
}
if (("SiteId" == name))
{
this.siteIdField = value;
this.siteIdFieldSet = true;
}
if (("StartOnInstall" == name))
{
this.startOnInstallField = Enums.ParseYesNoType(value);
this.startOnInstallFieldSet = true;
}
if (("WebApplication" == name))
{
this.webApplicationField = value;
this.webApplicationFieldSet = true;
}
if (("WebLog" == name))
{
this.webLogField = value;
this.webLogFieldSet = true;
}
}
}
///
/// WebLog definition.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebLog : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private TypeType typeField;
private bool typeFieldSet;
private ISchemaElement parentElement;
///
/// Identifier for the WebLog.
///
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
public TypeType Type
{
get
{
return this.typeField;
}
set
{
this.typeFieldSet = true;
this.typeField = 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;
WebLog.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 (("IIS" == value))
{
parsedValue = TypeType.IIS;
}
else
{
if (("NCSA" == value))
{
parsedValue = TypeType.NCSA;
}
else
{
if (("none" == value))
{
parsedValue = TypeType.none;
}
else
{
if (("ODBC" == value))
{
parsedValue = TypeType.ODBC;
}
else
{
if (("W3C" == value))
{
parsedValue = TypeType.W3C;
}
else
{
parsedValue = TypeType.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("WebLog", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.typeFieldSet)
{
if ((this.typeField == TypeType.IIS))
{
writer.WriteAttributeString("Type", "IIS");
}
if ((this.typeField == TypeType.NCSA))
{
writer.WriteAttributeString("Type", "NCSA");
}
if ((this.typeField == TypeType.none))
{
writer.WriteAttributeString("Type", "none");
}
if ((this.typeField == TypeType.ODBC))
{
writer.WriteAttributeString("Type", "ODBC");
}
if ((this.typeField == TypeType.W3C))
{
writer.WriteAttributeString("Type", "W3C");
}
}
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 (("Type" == name))
{
this.typeField = WebLog.ParseTypeType(value);
this.typeFieldSet = true;
}
}
[GeneratedCode("XsdGen", "4.0.0.0")]
public enum TypeType
{
IllegalValue = int.MaxValue,
NotSet = -1,
///
/// Microsoft IIS Log File Format
///
IIS,
///
/// NCSA Common Log File Format
///
NCSA,
///
/// Disables logging.
///
none,
///
/// ODBC Logging
///
ODBC,
///
/// W3C Extended Log File Format
///
W3C,
}
}
///
/// The WebServiceExtension property is used by the Web server to determine whether a Web service extension is permitted to run.
///
[GeneratedCode("XsdGen", "4.0.0.0")]
public class WebServiceExtension : ISchemaElement, ISetAttributes
{
private string idField;
private bool idFieldSet;
private string fileField;
private bool fileFieldSet;
private string descriptionField;
private bool descriptionFieldSet;
private string groupField;
private bool groupFieldSet;
private YesNoType allowField;
private bool allowFieldSet;
private YesNoType uIDeletableField;
private bool uIDeletableFieldSet;
private ISchemaElement parentElement;
public string Id
{
get
{
return this.idField;
}
set
{
this.idFieldSet = true;
this.idField = value;
}
}
///
/// Usually a Property that resolves to short file name path
///
public string File
{
get
{
return this.fileField;
}
set
{
this.fileFieldSet = true;
this.fileField = value;
}
}
///
/// Description of the extension.
///
public string Description
{
get
{
return this.descriptionField;
}
set
{
this.descriptionFieldSet = true;
this.descriptionField = value;
}
}
///
/// String used to identify groups of extensions.
///
public string Group
{
get
{
return this.groupField;
}
set
{
this.groupFieldSet = true;
this.groupField = value;
}
}
///
/// Indicates if the extension is allowed or denied.
///
public YesNoType Allow
{
get
{
return this.allowField;
}
set
{
this.allowFieldSet = true;
this.allowField = value;
}
}
///
/// Indicates if the UI is allowed to delete the extension from the list of not. Default: Not deletable.
///
[SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
public YesNoType UIDeletable
{
get
{
return this.uIDeletableField;
}
set
{
this.uIDeletableFieldSet = true;
this.uIDeletableField = 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("WebServiceExtension", "http://wixtoolset.org/schemas/v4/wxs/iis");
if (this.idFieldSet)
{
writer.WriteAttributeString("Id", this.idField);
}
if (this.fileFieldSet)
{
writer.WriteAttributeString("File", this.fileField);
}
if (this.descriptionFieldSet)
{
writer.WriteAttributeString("Description", this.descriptionField);
}
if (this.groupFieldSet)
{
writer.WriteAttributeString("Group", this.groupField);
}
if (this.allowFieldSet)
{
if ((this.allowField == YesNoType.no))
{
writer.WriteAttributeString("Allow", "no");
}
if ((this.allowField == YesNoType.yes))
{
writer.WriteAttributeString("Allow", "yes");
}
}
if (this.uIDeletableFieldSet)
{
if ((this.uIDeletableField == YesNoType.no))
{
writer.WriteAttributeString("UIDeletable", "no");
}
if ((this.uIDeletableField == YesNoType.yes))
{
writer.WriteAttributeString("UIDeletable", "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 (("File" == name))
{
this.fileField = value;
this.fileFieldSet = true;
}
if (("Description" == name))
{
this.descriptionField = value;
this.descriptionFieldSet = true;
}
if (("Group" == name))
{
this.groupField = value;
this.groupFieldSet = true;
}
if (("Allow" == name))
{
this.allowField = Enums.ParseYesNoType(value);
this.allowFieldSet = true;
}
if (("UIDeletable" == name))
{
this.uIDeletableField = Enums.ParseYesNoType(value);
this.uIDeletableFieldSet = true;
}
}
}
}