From e94da3e3a1256e3f593a0833ed6ad68a02e88fc1 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 26 Feb 2024 22:17:10 -0500 Subject: [PATCH] Use camelCase attribute values. --- .../FirewallExtensionFixture.cs | 10 +- .../UsingFirewall/PackageComponents.wxs | 14 +-- src/ext/Firewall/wixext/FirewallCompiler.cs | 98 ++++++++++--------- src/ext/Firewall/wixext/FirewallDecompiler.cs | 46 +++++---- .../FirewallRulesInterfaces/product.wxs | 6 +- .../FirewallRulesProperties/product.wxs | 4 +- 6 files changed, 98 insertions(+), 80 deletions(-) diff --git a/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs b/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs index df18f0e05..e39fafaad 100644 --- a/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs +++ b/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs @@ -48,7 +48,7 @@ public void CanBuildUsingFirewall() "Wix5FirewallException:fexv60s7u2Dmd1imH5vEFYKPgEWhG4\tinterface nested\t127.0.0.1\t54671\t6\t\t0\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tInterfaces with nested elements\t1\t-2147483648\t-2147483648\t-2147483648\t\t\tWi-Fi|Local Area Connection\t\t\t\t\t\t\t\t\t\t-2147483648", "Wix5FirewallException:fexVr6uHcOCak5MHuTLwujjh_oKtbI\tGroupingExample2\t\t8732\t6\t\t0\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tRule with grouping property\t1\t-2147483648\t-2147483648\t-2147483648\t[GROUPING_PROP]\t\t\t\t\t\t\t\t\t\t\t\t-2147483648", "Wix5FirewallException:fexwjf4OTFVE9SNiC4goVxBA6ENJBE\tINetFwRule3 values\t*\t\t-2147483648\t\t16\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tSimple INetFwRule3 values\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\t\t\t\t\tS-1-15-2-1239072475-3687740317-1842961305-3395936705-4023953123-1525404051-2779347315\tO:LSD:(A;;CC;;;S-1-5-84-0-0-0-0-0)\tS-1-5-21-1898747406-2352535518-1247798438-1914\t127.0.0.1\tO:LSD:(A;;CC;;;S-1-5-84-0-0-0-0-0)\t3", - "Wix5FirewallException:ServiceInstall.nested\tExampleNestedService\tLocalSubnet\t3546-7890\t6\t\t1\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tA port-based firewall exception for a windows service\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\tLan,Wireless\t\t\tsvc1\t\t\t\t\t\t-2147483648", + "Wix5FirewallException:ServiceInstall.nested\tExampleNestedService\tLocalSubnet\t3546-7890\t6\t\t1\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tA port-based firewall exception for a Windows service\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\tLan,Wireless\t\t\tsvc1\t\t\t\t\t\t-2147483648", }, results); } @@ -87,7 +87,7 @@ public void CanBuildUsingFirewallARM64() "Wix5FirewallException:fexv60s7u2Dmd1imH5vEFYKPgEWhG4\tinterface nested\t127.0.0.1\t54671\t6\t\t0\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tInterfaces with nested elements\t1\t-2147483648\t-2147483648\t-2147483648\t\t\tWi-Fi|Local Area Connection\t\t\t\t\t\t\t\t\t\t-2147483648", "Wix5FirewallException:fexVr6uHcOCak5MHuTLwujjh_oKtbI\tGroupingExample2\t\t8732\t6\t\t0\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tRule with grouping property\t1\t-2147483648\t-2147483648\t-2147483648\t[GROUPING_PROP]\t\t\t\t\t\t\t\t\t\t\t\t-2147483648", "Wix5FirewallException:fexwjf4OTFVE9SNiC4goVxBA6ENJBE\tINetFwRule3 values\t*\t\t-2147483648\t\t16\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tSimple INetFwRule3 values\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\t\t\t\t\tS-1-15-2-1239072475-3687740317-1842961305-3395936705-4023953123-1525404051-2779347315\tO:LSD:(A;;CC;;;S-1-5-84-0-0-0-0-0)\tS-1-5-21-1898747406-2352535518-1247798438-1914\t127.0.0.1\tO:LSD:(A;;CC;;;S-1-5-84-0-0-0-0-0)\t3", - "Wix5FirewallException:ServiceInstall.nested\tExampleNestedService\tLocalSubnet\t3546-7890\t6\t\t1\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tA port-based firewall exception for a windows service\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\tLan,Wireless\t\t\tsvc1\t\t\t\t\t\t-2147483648", + "Wix5FirewallException:ServiceInstall.nested\tExampleNestedService\tLocalSubnet\t3546-7890\t6\t\t1\t-2147483648\tfilNdJBJmq3UCUIwmXS8x21aAsvqzk\tA port-based firewall exception for a Windows service\t1\t-2147483648\t-2147483648\t-2147483648\t\t\t\tLan,Wireless\t\t\tsvc1\t\t\t\t\t\t-2147483648", }, results); } @@ -224,7 +224,7 @@ public void RoundtripAttributesAreCorrectForApp() "Port=42", "Protocol=tcp", "Program=[#filNdJBJmq3UCUIwmXS8x21aAsvqzk]", - "OnUpdate=DoNothing", + "OnUpdate=doNothing", "Description=An app-based firewall exception", "xmlns=http://wixtoolset.org/schemas/v4/wxs/firewall", }, actual.Attributes); @@ -241,7 +241,7 @@ public void RoundtripAttributesAreCorrectForPort() "Scope=localSubnet", "Port=42", "Protocol=tcp", - "OnUpdate=EnableOnly", + "OnUpdate=enableOnly", "Description=A port-based firewall exception", "Outbound=yes", "xmlns=http://wixtoolset.org/schemas/v4/wxs/firewall", @@ -330,7 +330,7 @@ public void RoundtripAttributesAreCorrectForINetFwRule3Values() "LocalUserOwner=S-1-5-21-1898747406-2352535518-1247798438-1914", "RemoteMachineAuthorizedList=127.0.0.1", "RemoteUserAuthorizedList=O:LSD:(A;;CC;;;S-1-5-84-0-0-0-0-0)", - "IPSecSecureFlags=NegotiateEncryption", + "IPSecSecureFlags=negotiateEncryption", "xmlns=http://wixtoolset.org/schemas/v4/wxs/firewall", }, actual.Attributes); } diff --git a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs index 4bb2e192c..b9ba0aa42 100644 --- a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs +++ b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs @@ -6,18 +6,18 @@ - + - + - + @@ -31,13 +31,13 @@ - - - + + + - + diff --git a/src/ext/Firewall/wixext/FirewallCompiler.cs b/src/ext/Firewall/wixext/FirewallCompiler.cs index c4a5318ca..7db1dcc4e 100644 --- a/src/ext/Firewall/wixext/FirewallCompiler.cs +++ b/src/ext/Firewall/wixext/FirewallCompiler.cs @@ -155,6 +155,16 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia file = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); } break; + case "Program": + if (fileId != null) + { + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "Program", parentElement.Name.LocalName)); + } + else + { + program = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + } + break; case "IgnoreFailure": if (this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) == YesNoType.Yes) { @@ -165,28 +175,18 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia var onupdate = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (onupdate) { - case "DoNothing": + case "doNothing": attributes |= 0x2; // feaIgnoreUpdates break; - case "EnableOnly": + case "enableOnly": attributes |= 0x4; // feaEnableOnUpdate break; default: - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "OnUpdate", onupdate, "EnableOnly", "DoNothing")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "OnUpdate", onupdate, "enableOnly", "doNothing")); break; } break; - case "Program": - if (fileId != null) - { - this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "Program", parentElement.Name.LocalName)); - } - else - { - program = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - } - break; case "Port": port = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; @@ -284,17 +284,17 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia action = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (action) { - case "Block": + case "block": action = "0"; break; - case "Allow": + case "allow": action = "1"; break; default: if (!this.ParseHelper.ContainsProperty(action)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Action", action, "Allow", "Block")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Action", action, "allow", "block")); } break; } @@ -303,17 +303,17 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia edgeTraversal = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (edgeTraversal) { - case "Deny": + case "deny": edgeTraversal = FirewallConstants.NET_FW_EDGE_TRAVERSAL_TYPE_DENY.ToString(); break; - case "Allow": + case "allow": edgeTraversal = FirewallConstants.NET_FW_EDGE_TRAVERSAL_TYPE_ALLOW.ToString(); break; - case "DeferToApp": + case "deferToApp": attributes |= 0x8; // feaAddINetFwRule2 edgeTraversal = FirewallConstants.NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_APP.ToString(); break; - case "DeferToUser": + case "deferToUser": attributes |= 0x8; // feaAddINetFwRule2 edgeTraversal = FirewallConstants.NET_FW_EDGE_TRAVERSAL_TYPE_DEFER_TO_USER.ToString(); break; @@ -321,7 +321,7 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia default: if (!this.ParseHelper.ContainsProperty(edgeTraversal)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "EdgeTraversal", edgeTraversal, "Allow", "DeferToApp", "DeferToUser", "Deny")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "EdgeTraversal", edgeTraversal, "allow", "deferToApp", "deferToUser", "deny")); } break; } @@ -338,7 +338,6 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia case YesNoType.No: enabled = "0"; break; - default: this.Messaging.Write(ErrorMessages.IllegalYesNoValue(sourceLineNumbers, element.Name.LocalName, "Enabled", enabled)); break; @@ -359,16 +358,16 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia interfaceTypeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (interfaceTypeValue) { - case "RemoteAccess": - case "Wireless": - case "Lan": - case "All": + case "remoteAccess": + case "wireless": + case "lan": + case "all": break; default: if (!this.ParseHelper.ContainsProperty(interfaceTypeValue)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "InterfaceType", interfaceTypeValue, "RemoteAccess", "Wireless", "Lan", "All")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "InterfaceType", interfaceTypeValue, "remoteAccess", "wireless", "lan", "all")); } break; } @@ -449,23 +448,23 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia { switch (secureFlags) { - case "None": + case "none": secureFlags = "0"; break; - case "NoEncapsulation": + case "noEncapsulation": secureFlags = "1"; break; - case "WithIntegrity": + case "withIntegrity": secureFlags = "2"; break; - case "NegotiateEncryption": + case "negotiateEncryption": secureFlags = "3"; break; - case "Encrypt": + case "encrypt": secureFlags = "4"; break; default: - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "IPSecSecureFlags", secureFlags, "None", "NoEncapsulation", "WithIntegrity", "NegotiateEncryption", "Encrypt")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "IPSecSecureFlags", secureFlags, "none", "noEncapsulation", "withIntegrity", "negotiateEncryption", "encrypt")); break; } } @@ -573,43 +572,43 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia if (String.IsNullOrEmpty(fileId) && String.IsNullOrEmpty(file) && String.IsNullOrEmpty(program)) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Program", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Program", "EdgeTraversal", "deferToUser")); } if (port != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Port", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Port", "EdgeTraversal", "deferToUser")); } if (remotePort != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "RemotePort", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "RemotePort", "EdgeTraversal", "deferToUser")); } if (localScope != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "LocalScope", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "LocalScope", "EdgeTraversal", "deferToUser")); } if (scope != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Scope", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Scope", "EdgeTraversal", "deferToUser")); } if (profile != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Profile", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Profile", "EdgeTraversal", "deferToUser")); } if (service != null) { if (serviceName != null) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValueWhenNested(sourceLineNumbers, element.Name.LocalName, "EdgeTraversal", "DeferToUser", parentElement.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeValueWhenNested(sourceLineNumbers, element.Name.LocalName, "EdgeTraversal", "deferToUser", parentElement.Name.LocalName)); } else { - this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Service", "EdgeTraversal", "DeferToUser")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Service", "EdgeTraversal", "deferToUser")); } } } @@ -807,16 +806,23 @@ private void ParseInterfaceTypeElement(Intermediate intermediate, IntermediateSe { switch (value) { - case "RemoteAccess": - case "Wireless": - case "Lan": - case "All": + case "remoteAccess": + value = "RemoteAccess"; + break; + case "wireless": + value = "Wireless"; + break; + case "lan": + value = "Lan"; + break; + case "all": + value = "All"; break; default: if (!this.ParseHelper.ContainsProperty(value)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Value", value, "RemoteAccess", "Wireless", "Lan", "All")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Value", value, "remoteAccess", "wireless", "lan", "all")); value = null; } break; diff --git a/src/ext/Firewall/wixext/FirewallDecompiler.cs b/src/ext/Firewall/wixext/FirewallDecompiler.cs index 7fafab175..46ab2bd15 100644 --- a/src/ext/Firewall/wixext/FirewallDecompiler.cs +++ b/src/ext/Firewall/wixext/FirewallDecompiler.cs @@ -4,6 +4,8 @@ namespace WixToolset.Firewall { using System; using System.Collections.Generic; + using System.Reflection; + using System.Security; using System.Xml.Linq; using WixToolset.Data; using WixToolset.Data.WindowsInstaller; @@ -161,11 +163,11 @@ private void DecompileWixFirewallExceptionTable(Table table) if ((attr & 0x2) == 0x2) { - firewallException.Add(new XAttribute("OnUpdate", "DoNothing")); + firewallException.Add(new XAttribute("OnUpdate", "doNothing")); } else if ((attr & 0x4) == 0x4) { - firewallException.Add(new XAttribute("OnUpdate", "EnableOnly")); + firewallException.Add(new XAttribute("OnUpdate", "enableOnly")); } } @@ -222,10 +224,10 @@ private void DecompileWixFirewallExceptionTable(Table table) case FirewallConstants.IntegerNotSetString: break; case "1": - firewallException.Add(new XAttribute("Action", "Allow")); + firewallException.Add(new XAttribute("Action", "allow")); break; case "0": - firewallException.Add(new XAttribute("Action", "Block")); + firewallException.Add(new XAttribute("Action", "block")); break; default: firewallException.Add(new XAttribute("Action", action)); @@ -241,16 +243,16 @@ private void DecompileWixFirewallExceptionTable(Table table) case FirewallConstants.IntegerNotSetString: break; case "0": - firewallException.Add(new XAttribute("EdgeTraversal", "Deny")); + firewallException.Add(new XAttribute("EdgeTraversal", "deny")); break; case "1": - firewallException.Add(new XAttribute("EdgeTraversal", "Allow")); + firewallException.Add(new XAttribute("EdgeTraversal", "allow")); break; case "2": - firewallException.Add(new XAttribute("EdgeTraversal", "DeferToApp")); + firewallException.Add(new XAttribute("EdgeTraversal", "deferToApp")); break; case "3": - firewallException.Add(new XAttribute("EdgeTraversal", "DeferToUser")); + firewallException.Add(new XAttribute("EdgeTraversal", "deferToUser")); break; default: firewallException.Add(new XAttribute("EdgeTraversal", edgeTraversal)); @@ -292,13 +294,13 @@ private void DecompileWixFirewallExceptionTable(Table table) string[] interfaces = row.FieldAsString(16).Split(new[] { FirewallConstants.FORBIDDEN_FIREWALL_CHAR }, StringSplitOptions.RemoveEmptyEntries); if (interfaces.Length == 1) { - firewallException.Add(new XAttribute("Interface", interfaces[0])); + firewallException.Add(new XAttribute("Interface", interfaces[0].ToCamelCase())); } else { foreach (var interfaceItem in interfaces) { - FirewallDecompiler.AddInterface(firewallException, interfaceItem); + FirewallDecompiler.AddInterface(firewallException, interfaceItem.ToCamelCase()); } } } @@ -308,13 +310,13 @@ private void DecompileWixFirewallExceptionTable(Table table) string[] interfaceTypes = row.FieldAsString(17).Split(','); if (interfaceTypes.Length == 1) { - firewallException.Add(new XAttribute("InterfaceType", interfaceTypes[0])); + firewallException.Add(new XAttribute("InterfaceType", interfaceTypes[0].ToCamelCase())); } else { foreach (var interfaceType in interfaceTypes) { - FirewallDecompiler.AddInterfaceType(firewallException, interfaceType); + FirewallDecompiler.AddInterfaceType(firewallException, interfaceType.ToCamelCase()); } } } @@ -408,19 +410,19 @@ private void DecompileWixFirewallExceptionTable(Table table) case FirewallConstants.IntegerNotSetString: break; case "0": - firewallException.Add(new XAttribute("IPSecSecureFlags", "None")); + firewallException.Add(new XAttribute("IPSecSecureFlags", "none")); break; case "1": - firewallException.Add(new XAttribute("IPSecSecureFlags", "NoEncapsulation")); + firewallException.Add(new XAttribute("IPSecSecureFlags", "noEncapsulation")); break; case "2": - firewallException.Add(new XAttribute("IPSecSecureFlags", "WithIntegrity")); + firewallException.Add(new XAttribute("IPSecSecureFlags", "withIntegrity")); break; case "3": - firewallException.Add(new XAttribute("IPSecSecureFlags", "NegotiateEncryption")); + firewallException.Add(new XAttribute("IPSecSecureFlags", "negotiateEncryption")); break; case "4": - firewallException.Add(new XAttribute("IPSecSecureFlags", "Encrypt")); + firewallException.Add(new XAttribute("IPSecSecureFlags", "encrypt")); break; default: firewallException.Add(new XAttribute("IPSecSecureFlags", secureFlags)); @@ -499,4 +501,14 @@ private void FinalizeFirewallExceptionTable(TableIndexedCollection tables) } } } + + internal static class StringExtensions + { + public static string ToCamelCase(this string str) + { + var camelCase = str[0].ToString().ToLowerInvariant() + str.Substring(1); + + return camelCase; + } + } } diff --git a/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesInterfaces/product.wxs b/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesInterfaces/product.wxs index 142c8f68d..a8e772af4 100644 --- a/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesInterfaces/product.wxs +++ b/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesInterfaces/product.wxs @@ -17,9 +17,9 @@ - - - + + + diff --git a/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesProperties/product.wxs b/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesProperties/product.wxs index 1f9935d59..48696c0df 100644 --- a/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesProperties/product.wxs +++ b/src/test/msi/TestData/FirewallExtensionTests/FirewallRulesProperties/product.wxs @@ -11,7 +11,7 @@ - +