From ba3a735e21086722c64caa001d618e5505a2e656 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 5 Apr 2020 21:01:32 +1000 Subject: Modernize IIsCompiler and tuples. --- src/wixext/IIsCompiler.cs | 589 ++++++++++++--------- src/wixext/IisTableDefinitions.cs | 324 ++++++++++++ .../IisWindowsInstallerBackendBinderExtension.cs | 25 +- src/wixext/Tuples/CertificateHashTuple.cs | 10 +- src/wixext/Tuples/CertificateTuple.cs | 28 +- src/wixext/Tuples/IIsAppPoolTuple.cs | 28 +- src/wixext/Tuples/IIsFilterTuple.cs | 28 +- src/wixext/Tuples/IIsMimeMapTuple.cs | 8 - src/wixext/Tuples/IIsPropertyTuple.cs | 18 +- src/wixext/Tuples/IIsWebAddressTuple.cs | 18 +- .../Tuples/IIsWebApplicationExtensionTuple.cs | 10 +- src/wixext/Tuples/IIsWebApplicationTuple.cs | 18 +- src/wixext/Tuples/IIsWebDirPropertiesTuple.cs | 18 +- src/wixext/Tuples/IIsWebDirTuple.cs | 48 +- src/wixext/Tuples/IIsWebLogTuple.cs | 8 - src/wixext/Tuples/IIsWebServiceExtensionTuple.cs | 18 +- src/wixext/Tuples/IIsWebSiteCertificatesTuple.cs | 20 +- src/wixext/Tuples/IIsWebSiteTuple.cs | 68 ++- src/wixext/Tuples/IIsWebVirtualDirTuple.cs | 58 +- src/wixext/WixToolset.Iis.wixext.csproj | 1 - src/wixext/tables.xml | 304 ----------- 21 files changed, 803 insertions(+), 844 deletions(-) create mode 100644 src/wixext/IisTableDefinitions.cs delete mode 100644 src/wixext/tables.xml (limited to 'src/wixext') diff --git a/src/wixext/IIsCompiler.cs b/src/wixext/IIsCompiler.cs index e28435b6..f84f8f0a 100644 --- a/src/wixext/IIsCompiler.cs +++ b/src/wixext/IIsCompiler.cs @@ -8,6 +8,7 @@ namespace WixToolset.Iis using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Iis.Tuples; /// /// The compiler for the WiX Toolset Internet Information Services Extension. @@ -64,8 +65,8 @@ namespace WixToolset.Iis switch (parentElement.Name.LocalName) { case "Component": - string componentId = context["ComponentId"]; - string directoryId = context["DirectoryId"]; + var componentId = context["ComponentId"]; + var directoryId = context["DirectoryId"]; switch (element.Name.LocalName) { @@ -110,7 +111,7 @@ namespace WixToolset.Iis this.ParseWebAppPoolElement(intermediate, section, element, null); break; case "WebDirProperties": - this.ParseWebDirPropertiesElement(intermediate, section, element); + this.ParseWebDirPropertiesElement(intermediate, section, element, null); break; case "WebLog": this.ParseWebLogElement(intermediate, section, element); @@ -136,7 +137,7 @@ namespace WixToolset.Iis /// Identifier for parent component. private void ParseCertificateElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; int attributes = 0; string binaryKey = null; @@ -146,7 +147,7 @@ namespace WixToolset.Iis int storeLocation = 0; string storeName = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -158,7 +159,7 @@ namespace WixToolset.Iis case "BinaryKey": attributes |= 2; // SCA_CERT_ATTRIBUTE_BINARYDATA binaryKey = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Binary", binaryKey); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Binary, binaryKey); break; case "CertificatePath": certificatePath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); @@ -190,7 +191,7 @@ namespace WixToolset.Iis } break; case "StoreLocation": - string storeLocationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + var storeLocationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); if (0 < storeLocationValue.Length) { switch (storeLocationValue) @@ -209,7 +210,7 @@ namespace WixToolset.Iis } break; case "StoreName": - string storeNameValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + var storeNameValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); if (0 < storeNameValue.Length) { switch (storeNameValue) @@ -256,7 +257,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("crt", componentId, binaryKey, certificatePath); } if (null == name) @@ -286,21 +287,23 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference InstallCertificates and UninstallCertificates since nothing will happen without them - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "InstallCertificates"); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "UninstallCertificates"); - this.ParseHelper.EnsureTable(section, sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "InstallCertificates"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "UninstallCertificates"); + this.ParseHelper.EnsureTable(section, sourceLineNumbers, IisTableDefinitions.CertificateHash); // Certificate CustomActions require the CertificateHash table if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Certificate", id); - row.Set(1, componentId); - row.Set(2, name); - row.Set(3, storeLocation); - row.Set(4, storeName); - row.Set(5, attributes); - row.Set(6, binaryKey); - row.Set(7, certificatePath); - row.Set(8, pfxPassword); + section.AddTuple(new CertificateTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + Name = name, + StoreLocation = storeLocation, + StoreName = storeName, + Attributes = attributes, + BinaryRef = binaryKey, + CertificatePath = certificatePath, + PFXPassword = pfxPassword, + }); } } @@ -311,10 +314,10 @@ namespace WixToolset.Iis /// Identifier for parent web site. private void ParseCertificateRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string webId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -322,7 +325,7 @@ namespace WixToolset.Iis { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.Certificate, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -337,18 +340,20 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("wsc", webId); } this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.Certificate, id.Id); - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSiteCertificates"); - row.Set(0, webId); - row.Set(1, id.Id); + section.AddTuple(new IIsWebSiteCertificatesTuple(sourceLineNumbers) + { + WebRef = webId, + CertificateRef = id.Id, + }); } } @@ -360,12 +365,12 @@ namespace WixToolset.Iis /// Type that parentId refers to. private void ParseMimeMapElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentId, MimeMapParentType parentType) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string extension = null; string type = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -393,7 +398,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("imm", parentId, type, extension); } if (null == extension) @@ -417,11 +422,13 @@ namespace WixToolset.Iis if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsMimeMap", id); - row.Set(1, (int)parentType); - row.Set(2, parentId); - row.Set(3, type); - row.Set(4, extension); + section.AddTuple(new IIsMimeMapTuple(sourceLineNumbers, id) + { + ParentType = (int)parentType, + ParentValue = parentId, + MimeType = type, + Extension = extension, + }); } } @@ -432,10 +439,10 @@ namespace WixToolset.Iis /// Recycle time value. private string ParseRecycleTimeElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string value = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -473,14 +480,14 @@ namespace WixToolset.Iis /// Identifier for web address. private string ParseWebAddressElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentWeb) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string header = null; string ip = null; string port = null; - bool secure = false; + var secure = false; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -514,7 +521,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("iwa", parentWeb, ip, port); } if (null == port) @@ -526,12 +533,14 @@ namespace WixToolset.Iis if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebAddress", id); - row.Set(1, parentWeb); - row.Set(2, ip); - row.Set(3, port); - row.Set(4, header); - row.Set(5, secure ? 1 : 0); + section.AddTuple(new IIsWebAddressTuple(sourceLineNumbers, id) + { + WebRef = parentWeb, + IP = ip, + Port = port, + Header = header, + Secure = secure ? 1 : 0, + }); } return id?.Id; @@ -544,21 +553,21 @@ namespace WixToolset.Iis /// Identifier for web application. private string ParseWebApplicationElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; - YesNoDefaultType allowSessions = YesNoDefaultType.Default; + var allowSessions = YesNoDefaultType.Default; string appPool = null; - YesNoDefaultType buffer = YesNoDefaultType.Default; - YesNoDefaultType clientDebugging = YesNoDefaultType.Default; + var buffer = YesNoDefaultType.Default; + var clientDebugging = YesNoDefaultType.Default; string defaultScript = null; int isolation = 0; string name = null; - YesNoDefaultType parentPaths = YesNoDefaultType.Default; - int scriptTimeout = CompilerConstants.IntegerNotSet; - int sessionTimeout = CompilerConstants.IntegerNotSet; - YesNoDefaultType serverDebugging = YesNoDefaultType.Default; + var parentPaths = YesNoDefaultType.Default; + var scriptTimeout = CompilerConstants.IntegerNotSet; + var sessionTimeout = CompilerConstants.IntegerNotSet; + var serverDebugging = YesNoDefaultType.Default; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -630,7 +639,7 @@ namespace WixToolset.Iis break; case "WebAppPool": appPool = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsAppPool", appPool); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsAppPool, appPool); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -645,7 +654,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("wap", name, appPool); } if (null == name) @@ -657,11 +666,10 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, element.Name.LocalName, "Name", name, '\\')); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "WebApplicationExtension": @@ -680,44 +688,48 @@ namespace WixToolset.Iis if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplication", id); - row.Set(1, name); - row.Set(2, isolation); + var tuple = section.AddTuple(new IIsWebApplicationTuple(sourceLineNumbers, id) + { + Name = name, + Isolation = isolation, + DefaultScript = defaultScript, + AppPoolRef = appPool, + }); + if (YesNoDefaultType.Default != allowSessions) { - row.Set(3, YesNoDefaultType.Yes == allowSessions ? 1 : 0); + tuple.AllowSessions = YesNoDefaultType.Yes == allowSessions ? 1 : 0; } if (CompilerConstants.IntegerNotSet != sessionTimeout) { - row.Set(4, sessionTimeout); + tuple.SessionTimeout = sessionTimeout; } if (YesNoDefaultType.Default != buffer) { - row.Set(5, YesNoDefaultType.Yes == buffer ? 1 : 0); + tuple.Buffer = YesNoDefaultType.Yes == buffer ? 1 : 0; } if (YesNoDefaultType.Default != parentPaths) { - row.Set(6, YesNoDefaultType.Yes == parentPaths ? 1 : 0); + tuple.ParentPaths = YesNoDefaultType.Yes == parentPaths ? 1 : 0; } - row.Set(7, defaultScript); + if (CompilerConstants.IntegerNotSet != scriptTimeout) { - row.Set(8, scriptTimeout); + tuple.ScriptTimeout = scriptTimeout; } if (YesNoDefaultType.Default != serverDebugging) { - row.Set(9, YesNoDefaultType.Yes == serverDebugging ? 1 : 0); + tuple.ServerDebugging = YesNoDefaultType.Yes == serverDebugging ? 1 : 0; } if (YesNoDefaultType.Default != clientDebugging) { - row.Set(10, YesNoDefaultType.Yes == clientDebugging ? 1 : 0); + tuple.ClientDebugging = YesNoDefaultType.Yes == clientDebugging ? 1 : 0; } - row.Set(11, appPool); } return id?.Id; @@ -730,13 +742,13 @@ namespace WixToolset.Iis /// Identifier for parent web application. private void ParseWebApplicationExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string application) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); int attributes = 0; string executable = null; string extension = null; string verbs = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -786,14 +798,17 @@ namespace WixToolset.Iis if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplicationExtension"); - row.Set(0, application); - row.Set(1, extension); - row.Set(2, verbs); - row.Set(3, executable); + var tuple = section.AddTuple(new IIsWebApplicationExtensionTuple(sourceLineNumbers) + { + ApplicationRef = application, + Extension = extension, + Verbs = verbs, + Executable = executable, + }); + if (0 < attributes) { - row.Set(4, attributes); + tuple.Attributes = attributes; } } } @@ -805,27 +820,27 @@ namespace WixToolset.Iis /// Optional identifier of parent component. private void ParseWebAppPoolElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; int attributes = 0; - int cpuAction = CompilerConstants.IntegerNotSet; + var cpuAction = CompilerConstants.IntegerNotSet; string cpuMon = null; - int idleTimeout = CompilerConstants.IntegerNotSet; + var idleTimeout = CompilerConstants.IntegerNotSet; int maxCpuUsage = 0; - int maxWorkerProcs = CompilerConstants.IntegerNotSet; + var maxWorkerProcs = CompilerConstants.IntegerNotSet; string managedRuntimeVersion = null; string managedPipelineMode = null; string name = null; - int privateMemory = CompilerConstants.IntegerNotSet; - int queueLimit = CompilerConstants.IntegerNotSet; - int recycleMinutes = CompilerConstants.IntegerNotSet; - int recycleRequests = CompilerConstants.IntegerNotSet; + var privateMemory = CompilerConstants.IntegerNotSet; + var queueLimit = CompilerConstants.IntegerNotSet; + var recycleMinutes = CompilerConstants.IntegerNotSet; + var recycleRequests = CompilerConstants.IntegerNotSet; string recycleTimes = null; - int refreshCpu = CompilerConstants.IntegerNotSet; + var refreshCpu = CompilerConstants.IntegerNotSet; string user = null; - int virtualMemory = CompilerConstants.IntegerNotSet; + var virtualMemory = CompilerConstants.IntegerNotSet; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -840,7 +855,7 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); } - string cpuActionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + var cpuActionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); if (0 < cpuActionValue.Length) { switch (cpuActionValue) @@ -863,7 +878,7 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName)); } - string identityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + var identityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); if (0 < identityValue.Length) { switch (identityValue) @@ -1029,7 +1044,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("iap", name, componentId, user); } if (null == name) @@ -1057,7 +1072,7 @@ namespace WixToolset.Iis } } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { @@ -1066,7 +1081,7 @@ namespace WixToolset.Iis case "RecycleTime": if (null == componentId) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); + var childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, element.Name.LocalName)); } @@ -1093,52 +1108,57 @@ namespace WixToolset.Iis if (null != componentId) { // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); } if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsAppPool", id); - row.Set(1, name); - row.Set(2, componentId); - row.Set(3, attributes); - row.Set(4, user); + var tuple = section.AddTuple(new IIsAppPoolTuple(sourceLineNumbers, id) + { + Name = name, + ComponentRef = componentId, + Attributes = attributes, + UserRef = user, + RecycleTimes = recycleTimes, + CPUMon = cpuMon, + ManagedRuntimeVersion = managedRuntimeVersion, + ManagedPipelineMode = managedPipelineMode, + }); + if (CompilerConstants.IntegerNotSet != recycleMinutes) { - row.Set(5, recycleMinutes); + tuple.RecycleMinutes = recycleMinutes; } if (CompilerConstants.IntegerNotSet != recycleRequests) { - row.Set(6, recycleRequests); + tuple.RecycleRequests = recycleRequests; } - row.Set(7, recycleTimes); + if (CompilerConstants.IntegerNotSet != idleTimeout) { - row.Set(8, idleTimeout); + tuple.IdleTimeout = idleTimeout; } if (CompilerConstants.IntegerNotSet != queueLimit) { - row.Set(9, queueLimit); + tuple.QueueLimit = queueLimit; } - row.Set(10, cpuMon); + if (CompilerConstants.IntegerNotSet != maxWorkerProcs) { - row.Set(11, maxWorkerProcs); + tuple.MaxProc = maxWorkerProcs; } if (CompilerConstants.IntegerNotSet != virtualMemory) { - row.Set(12, virtualMemory); + tuple.VirtualMemory = virtualMemory; } if (CompilerConstants.IntegerNotSet != privateMemory) { - row.Set(13, privateMemory); + tuple.PrivateMemory = privateMemory; } - row.Set(14, managedRuntimeVersion); - row.Set(15, managedPipelineMode); } } @@ -1150,13 +1170,13 @@ namespace WixToolset.Iis /// Optional identifier for parent web site. private void ParseWebDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string dirProperties = null; string path = null; string application = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1181,7 +1201,7 @@ namespace WixToolset.Iis } parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebSite, parentWeb); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -1196,7 +1216,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("iwd", componentId, parentWeb, dirProperties, application); } if (null == path) @@ -1209,11 +1229,11 @@ namespace WixToolset.Iis this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "WebSite")); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); + var childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "WebApplication": @@ -1230,7 +1250,7 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); } - string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child); + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child, componentId); if (null == dirProperties) { dirProperties = childWebDirProperties; @@ -1258,22 +1278,24 @@ namespace WixToolset.Iis if (null != application) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebApplication, application); } - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebDirProperties, dirProperties); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDir", id); - row.Set(1, componentId); - row.Set(2, parentWeb); - row.Set(3, path); - row.Set(4, dirProperties); - row.Set(5, application); + section.AddTuple(new IIsWebDirTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + WebRef = parentWeb, + Path = path, + DirPropertiesRef = dirProperties, + ApplicationRef = application, + }); } } @@ -1282,29 +1304,29 @@ namespace WixToolset.Iis /// /// Element to parse. /// The identifier for this WebDirProperties. - private string ParseWebDirPropertiesElement(Intermediate intermediate, IntermediateSection section, XElement element) + private string ParseWebDirPropertiesElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; int access = 0; - bool accessSet = false; + var accessSet = false; int accessSSLFlags = 0; - bool accessSSLFlagsSet = false; + var accessSSLFlagsSet = false; string anonymousUser = null; - YesNoType aspDetailedError = YesNoType.NotSet; + var aspDetailedError = YesNoType.NotSet; string authenticationProviders = null; int authorization = 0; - bool authorizationSet = false; + var authorizationSet = false; string cacheControlCustom = null; - long cacheControlMaxAge = CompilerConstants.LongNotSet; + var cacheControlMaxAge = CompilerConstants.LongNotSet; string defaultDocuments = null; string httpExpires = null; - bool iisControlledPassword = false; - YesNoType index = YesNoType.NotSet; - YesNoType logVisits = YesNoType.NotSet; - YesNoType notCustomError = YesNoType.NotSet; + var iisControlledPassword = false; + var index = YesNoType.NotSet; + var logVisits = YesNoType.NotSet; + var notCustomError = YesNoType.NotSet; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1520,58 +1542,73 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + if (null == componentId) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = Identifier.Invalid; + } + else + { + id = this.ParseHelper.CreateIdentifier("wdp", componentId); + } } this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDirProperties", id); + var tuple = section.AddTuple(new IIsWebDirPropertiesTuple(sourceLineNumbers, id) + { + AnonymousUserRef = anonymousUser, + IIsControlledPassword = iisControlledPassword ? 1 : 0, + DefaultDoc = defaultDocuments, + HttpExpires = httpExpires, + CacheControlCustom = cacheControlCustom, + }); + if (accessSet) { - row.Set(1, access); + tuple.Access = access; } if (authorizationSet) { - row.Set(2, authorization); + tuple.Authorization = authorization; } - row.Set(3, anonymousUser); - row.Set(4, iisControlledPassword ? 1 : 0); + if (YesNoType.NotSet != logVisits) { - row.Set(5, YesNoType.Yes == logVisits ? 1 : 0); + tuple.LogVisits = YesNoType.Yes == logVisits ? 1 : 0; } if (YesNoType.NotSet != index) { - row.Set(6, YesNoType.Yes == index ? 1 : 0); + tuple.Index = YesNoType.Yes == index ? 1 : 0; } - row.Set(7, defaultDocuments); + if (YesNoType.NotSet != aspDetailedError) { - row.Set(8, YesNoType.Yes == aspDetailedError ? 1 : 0); + tuple.AspDetailedError = YesNoType.Yes == aspDetailedError ? 1 : 0; } - row.Set(9, httpExpires); + if (CompilerConstants.LongNotSet != cacheControlMaxAge) { - row.Set(10, unchecked((int)cacheControlMaxAge)); + tuple.CacheControlMaxAge = unchecked((int)cacheControlMaxAge); } - row.Set(11, cacheControlCustom); + if (YesNoType.NotSet != notCustomError) { - row.Set(12, YesNoType.Yes == notCustomError ? 1 : 0); + tuple.NoCustomError = YesNoType.Yes == notCustomError ? 1 : 0; } if (accessSSLFlagsSet) { - row.Set(13, accessSSLFlags); + tuple.AccessSSLFlags = accessSSLFlags; } if (null != authenticationProviders) { - row.Set(14, authenticationProviders); + tuple.AuthenticationProviders = authenticationProviders; } } @@ -1586,13 +1623,13 @@ namespace WixToolset.Iis /// Id of the parent. private void ParseWebErrorElement(Intermediate intermediate, IntermediateSection section, XElement element, WebErrorParentType parentType, string parent) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - int errorCode = CompilerConstants.IntegerNotSet; + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var errorCode = CompilerConstants.IntegerNotSet; string file = null; string url = null; - int subCode = CompilerConstants.IntegerNotSet; + var subCode = CompilerConstants.IntegerNotSet; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1641,17 +1678,19 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebError"); - row.Set(0, errorCode); - row.Set(1, subCode); - row.Set(2, (int)parentType); - row.Set(3, parent); - row.Set(4, file); - row.Set(5, url); + section.AddTuple(new IIsWebErrorTuple(sourceLineNumbers) + { + ErrorCode = errorCode, + SubCode = subCode, + ParentType = (int)parentType, + ParentValue = parent, + File = file, + URL = url, + }); } } @@ -1663,15 +1702,15 @@ namespace WixToolset.Iis /// Optional identifier of parent web site. private void ParseWebFilterElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string description = null; int flags = 0; - int loadOrder = CompilerConstants.IntegerNotSet; + var loadOrder = CompilerConstants.IntegerNotSet; string name = null; string path = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1717,7 +1756,7 @@ namespace WixToolset.Iis } parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebSite, parentWeb); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -1732,7 +1771,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("ifl", name, componentId, path, parentWeb); } if (null == name) @@ -1748,20 +1787,23 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsFilter", id); - row.Set(1, name); - row.Set(2, componentId); - row.Set(3, path); - row.Set(4, parentWeb); - row.Set(5, description); - row.Set(6, flags); + var tuple = section.AddTuple(new IIsFilterTuple(sourceLineNumbers, id) + { + Name = name, + ComponentRef = componentId, + Path = path, + WebRef = parentWeb, + Description = description, + Flags = flags, + }); + if (CompilerConstants.IntegerNotSet != loadOrder) { - row.Set(7, loadOrder); + tuple.LoadOrder = loadOrder; } } } @@ -1772,11 +1814,11 @@ namespace WixToolset.Iis /// Node to be parsed. private void ParseWebLogElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string type = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1786,7 +1828,7 @@ namespace WixToolset.Iis id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "Type": - string typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + var typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); if (0 < typeValue.Length) { switch (typeValue) @@ -1837,8 +1879,10 @@ namespace WixToolset.Iis if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebLog", id); - row.Set(1, type); + section.AddTuple(new IIsWebLogTuple(sourceLineNumbers, id) + { + Format = type, + }); } } @@ -1849,11 +1893,11 @@ namespace WixToolset.Iis /// Identifier for parent component. private void ParseWebPropertyElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string value = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -1902,14 +1946,16 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsProperty", id); - row.Set(1, componentId); - row.Set(2, 0); - row.Set(3, value); + section.AddTuple(new IIsPropertyTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + Attributes = 0, + Value = value, + }); } } @@ -1920,7 +1966,7 @@ namespace WixToolset.Iis /// Identifier for parent component. private void ParseWebServiceExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; int attributes = 0; string description = null; @@ -1978,7 +2024,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("iwe", componentId, file); } if (null == file) @@ -1989,16 +2035,18 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebServiceExtension", id); - row.Set(1, componentId); - row.Set(2, file); - row.Set(3, description); - row.Set(4, group); - row.Set(5, attributes); + section.AddTuple(new IIsWebServiceExtensionTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + File = file, + Description = description, + Group = group, + Attributes = attributes, + }); } } @@ -2009,21 +2057,21 @@ namespace WixToolset.Iis /// Optional identifier of parent component. private void ParseWebSiteElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string application = null; int attributes = 0; - int connectionTimeout = CompilerConstants.IntegerNotSet; + var connectionTimeout = CompilerConstants.IntegerNotSet; string description = null; string directory = null; string dirProperties = null; string keyAddress = null; string log = null; string siteId = null; - int sequence = CompilerConstants.IntegerNotSet; - int state = CompilerConstants.IntegerNotSet; + var sequence = CompilerConstants.IntegerNotSet; + var state = CompilerConstants.IntegerNotSet; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -2070,7 +2118,7 @@ namespace WixToolset.Iis break; case "Directory": directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, directory); break; case "DirProperties": if (null == componentId) @@ -2121,7 +2169,7 @@ namespace WixToolset.Iis } log = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebLog", log); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebLog, log); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -2136,7 +2184,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("iws", description, componentId, siteId, application); } if (null == description) @@ -2149,11 +2197,11 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, element.Name.LocalName, "Directory")); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); + var childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "CertificateRef": @@ -2206,7 +2254,7 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); } - string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child); + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child, componentId); if (null == dirProperties) { dirProperties = childWebDirProperties; @@ -2262,48 +2310,53 @@ namespace WixToolset.Iis if (null != application) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebApplication, application); } if (null != dirProperties) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebDirProperties, dirProperties); } if (null != componentId) { // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); } if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSite", id); - row.Set(1, componentId); - row.Set(2, description); + var tuple = section.AddTuple(new IIsWebSiteTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + Description = description, + DirectoryRef = directory, + KeyAddressRef = keyAddress, + DirPropertiesRef = dirProperties, + ApplicationRef = application, + LogRef = log, + WebsiteId = siteId, + }); + if (CompilerConstants.IntegerNotSet != connectionTimeout) { - row.Set(3, connectionTimeout); + tuple.ConnectionTimeout = connectionTimeout; } - row.Set(4, directory); + if (CompilerConstants.IntegerNotSet != state) { - row.Set(5, state); + tuple.State = state; } if (0 != attributes) { - row.Set(6, attributes); + tuple.Attributes = attributes; } - row.Set(7, keyAddress); - row.Set(8, dirProperties); - row.Set(9, application); + if (CompilerConstants.IntegerNotSet != sequence) { - row.Set(10, sequence); + tuple.Sequence = sequence; } - row.Set(11, log); - row.Set(12, siteId); } } @@ -2315,12 +2368,12 @@ namespace WixToolset.Iis /// Id of the parent. private void ParseHttpHeaderElement(Intermediate intermediate, IntermediateSection section, XElement element, HttpHeaderParentType parentType, string parent) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string headerName = null; string headerValue = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -2358,15 +2411,20 @@ namespace WixToolset.Iis this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); - - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsHttpHeader", id); - row.Set(1, (int)parentType); - row.Set(2, parent); - row.Set(3, headerName); - row.Set(4, headerValue); - row.Set(5, 0); - //row.Set(6, null); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); + + if (!this.Messaging.EncounteredError) + { + section.AddTuple(new IIsHttpHeaderTuple(sourceLineNumbers, id) + { + HttpHeader = id.Id, + ParentType = (int)parentType, + ParentValue = parent, + Name = headerName, + Value = headerValue, + Attributes = 0, + }); + } } /// @@ -2378,14 +2436,14 @@ namespace WixToolset.Iis /// Alias of the parent web site. private void ParseWebVirtualDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb, string parentAlias) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string alias = null; string application = null; string directory = null; string dirProperties = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -2399,7 +2457,7 @@ namespace WixToolset.Iis break; case "Directory": directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, directory); break; case "DirProperties": dirProperties = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); @@ -2414,7 +2472,7 @@ namespace WixToolset.Iis } parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebSite, parentWeb); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -2429,7 +2487,7 @@ namespace WixToolset.Iis if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("wvd", alias, directory, dirProperties, application, parentWeb); } if (null == alias) @@ -2461,11 +2519,11 @@ namespace WixToolset.Iis alias = String.Concat(parentAlias, "/", alias); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); + var childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "WebApplication": @@ -2482,7 +2540,7 @@ namespace WixToolset.Iis this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); } - string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child); + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child, componentId); if (null == dirProperties) { dirProperties = childWebDirProperties; @@ -2518,27 +2576,34 @@ namespace WixToolset.Iis if (null != dirProperties) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebDirProperties, dirProperties); } if (null != application) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, IisTupleDefinitions.IIsWebApplication, application); } // Reference ConfigureIIs since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs"); + this.AddReferenceToConfigureIIs(section, sourceLineNumbers); if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebVirtualDir", id); - row.Set(1, componentId); - row.Set(2, parentWeb); - row.Set(3, alias); - row.Set(4, directory); - row.Set(5, dirProperties); - row.Set(6, application); + section.AddTuple(new IIsWebVirtualDirTuple(sourceLineNumbers, id) + { + ComponentRef = componentId, + WebRef = parentWeb, + Alias = alias, + DirectoryRef = directory, + DirPropertiesRef = dirProperties, + ApplicationRef = application, + }); } } + + private void AddReferenceToConfigureIIs(IntermediateSection section, SourceLineNumber sourceLineNumbers) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "ConfigureIIs"); + } } } diff --git a/src/wixext/IisTableDefinitions.cs b/src/wixext/IisTableDefinitions.cs new file mode 100644 index 00000000..eebfd26a --- /dev/null +++ b/src/wixext/IisTableDefinitions.cs @@ -0,0 +1,324 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Iis +{ + using WixToolset.Data.WindowsInstaller; + + public static class IisTableDefinitions + { + public static readonly TableDefinition Certificate = new TableDefinition( + "Certificate", + new[] + { + new ColumnDefinition("Certificate", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyColumn: 1, description: "Identifier for the certificate in the package.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, description: "Foreign key into the Component table used to determine install state", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name to be used for the Certificate."), + new ColumnDefinition("StoreLocation", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 1, maxValue: 2, description: "Location of the target certificate store (CurrentUser == 1, LocalMachine == 2)"), + new ColumnDefinition("StoreName", ColumnType.String, 64, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name of the target certificate store"), + new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "Attributes of the certificate"), + new ColumnDefinition("Binary_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Binary", keyColumn: 1, description: "Identifier to Binary table containing certificate.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("CertificatePath", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Property to path of certificate.", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("PFXPassword", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Hidden property to a pfx password", modularizeType: ColumnModularizeType.Property), + }, + tupleDefinitionName: "Certificate", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition CertificateHash = new TableDefinition( + "CertificateHash", + new[] + { + new ColumnDefinition("Certificate_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyColumn: 1, description: "Foreign key to certificate in Certificate table.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Hash", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Base64 encoded SHA1 hash of certificate populated at run-time."), + }, + tupleDefinitionName: "CertificateHash", + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition IIsWebSiteCertificates = new TableDefinition( + "IIsWebSiteCertificates", + new[] + { + new ColumnDefinition("Web_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebSite", keyColumn: 1, description: "The index into the IIsWebSite table.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Certificate_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Text, keyTable: "Certificate", keyColumn: 1, description: "The index into the Certificate table.", modularizeType: ColumnModularizeType.Column), + }, + tupleDefinitionName: "IIsWebSiteCertificates", + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition IIsAppPool = new TableDefinition( + "IIsAppPool", + new[] + { + new ColumnDefinition("AppPool", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token for apppool", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name to be used for the IIs AppPool.", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the app pool", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, description: "Attributes of the AppPool"), + new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "User account to run the app pool as", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("RecycleMinutes", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Number of minutes between recycling app pool"), + new ColumnDefinition("RecycleRequests", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Number of requests between recycling app pool"), + new ColumnDefinition("RecycleTimes", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Times to recycle app pool (comma delimited - i.e. 1:45,13:30)"), + new ColumnDefinition("IdleTimeout", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Amount of idle time before shutting down"), + new ColumnDefinition("QueueLimit", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Reject requests after queue gets how large"), + new ColumnDefinition("CPUMon", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "CPUMon is a comma delimeted list of the following format: ,,. The values for Action are 1 (Shutdown) and 0 (No Action)."), + new ColumnDefinition("MaxProc", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Maximum number of processes to use"), + new ColumnDefinition("VirtualMemory", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Amount of virtual memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this field is 4,294,967 KB."), + new ColumnDefinition("PrivateMemory", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Amount of private memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this field is 4,294,967 KB."), + new ColumnDefinition("ManagedRuntimeVersion", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Specifies the .NET Framework version to be used by the application pool."), + new ColumnDefinition("ManagedPipelineMode", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Specifies the request-processing mode that is used to process requests for managed content."), + }, + tupleDefinitionName: "IIsAppPool", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsMimeMap = new TableDefinition( + "IIsMimeMap", + new[] + { + new ColumnDefinition("MimeMap", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token for Mime Map definitions", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("ParentType", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, possibilities: "1;2", description: "Type of parent: 1=vdir 2=website"), + new ColumnDefinition("ParentValue", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, description: "Name of the parent value.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("MimeType", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Mime-type covered by the MimeMap."), + new ColumnDefinition("Extension", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Extension covered by the MimeMap."), + }, + tupleDefinitionName: "IIsMimeMap", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsProperty = new TableDefinition( + "IIsProperty", + new[] + { + new ColumnDefinition("Property", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Unique name of the IIsProperty"), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Component that the property is linked to", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, description: "Attributes of the IIsProperty (unused)"), + new ColumnDefinition("Value", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Value of the IIsProperty"), + }, + tupleDefinitionName: "IIsProperty", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebDirProperties = new TableDefinition( + "IIsWebDirProperties", + new[] + { + new ColumnDefinition("DirProperties", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token for Web Properties", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Access", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Access rights to the web server"), + new ColumnDefinition("Authorization", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Authorization policy to web server (anonymous access, NTLM, etc)"), + new ColumnDefinition("AnonymousUser_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("IIsControlledPassword", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether IIs is allowed to set the AnonymousUser_ password"), + new ColumnDefinition("LogVisits", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether IIs tracks all access to the directory"), + new ColumnDefinition("Index", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether IIs searches the directory"), + new ColumnDefinition("DefaultDoc", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Comma delimited list of file names to act as a default document"), + new ColumnDefinition("AspDetailedError", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether detailed ASP errors are sent to browser"), + new ColumnDefinition("HttpExpires", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Value to set the HttpExpires attribute to for a Web Dir in the metabase"), + new ColumnDefinition("CacheControlMaxAge", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Integer value specifying the cache control maximum age value."), + new ColumnDefinition("CacheControlCustom", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Custom HTTP 1.1 cache control directives."), + new ColumnDefinition("NoCustomError", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether IIs will return custom errors for this directory."), + new ColumnDefinition("AccessSSLFlags", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Specifies AccessSSLFlags IIS metabase property."), + new ColumnDefinition("AuthenticationProviders", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others."), + }, + tupleDefinitionName: "IIsWebDirProperties", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebAddress = new TableDefinition( + "IIsWebAddress", + new[] + { + new ColumnDefinition("Address", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Web_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebSite", keyColumn: 1, description: "Foreign key referencing Web that uses the address.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("IP", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "String representing IP address (#.#.#.#) or NT machine name (fooserver)", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Port", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Port web site listens on", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Header", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Special header information for the web site"), + new ColumnDefinition("Secure", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether SSL is used to communicate with web site"), + }, + tupleDefinitionName: "IIsWebAddress", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebSite = new TableDefinition( + "IIsWebSite", + new[] + { + new ColumnDefinition("Web", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the web site", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Description", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Description displayed in IIS MMC applet"), + new ColumnDefinition("ConnectionTimeout", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Time connection is maintained without activity (in seconds)"), + new ColumnDefinition("Directory_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Directory", keyColumn: 1, description: "Foreign key referencing directory that the web site points at", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("State", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1;2", description: "Sets intial state of web site"), + new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "2", description: "Control the install behavior of web site"), + new ColumnDefinition("KeyAddress_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebAddress", keyColumn: 1, description: "Foreign key referencing primary address for the web site", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("DirProperties_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebDirProperties", keyColumn: 1, description: "Foreign key referencing possible security information for the web site", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebApplication", keyColumn: 1, description: "Foreign key referencing possible ASP application for the web site.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Sequence", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Allows ordering of web site install"), + new ColumnDefinition("Log_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Unknown, keyTable: "IIsWebLog", keyColumn: 1, description: "Foreign key reference to IIsWebLog data", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Id", ColumnType.String, 74, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Optional number or formatted value that resolves to number that acts as the WebSite Id."), + }, + tupleDefinitionName: "IIsWebSite", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebApplication = new TableDefinition( + "IIsWebApplication", + new[] + { + new ColumnDefinition("Application", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token for ASP Application", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Name", ColumnType.Localized, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name of application in IIS MMC applet", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Isolation", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, possibilities: "0;1;2", description: "Isolation level for ASP Application: 0 == Low, 2 == Medium, 1 == High"), + new ColumnDefinition("AllowSessions", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether application may maintain session state"), + new ColumnDefinition("SessionTimeout", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Time session state is maintained without user interaction"), + new ColumnDefinition("Buffer", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether application buffers its output"), + new ColumnDefinition("ParentPaths", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "What is this for anyway?"), + new ColumnDefinition("DefaultScript", ColumnType.String, 26, primaryKey: false, nullable: true, ColumnCategory.Text, possibilities: "VBScript;JScript", description: "Default scripting language for ASP applications"), + new ColumnDefinition("ScriptTimeout", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Time ASP application page is permitted to process"), + new ColumnDefinition("ServerDebugging", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether to allow ASP server-side script debugging"), + new ColumnDefinition("ClientDebugging", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "0;1", description: "Specifies whether to allow ASP client-side script debugging"), + new ColumnDefinition("AppPool_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsAppPool", keyColumn: 1, description: "App Pool this application should run under", modularizeType: ColumnModularizeType.Column), + }, + tupleDefinitionName: "IIsWebApplication", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebApplicationExtension = new TableDefinition( + "IIsWebApplicationExtension", + new[] + { + new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebApplication", keyColumn: 1, description: "Foreign key referencing possible ASP application for the web site", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Extension", ColumnType.String, 255, primaryKey: true, nullable: true, ColumnCategory.Text, description: "Primary key, Extension that should be registered for this ASP application"), + new ColumnDefinition("Verbs", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Comma delimited list of HTTP verbs the extension should be registered with"), + new ColumnDefinition("Executable", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Path to extension (usually file property: [#file])", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, possibilities: "1;4;5", description: "Attributes for extension: 1 == Script, 4 == Check Path Info"), + }, + tupleDefinitionName: "IIsWebApplicationExtension", + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition IIsFilter = new TableDefinition( + "IIsFilter", + new[] + { + new ColumnDefinition("Filter", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Unknown, description: "Name of the ISAPI Filter in IIS"), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the filter", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Path", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Path to filter (usually file property: [#file])", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Web_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebSite", keyColumn: 1, description: "Foreign key referencing web site that loads the filter (NULL == global filter", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Description", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Description displayed in IIS MMC applet"), + new ColumnDefinition("Flags", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "What do all these numbers mean?"), + new ColumnDefinition("LoadOrder", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "-1 == last in order, 0 == first in order, # == place in order"), + }, + tupleDefinitionName: "IIsFilter", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebDir = new TableDefinition( + "IIsWebDir", + new[] + { + new ColumnDefinition("WebDir", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Web_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebSite", keyColumn: 1, description: "Foreign key referencing web site that controls the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Path", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name of web directory displayed in IIS MMC applet", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("DirProperties_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebDirProperties", keyColumn: 1, description: "Foreign key referencing possible security information for the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebApplication", keyColumn: 1, description: "Foreign key referencing possible ASP application for the virtual directory. This column is currently unused, but maintained for compatibility reasons.", modularizeType: ColumnModularizeType.Column), + }, + tupleDefinitionName: "IIsWebDir", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebError = new TableDefinition( + "IIsWebError", + new[] + { + new ColumnDefinition("ErrorCode", ColumnType.Number, 2, primaryKey: true, nullable: false, ColumnCategory.Unknown, minValue: 400, maxValue: 599, description: "HTTP status code indicating error."), + new ColumnDefinition("SubCode", ColumnType.Number, 4, primaryKey: true, nullable: false, ColumnCategory.Unknown, description: "HTTP sub-status code indicating error."), + new ColumnDefinition("ParentType", ColumnType.Number, 2, primaryKey: true, nullable: false, ColumnCategory.Unknown, possibilities: "1;2", description: "Type of parent: 1=vdir, 2=web"), + new ColumnDefinition("ParentValue", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Name of the parent value.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Path to file for this custom error (usually file property: [#file]). Must be null if URL is not null."), + new ColumnDefinition("URL", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "URL for this custom error. Must be null if File is not null."), + }, + tupleDefinitionName: "IIsWebError", + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition IIsHttpHeader = new TableDefinition( + "IIsHttpHeader", + new[] + { + new ColumnDefinition("HttpHeader", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("ParentType", ColumnType.Number, 2, primaryKey: true, nullable: false, ColumnCategory.Unknown, possibilities: "1;2", description: "Type of parent: 1=vdir, 2=web"), + new ColumnDefinition("ParentValue", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Name of the parent value.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Name of the HTTP Header"), + new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "URL for this custom error. Must be null if File is not null."), + new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 0, description: "Attributes for HTTP Header: none"), + new ColumnDefinition("Sequence", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Order to add the HTTP Headers."), + }, + tupleDefinitionName: "IIsHttpHeader", + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition IIsWebServiceExtension = new TableDefinition( + "IIsWebServiceExtension", + new[] + { + new ColumnDefinition("WebServiceExtension", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the WebServiceExtension handler", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Path to handler (usually file property: [#file])", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Description", ColumnType.Localized, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Description displayed in WebServiceExtension Wizard", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Group", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "String used to identify groups of extensions.", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Attributes", ColumnType.Number, 1, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 3, description: "Attributes for WebServiceExtension: 1 = Allow, 2 = UIDeletable"), + }, + tupleDefinitionName: "IIsWebServiceExtension", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebVirtualDir = new TableDefinition( + "IIsWebVirtualDir", + new[] + { + new ColumnDefinition("VirtualDir", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key referencing Component that controls the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Web_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "IIsWebSite", keyColumn: 1, description: "Foreign key referencing web site that controls the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Alias", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Name of virtual directory displayed in IIS MMC applet", modularizeType: ColumnModularizeType.Property), + new ColumnDefinition("Directory_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Directory", keyColumn: 1, description: "Foreign key referencing directory that the virtual directory points at", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("DirProperties_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebDirProperties", keyColumn: 1, description: "Foreign key referencing possible security information for the virtual directory", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "IIsWebApplication", keyColumn: 1, description: "Foreign key referencing possible ASP application for the virtual directory", modularizeType: ColumnModularizeType.Column), + }, + tupleDefinitionName: "IIsWebVirtualDir", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition IIsWebLog = new TableDefinition( + "IIsWebLog", + new[] + { + new ColumnDefinition("Log", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Format", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Type of log format"), + }, + tupleDefinitionName: "IIsWebLog", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition[] All = new[] + { + Certificate, + CertificateHash, + IIsWebSiteCertificates, + IIsAppPool, + IIsMimeMap, + IIsProperty, + IIsWebDirProperties, + IIsWebAddress, + IIsWebSite, + IIsWebApplication, + IIsWebApplicationExtension, + IIsFilter, + IIsWebDir, + IIsWebError, + IIsHttpHeader, + IIsWebServiceExtension, + IIsWebVirtualDir, + IIsWebLog, + }; + } +} diff --git a/src/wixext/IisWindowsInstallerBackendBinderExtension.cs b/src/wixext/IisWindowsInstallerBackendBinderExtension.cs index 50571c34..29d34a09 100644 --- a/src/wixext/IisWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/IisWindowsInstallerBackendBinderExtension.cs @@ -1,34 +1,13 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Iis { using System.Collections.Generic; - using System.Linq; - using System.Xml; - using WixToolset.Data; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; public class IisWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - private static readonly TableDefinition[] Tables = LoadTables(); - - public override IEnumerable TableDefinitions { get => Tables; } - - public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) - { - var columnZeroIsId = tuple.Id != null; - return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitions, columnZeroIsId); - } - - private static TableDefinition[] LoadTables() - { - using (var resourceStream = typeof(IisWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Iis.tables.xml")) - using (var reader = XmlReader.Create(resourceStream)) - { - var tables = TableDefinitionCollection.Load(reader); - return tables.ToArray(); - } - } + public override IEnumerable TableDefinitions => IisTableDefinitions.All; } } diff --git a/src/wixext/Tuples/CertificateHashTuple.cs b/src/wixext/Tuples/CertificateHashTuple.cs index 6df4c88c..11f0592f 100644 --- a/src/wixext/Tuples/CertificateHashTuple.cs +++ b/src/wixext/Tuples/CertificateHashTuple.cs @@ -11,7 +11,7 @@ namespace WixToolset.Iis IisTupleDefinitionType.CertificateHash.ToString(), new[] { - new IntermediateFieldDefinition(nameof(CertificateHashTupleFields.Certificate_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CertificateHashTupleFields.CertificateRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateHashTupleFields.Hash), IntermediateFieldType.String), }, typeof(CertificateHashTuple)); @@ -24,7 +24,7 @@ namespace WixToolset.Iis.Tuples public enum CertificateHashTupleFields { - Certificate_, + CertificateRef, Hash, } @@ -40,10 +40,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[CertificateHashTupleFields index] => this.Fields[(int)index]; - public string Certificate_ + public string CertificateRef { - get => this.Fields[(int)CertificateHashTupleFields.Certificate_].AsString(); - set => this.Set((int)CertificateHashTupleFields.Certificate_, value); + get => this.Fields[(int)CertificateHashTupleFields.CertificateRef].AsString(); + set => this.Set((int)CertificateHashTupleFields.CertificateRef, value); } public string Hash diff --git a/src/wixext/Tuples/CertificateTuple.cs b/src/wixext/Tuples/CertificateTuple.cs index 9e04b783..480a3569 100644 --- a/src/wixext/Tuples/CertificateTuple.cs +++ b/src/wixext/Tuples/CertificateTuple.cs @@ -11,13 +11,12 @@ namespace WixToolset.Iis IisTupleDefinitionType.Certificate.ToString(), new[] { - new IntermediateFieldDefinition(nameof(CertificateTupleFields.Certificate), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(CertificateTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CertificateTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateTupleFields.StoreLocation), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(CertificateTupleFields.StoreName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(CertificateTupleFields.Binary_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CertificateTupleFields.BinaryRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateTupleFields.CertificatePath), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(CertificateTupleFields.PFXPassword), IntermediateFieldType.String), }, @@ -31,13 +30,12 @@ namespace WixToolset.Iis.Tuples public enum CertificateTupleFields { - Certificate, - Component_, + ComponentRef, Name, StoreLocation, StoreName, Attributes, - Binary_, + BinaryRef, CertificatePath, PFXPassword, } @@ -54,16 +52,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[CertificateTupleFields index] => this.Fields[(int)index]; - public string Certificate + public string ComponentRef { - get => this.Fields[(int)CertificateTupleFields.Certificate].AsString(); - set => this.Set((int)CertificateTupleFields.Certificate, value); - } - - public string Component_ - { - get => this.Fields[(int)CertificateTupleFields.Component_].AsString(); - set => this.Set((int)CertificateTupleFields.Component_, value); + get => this.Fields[(int)CertificateTupleFields.ComponentRef].AsString(); + set => this.Set((int)CertificateTupleFields.ComponentRef, value); } public string Name @@ -90,10 +82,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)CertificateTupleFields.Attributes, value); } - public string Binary_ + public string BinaryRef { - get => this.Fields[(int)CertificateTupleFields.Binary_].AsString(); - set => this.Set((int)CertificateTupleFields.Binary_, value); + get => this.Fields[(int)CertificateTupleFields.BinaryRef].AsString(); + set => this.Set((int)CertificateTupleFields.BinaryRef, value); } public string CertificatePath diff --git a/src/wixext/Tuples/IIsAppPoolTuple.cs b/src/wixext/Tuples/IIsAppPoolTuple.cs index 10a00f50..d14ec7ad 100644 --- a/src/wixext/Tuples/IIsAppPoolTuple.cs +++ b/src/wixext/Tuples/IIsAppPoolTuple.cs @@ -11,11 +11,10 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsAppPool.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.AppPool), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.Name), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.User_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.UserRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.RecycleMinutes), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.RecycleRequests), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsAppPoolTupleFields.RecycleTimes), IntermediateFieldType.String), @@ -38,11 +37,10 @@ namespace WixToolset.Iis.Tuples public enum IIsAppPoolTupleFields { - AppPool, Name, - Component_, + ComponentRef, Attributes, - User_, + UserRef, RecycleMinutes, RecycleRequests, RecycleTimes, @@ -68,22 +66,16 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsAppPoolTupleFields index] => this.Fields[(int)index]; - public string AppPool - { - get => this.Fields[(int)IIsAppPoolTupleFields.AppPool].AsString(); - set => this.Set((int)IIsAppPoolTupleFields.AppPool, value); - } - public string Name { get => this.Fields[(int)IIsAppPoolTupleFields.Name].AsString(); set => this.Set((int)IIsAppPoolTupleFields.Name, value); } - public string Component_ + public string ComponentRef { - get => this.Fields[(int)IIsAppPoolTupleFields.Component_].AsString(); - set => this.Set((int)IIsAppPoolTupleFields.Component_, value); + get => this.Fields[(int)IIsAppPoolTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsAppPoolTupleFields.ComponentRef, value); } public int Attributes @@ -92,10 +84,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsAppPoolTupleFields.Attributes, value); } - public string User_ + public string UserRef { - get => this.Fields[(int)IIsAppPoolTupleFields.User_].AsString(); - set => this.Set((int)IIsAppPoolTupleFields.User_, value); + get => this.Fields[(int)IIsAppPoolTupleFields.UserRef].AsString(); + set => this.Set((int)IIsAppPoolTupleFields.UserRef, value); } public int RecycleMinutes diff --git a/src/wixext/Tuples/IIsFilterTuple.cs b/src/wixext/Tuples/IIsFilterTuple.cs index 9c651144..5dda8878 100644 --- a/src/wixext/Tuples/IIsFilterTuple.cs +++ b/src/wixext/Tuples/IIsFilterTuple.cs @@ -11,11 +11,10 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsFilter.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Filter), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Name), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Path), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Web_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.WebRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.Flags), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsFilterTupleFields.LoadOrder), IntermediateFieldType.Number), @@ -30,11 +29,10 @@ namespace WixToolset.Iis.Tuples public enum IIsFilterTupleFields { - Filter, Name, - Component_, + ComponentRef, Path, - Web_, + WebRef, Description, Flags, LoadOrder, @@ -52,22 +50,16 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsFilterTupleFields index] => this.Fields[(int)index]; - public string Filter - { - get => this.Fields[(int)IIsFilterTupleFields.Filter].AsString(); - set => this.Set((int)IIsFilterTupleFields.Filter, value); - } - public string Name { get => this.Fields[(int)IIsFilterTupleFields.Name].AsString(); set => this.Set((int)IIsFilterTupleFields.Name, value); } - public string Component_ + public string ComponentRef { - get => this.Fields[(int)IIsFilterTupleFields.Component_].AsString(); - set => this.Set((int)IIsFilterTupleFields.Component_, value); + get => this.Fields[(int)IIsFilterTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsFilterTupleFields.ComponentRef, value); } public string Path @@ -76,10 +68,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsFilterTupleFields.Path, value); } - public string Web_ + public string WebRef { - get => this.Fields[(int)IIsFilterTupleFields.Web_].AsString(); - set => this.Set((int)IIsFilterTupleFields.Web_, value); + get => this.Fields[(int)IIsFilterTupleFields.WebRef].AsString(); + set => this.Set((int)IIsFilterTupleFields.WebRef, value); } public string Description diff --git a/src/wixext/Tuples/IIsMimeMapTuple.cs b/src/wixext/Tuples/IIsMimeMapTuple.cs index c27aef21..f1a825b0 100644 --- a/src/wixext/Tuples/IIsMimeMapTuple.cs +++ b/src/wixext/Tuples/IIsMimeMapTuple.cs @@ -11,7 +11,6 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsMimeMap.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsMimeMapTupleFields.MimeMap), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsMimeMapTupleFields.ParentType), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsMimeMapTupleFields.ParentValue), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsMimeMapTupleFields.MimeType), IntermediateFieldType.String), @@ -27,7 +26,6 @@ namespace WixToolset.Iis.Tuples public enum IIsMimeMapTupleFields { - MimeMap, ParentType, ParentValue, MimeType, @@ -46,12 +44,6 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsMimeMapTupleFields index] => this.Fields[(int)index]; - public string MimeMap - { - get => this.Fields[(int)IIsMimeMapTupleFields.MimeMap].AsString(); - set => this.Set((int)IIsMimeMapTupleFields.MimeMap, value); - } - public int ParentType { get => this.Fields[(int)IIsMimeMapTupleFields.ParentType].AsNumber(); diff --git a/src/wixext/Tuples/IIsPropertyTuple.cs b/src/wixext/Tuples/IIsPropertyTuple.cs index b02a0b4a..28e882bf 100644 --- a/src/wixext/Tuples/IIsPropertyTuple.cs +++ b/src/wixext/Tuples/IIsPropertyTuple.cs @@ -11,8 +11,7 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsProperty.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsPropertyTupleFields.Property), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsPropertyTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsPropertyTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsPropertyTupleFields.Attributes), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsPropertyTupleFields.Value), IntermediateFieldType.String), }, @@ -26,8 +25,7 @@ namespace WixToolset.Iis.Tuples public enum IIsPropertyTupleFields { - Property, - Component_, + ComponentRef, Attributes, Value, } @@ -44,16 +42,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsPropertyTupleFields index] => this.Fields[(int)index]; - public string Property + public string ComponentRef { - get => this.Fields[(int)IIsPropertyTupleFields.Property].AsString(); - set => this.Set((int)IIsPropertyTupleFields.Property, value); - } - - public string Component_ - { - get => this.Fields[(int)IIsPropertyTupleFields.Component_].AsString(); - set => this.Set((int)IIsPropertyTupleFields.Component_, value); + get => this.Fields[(int)IIsPropertyTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsPropertyTupleFields.ComponentRef, value); } public int Attributes diff --git a/src/wixext/Tuples/IIsWebAddressTuple.cs b/src/wixext/Tuples/IIsWebAddressTuple.cs index cb50b207..603f62cb 100644 --- a/src/wixext/Tuples/IIsWebAddressTuple.cs +++ b/src/wixext/Tuples/IIsWebAddressTuple.cs @@ -11,8 +11,7 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebAddress.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.Address), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.Web_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.WebRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.IP), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.Port), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebAddressTupleFields.Header), IntermediateFieldType.String), @@ -28,8 +27,7 @@ namespace WixToolset.Iis.Tuples public enum IIsWebAddressTupleFields { - Address, - Web_, + WebRef, IP, Port, Header, @@ -48,16 +46,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebAddressTupleFields index] => this.Fields[(int)index]; - public string Address + public string WebRef { - get => this.Fields[(int)IIsWebAddressTupleFields.Address].AsString(); - set => this.Set((int)IIsWebAddressTupleFields.Address, value); - } - - public string Web_ - { - get => this.Fields[(int)IIsWebAddressTupleFields.Web_].AsString(); - set => this.Set((int)IIsWebAddressTupleFields.Web_, value); + get => this.Fields[(int)IIsWebAddressTupleFields.WebRef].AsString(); + set => this.Set((int)IIsWebAddressTupleFields.WebRef, value); } public string IP diff --git a/src/wixext/Tuples/IIsWebApplicationExtensionTuple.cs b/src/wixext/Tuples/IIsWebApplicationExtensionTuple.cs index 5ae60f57..8ab78dad 100644 --- a/src/wixext/Tuples/IIsWebApplicationExtensionTuple.cs +++ b/src/wixext/Tuples/IIsWebApplicationExtensionTuple.cs @@ -11,7 +11,7 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebApplicationExtension.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebApplicationExtensionTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebApplicationExtensionTupleFields.ApplicationRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebApplicationExtensionTupleFields.Extension), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebApplicationExtensionTupleFields.Verbs), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebApplicationExtensionTupleFields.Executable), IntermediateFieldType.String), @@ -27,7 +27,7 @@ namespace WixToolset.Iis.Tuples public enum IIsWebApplicationExtensionTupleFields { - Application_, + ApplicationRef, Extension, Verbs, Executable, @@ -46,10 +46,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebApplicationExtensionTupleFields index] => this.Fields[(int)index]; - public string Application_ + public string ApplicationRef { - get => this.Fields[(int)IIsWebApplicationExtensionTupleFields.Application_].AsString(); - set => this.Set((int)IIsWebApplicationExtensionTupleFields.Application_, value); + get => this.Fields[(int)IIsWebApplicationExtensionTupleFields.ApplicationRef].AsString(); + set => this.Set((int)IIsWebApplicationExtensionTupleFields.ApplicationRef, value); } public string Extension diff --git a/src/wixext/Tuples/IIsWebApplicationTuple.cs b/src/wixext/Tuples/IIsWebApplicationTuple.cs index 403969b7..6af3a2f7 100644 --- a/src/wixext/Tuples/IIsWebApplicationTuple.cs +++ b/src/wixext/Tuples/IIsWebApplicationTuple.cs @@ -11,7 +11,6 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebApplication.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.Application), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.Isolation), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.AllowSessions), IntermediateFieldType.Number), @@ -22,7 +21,7 @@ namespace WixToolset.Iis new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.ScriptTimeout), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.ServerDebugging), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.ClientDebugging), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.AppPool_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebApplicationTupleFields.AppPoolRef), IntermediateFieldType.String), }, typeof(IIsWebApplicationTuple)); } @@ -34,7 +33,6 @@ namespace WixToolset.Iis.Tuples public enum IIsWebApplicationTupleFields { - Application, Name, Isolation, AllowSessions, @@ -45,7 +43,7 @@ namespace WixToolset.Iis.Tuples ScriptTimeout, ServerDebugging, ClientDebugging, - AppPool_, + AppPoolRef, } public class IIsWebApplicationTuple : IntermediateTuple @@ -60,12 +58,6 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebApplicationTupleFields index] => this.Fields[(int)index]; - public string Application - { - get => this.Fields[(int)IIsWebApplicationTupleFields.Application].AsString(); - set => this.Set((int)IIsWebApplicationTupleFields.Application, value); - } - public string Name { get => this.Fields[(int)IIsWebApplicationTupleFields.Name].AsString(); @@ -126,10 +118,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebApplicationTupleFields.ClientDebugging, value); } - public string AppPool_ + public string AppPoolRef { - get => this.Fields[(int)IIsWebApplicationTupleFields.AppPool_].AsString(); - set => this.Set((int)IIsWebApplicationTupleFields.AppPool_, value); + get => this.Fields[(int)IIsWebApplicationTupleFields.AppPoolRef].AsString(); + set => this.Set((int)IIsWebApplicationTupleFields.AppPoolRef, value); } } } \ No newline at end of file diff --git a/src/wixext/Tuples/IIsWebDirPropertiesTuple.cs b/src/wixext/Tuples/IIsWebDirPropertiesTuple.cs index 9e723775..1c7cd8bf 100644 --- a/src/wixext/Tuples/IIsWebDirPropertiesTuple.cs +++ b/src/wixext/Tuples/IIsWebDirPropertiesTuple.cs @@ -11,10 +11,9 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebDirProperties.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.DirProperties), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.Access), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.Authorization), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.AnonymousUser_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.AnonymousUserRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.IIsControlledPassword), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.LogVisits), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebDirPropertiesTupleFields.Index), IntermediateFieldType.Number), @@ -37,10 +36,9 @@ namespace WixToolset.Iis.Tuples public enum IIsWebDirPropertiesTupleFields { - DirProperties, Access, Authorization, - AnonymousUser_, + AnonymousUserRef, IIsControlledPassword, LogVisits, Index, @@ -66,12 +64,6 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebDirPropertiesTupleFields index] => this.Fields[(int)index]; - public string DirProperties - { - get => this.Fields[(int)IIsWebDirPropertiesTupleFields.DirProperties].AsString(); - set => this.Set((int)IIsWebDirPropertiesTupleFields.DirProperties, value); - } - public int Access { get => this.Fields[(int)IIsWebDirPropertiesTupleFields.Access].AsNumber(); @@ -84,10 +76,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebDirPropertiesTupleFields.Authorization, value); } - public string AnonymousUser_ + public string AnonymousUserRef { - get => this.Fields[(int)IIsWebDirPropertiesTupleFields.AnonymousUser_].AsString(); - set => this.Set((int)IIsWebDirPropertiesTupleFields.AnonymousUser_, value); + get => this.Fields[(int)IIsWebDirPropertiesTupleFields.AnonymousUserRef].AsString(); + set => this.Set((int)IIsWebDirPropertiesTupleFields.AnonymousUserRef, value); } public int IIsControlledPassword diff --git a/src/wixext/Tuples/IIsWebDirTuple.cs b/src/wixext/Tuples/IIsWebDirTuple.cs index 6e04b337..471fe223 100644 --- a/src/wixext/Tuples/IIsWebDirTuple.cs +++ b/src/wixext/Tuples/IIsWebDirTuple.cs @@ -11,12 +11,11 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebDir.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.WebDir), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.Component_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.Web_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.ComponentRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.WebRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.Path), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.DirProperties_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.DirPropertiesRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebDirTupleFields.ApplicationRef), IntermediateFieldType.String), }, typeof(IIsWebDirTuple)); } @@ -28,12 +27,11 @@ namespace WixToolset.Iis.Tuples public enum IIsWebDirTupleFields { - WebDir, - Component_, - Web_, + ComponentRef, + WebRef, Path, - DirProperties_, - Application_, + DirPropertiesRef, + ApplicationRef, } public class IIsWebDirTuple : IntermediateTuple @@ -48,22 +46,16 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebDirTupleFields index] => this.Fields[(int)index]; - public string WebDir + public string ComponentRef { - get => this.Fields[(int)IIsWebDirTupleFields.WebDir].AsString(); - set => this.Set((int)IIsWebDirTupleFields.WebDir, value); + get => this.Fields[(int)IIsWebDirTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsWebDirTupleFields.ComponentRef, value); } - public string Component_ + public string WebRef { - get => this.Fields[(int)IIsWebDirTupleFields.Component_].AsString(); - set => this.Set((int)IIsWebDirTupleFields.Component_, value); - } - - public string Web_ - { - get => this.Fields[(int)IIsWebDirTupleFields.Web_].AsString(); - set => this.Set((int)IIsWebDirTupleFields.Web_, value); + get => this.Fields[(int)IIsWebDirTupleFields.WebRef].AsString(); + set => this.Set((int)IIsWebDirTupleFields.WebRef, value); } public string Path @@ -72,16 +64,16 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebDirTupleFields.Path, value); } - public string DirProperties_ + public string DirPropertiesRef { - get => this.Fields[(int)IIsWebDirTupleFields.DirProperties_].AsString(); - set => this.Set((int)IIsWebDirTupleFields.DirProperties_, value); + get => this.Fields[(int)IIsWebDirTupleFields.DirPropertiesRef].AsString(); + set => this.Set((int)IIsWebDirTupleFields.DirPropertiesRef, value); } - public string Application_ + public string ApplicationRef { - get => this.Fields[(int)IIsWebDirTupleFields.Application_].AsString(); - set => this.Set((int)IIsWebDirTupleFields.Application_, value); + get => this.Fields[(int)IIsWebDirTupleFields.ApplicationRef].AsString(); + set => this.Set((int)IIsWebDirTupleFields.ApplicationRef, value); } } } \ No newline at end of file diff --git a/src/wixext/Tuples/IIsWebLogTuple.cs b/src/wixext/Tuples/IIsWebLogTuple.cs index 1dfe0862..ec912ac5 100644 --- a/src/wixext/Tuples/IIsWebLogTuple.cs +++ b/src/wixext/Tuples/IIsWebLogTuple.cs @@ -11,7 +11,6 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebLog.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebLogTupleFields.Log), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebLogTupleFields.Format), IntermediateFieldType.String), }, typeof(IIsWebLogTuple)); @@ -24,7 +23,6 @@ namespace WixToolset.Iis.Tuples public enum IIsWebLogTupleFields { - Log, Format, } @@ -40,12 +38,6 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebLogTupleFields index] => this.Fields[(int)index]; - public string Log - { - get => this.Fields[(int)IIsWebLogTupleFields.Log].AsString(); - set => this.Set((int)IIsWebLogTupleFields.Log, value); - } - public string Format { get => this.Fields[(int)IIsWebLogTupleFields.Format].AsString(); diff --git a/src/wixext/Tuples/IIsWebServiceExtensionTuple.cs b/src/wixext/Tuples/IIsWebServiceExtensionTuple.cs index a6fec797..82d9c82a 100644 --- a/src/wixext/Tuples/IIsWebServiceExtensionTuple.cs +++ b/src/wixext/Tuples/IIsWebServiceExtensionTuple.cs @@ -11,8 +11,7 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebServiceExtension.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.WebServiceExtension), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.File), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebServiceExtensionTupleFields.Group), IntermediateFieldType.String), @@ -28,8 +27,7 @@ namespace WixToolset.Iis.Tuples public enum IIsWebServiceExtensionTupleFields { - WebServiceExtension, - Component_, + ComponentRef, File, Description, Group, @@ -48,16 +46,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebServiceExtensionTupleFields index] => this.Fields[(int)index]; - public string WebServiceExtension + public string ComponentRef { - get => this.Fields[(int)IIsWebServiceExtensionTupleFields.WebServiceExtension].AsString(); - set => this.Set((int)IIsWebServiceExtensionTupleFields.WebServiceExtension, value); - } - - public string Component_ - { - get => this.Fields[(int)IIsWebServiceExtensionTupleFields.Component_].AsString(); - set => this.Set((int)IIsWebServiceExtensionTupleFields.Component_, value); + get => this.Fields[(int)IIsWebServiceExtensionTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsWebServiceExtensionTupleFields.ComponentRef, value); } public string File diff --git a/src/wixext/Tuples/IIsWebSiteCertificatesTuple.cs b/src/wixext/Tuples/IIsWebSiteCertificatesTuple.cs index 711f745f..7e4879d7 100644 --- a/src/wixext/Tuples/IIsWebSiteCertificatesTuple.cs +++ b/src/wixext/Tuples/IIsWebSiteCertificatesTuple.cs @@ -11,8 +11,8 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebSiteCertificates.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebSiteCertificatesTupleFields.Web_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebSiteCertificatesTupleFields.Certificate_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteCertificatesTupleFields.WebRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteCertificatesTupleFields.CertificateRef), IntermediateFieldType.String), }, typeof(IIsWebSiteCertificatesTuple)); } @@ -24,8 +24,8 @@ namespace WixToolset.Iis.Tuples public enum IIsWebSiteCertificatesTupleFields { - Web_, - Certificate_, + WebRef, + CertificateRef, } public class IIsWebSiteCertificatesTuple : IntermediateTuple @@ -40,16 +40,16 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebSiteCertificatesTupleFields index] => this.Fields[(int)index]; - public string Web_ + public string WebRef { - get => this.Fields[(int)IIsWebSiteCertificatesTupleFields.Web_].AsString(); - set => this.Set((int)IIsWebSiteCertificatesTupleFields.Web_, value); + get => this.Fields[(int)IIsWebSiteCertificatesTupleFields.WebRef].AsString(); + set => this.Set((int)IIsWebSiteCertificatesTupleFields.WebRef, value); } - public string Certificate_ + public string CertificateRef { - get => this.Fields[(int)IIsWebSiteCertificatesTupleFields.Certificate_].AsString(); - set => this.Set((int)IIsWebSiteCertificatesTupleFields.Certificate_, value); + get => this.Fields[(int)IIsWebSiteCertificatesTupleFields.CertificateRef].AsString(); + set => this.Set((int)IIsWebSiteCertificatesTupleFields.CertificateRef, value); } } } \ No newline at end of file diff --git a/src/wixext/Tuples/IIsWebSiteTuple.cs b/src/wixext/Tuples/IIsWebSiteTuple.cs index 983352a5..610f1c59 100644 --- a/src/wixext/Tuples/IIsWebSiteTuple.cs +++ b/src/wixext/Tuples/IIsWebSiteTuple.cs @@ -11,18 +11,17 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebSite.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Web), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.ConnectionTimeout), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.DirectoryRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.State), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.KeyAddress_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.DirProperties_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.KeyAddressRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.DirPropertiesRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.ApplicationRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Sequence), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.Log_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.LogRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebSiteTupleFields.WebsiteId), IntermediateFieldType.String), }, typeof(IIsWebSiteTuple)); @@ -35,18 +34,17 @@ namespace WixToolset.Iis.Tuples public enum IIsWebSiteTupleFields { - Web, - Component_, + ComponentRef, Description, ConnectionTimeout, - Directory_, + DirectoryRef, State, Attributes, - KeyAddress_, - DirProperties_, - Application_, + KeyAddressRef, + DirPropertiesRef, + ApplicationRef, Sequence, - Log_, + LogRef, WebsiteId, } @@ -62,16 +60,10 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebSiteTupleFields index] => this.Fields[(int)index]; - public string Web + public string ComponentRef { - get => this.Fields[(int)IIsWebSiteTupleFields.Web].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.Web, value); - } - - public string Component_ - { - get => this.Fields[(int)IIsWebSiteTupleFields.Component_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.Component_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.ComponentRef, value); } public string Description @@ -86,10 +78,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebSiteTupleFields.ConnectionTimeout, value); } - public string Directory_ + public string DirectoryRef { - get => this.Fields[(int)IIsWebSiteTupleFields.Directory_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.Directory_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.DirectoryRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.DirectoryRef, value); } public int State @@ -104,22 +96,22 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebSiteTupleFields.Attributes, value); } - public string KeyAddress_ + public string KeyAddressRef { - get => this.Fields[(int)IIsWebSiteTupleFields.KeyAddress_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.KeyAddress_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.KeyAddressRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.KeyAddressRef, value); } - public string DirProperties_ + public string DirPropertiesRef { - get => this.Fields[(int)IIsWebSiteTupleFields.DirProperties_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.DirProperties_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.DirPropertiesRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.DirPropertiesRef, value); } - public string Application_ + public string ApplicationRef { - get => this.Fields[(int)IIsWebSiteTupleFields.Application_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.Application_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.ApplicationRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.ApplicationRef, value); } public int Sequence @@ -128,10 +120,10 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebSiteTupleFields.Sequence, value); } - public string Log_ + public string LogRef { - get => this.Fields[(int)IIsWebSiteTupleFields.Log_].AsString(); - set => this.Set((int)IIsWebSiteTupleFields.Log_, value); + get => this.Fields[(int)IIsWebSiteTupleFields.LogRef].AsString(); + set => this.Set((int)IIsWebSiteTupleFields.LogRef, value); } public string WebsiteId diff --git a/src/wixext/Tuples/IIsWebVirtualDirTuple.cs b/src/wixext/Tuples/IIsWebVirtualDirTuple.cs index f80804af..3a624b80 100644 --- a/src/wixext/Tuples/IIsWebVirtualDirTuple.cs +++ b/src/wixext/Tuples/IIsWebVirtualDirTuple.cs @@ -11,13 +11,12 @@ namespace WixToolset.Iis IisTupleDefinitionType.IIsWebVirtualDir.ToString(), new[] { - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.VirtualDir), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.Component_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.Web_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.ComponentRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.WebRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.Alias), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.Directory_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.DirProperties_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.DirectoryRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.DirPropertiesRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IIsWebVirtualDirTupleFields.ApplicationRef), IntermediateFieldType.String), }, typeof(IIsWebVirtualDirTuple)); } @@ -29,13 +28,12 @@ namespace WixToolset.Iis.Tuples public enum IIsWebVirtualDirTupleFields { - VirtualDir, - Component_, - Web_, + ComponentRef, + WebRef, Alias, - Directory_, - DirProperties_, - Application_, + DirectoryRef, + DirPropertiesRef, + ApplicationRef, } public class IIsWebVirtualDirTuple : IntermediateTuple @@ -50,22 +48,16 @@ namespace WixToolset.Iis.Tuples public IntermediateField this[IIsWebVirtualDirTupleFields index] => this.Fields[(int)index]; - public string VirtualDir + public string ComponentRef { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.VirtualDir].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.VirtualDir, value); + get => this.Fields[(int)IIsWebVirtualDirTupleFields.ComponentRef].AsString(); + set => this.Set((int)IIsWebVirtualDirTupleFields.ComponentRef, value); } - public string Component_ + public string WebRef { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.Component_].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.Component_, value); - } - - public string Web_ - { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.Web_].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.Web_, value); + get => this.Fields[(int)IIsWebVirtualDirTupleFields.WebRef].AsString(); + set => this.Set((int)IIsWebVirtualDirTupleFields.WebRef, value); } public string Alias @@ -74,22 +66,22 @@ namespace WixToolset.Iis.Tuples set => this.Set((int)IIsWebVirtualDirTupleFields.Alias, value); } - public string Directory_ + public string DirectoryRef { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.Directory_].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.Directory_, value); + get => this.Fields[(int)IIsWebVirtualDirTupleFields.DirectoryRef].AsString(); + set => this.Set((int)IIsWebVirtualDirTupleFields.DirectoryRef, value); } - public string DirProperties_ + public string DirPropertiesRef { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.DirProperties_].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.DirProperties_, value); + get => this.Fields[(int)IIsWebVirtualDirTupleFields.DirPropertiesRef].AsString(); + set => this.Set((int)IIsWebVirtualDirTupleFields.DirPropertiesRef, value); } - public string Application_ + public string ApplicationRef { - get => this.Fields[(int)IIsWebVirtualDirTupleFields.Application_].AsString(); - set => this.Set((int)IIsWebVirtualDirTupleFields.Application_, value); + get => this.Fields[(int)IIsWebVirtualDirTupleFields.ApplicationRef].AsString(); + set => this.Set((int)IIsWebVirtualDirTupleFields.ApplicationRef, value); } } } \ No newline at end of file diff --git a/src/wixext/WixToolset.Iis.wixext.csproj b/src/wixext/WixToolset.Iis.wixext.csproj index 103d3c18..54ada521 100644 --- a/src/wixext/WixToolset.Iis.wixext.csproj +++ b/src/wixext/WixToolset.Iis.wixext.csproj @@ -14,7 +14,6 @@ - diff --git a/src/wixext/tables.xml b/src/wixext/tables.xml deleted file mode 100644 index 2aef6f13..00000000 --- a/src/wixext/tables.xml +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3-55-g6feb