diff options
Diffstat (limited to 'src/wixext/UtilCompiler.cs')
| -rw-r--r-- | src/wixext/UtilCompiler.cs | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index c0312f48..12213e63 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs | |||
| @@ -41,14 +41,6 @@ namespace WixToolset.Util | |||
| 41 | Compatible, | 41 | Compatible, |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | internal enum WixRestartResourceAttributes | ||
| 45 | { | ||
| 46 | Filename = 1, | ||
| 47 | ProcessName, | ||
| 48 | ServiceName, | ||
| 49 | TypeMask = 0xf, | ||
| 50 | } | ||
| 51 | |||
| 52 | internal enum WixRemoveFolderExOn | 44 | internal enum WixRemoveFolderExOn |
| 53 | { | 45 | { |
| 54 | Install = 1, | 46 | Install = 1, |
| @@ -2909,7 +2901,7 @@ namespace WixToolset.Util | |||
| 2909 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 2901 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 2910 | Identifier id = null; | 2902 | Identifier id = null; |
| 2911 | string resource = null; | 2903 | string resource = null; |
| 2912 | var attributes = CompilerConstants.IntegerNotSet; | 2904 | WixRestartResourceAttributes? attributes = null; |
| 2913 | 2905 | ||
| 2914 | foreach (var attrib in element.Attributes()) | 2906 | foreach (var attrib in element.Attributes()) |
| 2915 | { | 2907 | { |
| @@ -2923,17 +2915,17 @@ namespace WixToolset.Util | |||
| 2923 | 2915 | ||
| 2924 | case "Path": | 2916 | case "Path": |
| 2925 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2917 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 2926 | attributes = (int)WixRestartResourceAttributes.Filename; | 2918 | attributes = WixRestartResourceAttributes.Filename; |
| 2927 | break; | 2919 | break; |
| 2928 | 2920 | ||
| 2929 | case "ProcessName": | 2921 | case "ProcessName": |
| 2930 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2922 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 2931 | attributes = (int)WixRestartResourceAttributes.ProcessName; | 2923 | attributes = WixRestartResourceAttributes.ProcessName; |
| 2932 | break; | 2924 | break; |
| 2933 | 2925 | ||
| 2934 | case "ServiceName": | 2926 | case "ServiceName": |
| 2935 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2927 | resource = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 2936 | attributes = (int)WixRestartResourceAttributes.ServiceName; | 2928 | attributes = WixRestartResourceAttributes.ServiceName; |
| 2937 | break; | 2929 | break; |
| 2938 | 2930 | ||
| 2939 | default: | 2931 | default: |
| @@ -2948,14 +2940,14 @@ namespace WixToolset.Util | |||
| 2948 | } | 2940 | } |
| 2949 | 2941 | ||
| 2950 | // Validate the attribute. | 2942 | // Validate the attribute. |
| 2951 | if (null == id) | 2943 | if (id == null) |
| 2952 | { | 2944 | { |
| 2953 | id = this.ParseHelper.CreateIdentifier("wrr", componentId, resource, attributes.ToString()); | 2945 | id = this.ParseHelper.CreateIdentifier("wrr", componentId, resource, attributes.ToString()); |
| 2954 | } | 2946 | } |
| 2955 | 2947 | ||
| 2956 | if (String.IsNullOrEmpty(resource) || CompilerConstants.IntegerNotSet == attributes) | 2948 | if (!attributes.HasValue) |
| 2957 | { | 2949 | { |
| 2958 | this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "Path", "ServiceName")); | 2950 | this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "Path", "ProcessName", "ServiceName")); |
| 2959 | } | 2951 | } |
| 2960 | 2952 | ||
| 2961 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | 2953 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
