diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-04 11:41:55 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-04 11:41:55 -0700 |
| commit | 337124bed6a57b40fca11c5c2f5b554f570522a6 (patch) | |
| tree | 06e8552b11852309a2275e4bd63ee61320061876 /src/ext/ComPlus/wixext | |
| parent | eab57c2ddebc3dc8cebc22f5337f50062f415c0d (diff) | |
| download | wix-337124bed6a57b40fca11c5c2f5b554f570522a6.tar.gz wix-337124bed6a57b40fca11c5c2f5b554f570522a6.tar.bz2 wix-337124bed6a57b40fca11c5c2f5b554f570522a6.zip | |
Move ComPlus.wixext into ext
Diffstat (limited to 'src/ext/ComPlus/wixext')
37 files changed, 6358 insertions, 0 deletions
diff --git a/src/ext/ComPlus/wixext/ComPlusCompiler.cs b/src/ext/ComPlus/wixext/ComPlusCompiler.cs new file mode 100644 index 00000000..4404801e --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusCompiler.cs | |||
| @@ -0,0 +1,2164 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using System.Xml.Linq; | ||
| 8 | using WixToolset.ComPlus.Symbols; | ||
| 9 | using WixToolset.Data; | ||
| 10 | using WixToolset.Extensibility; | ||
| 11 | |||
| 12 | /// <summary> | ||
| 13 | /// The compiler for the WiX Toolset COM+ Extension. | ||
| 14 | /// </summary> | ||
| 15 | public sealed class ComPlusCompiler : BaseCompilerExtension | ||
| 16 | { | ||
| 17 | /// <summary> | ||
| 18 | /// </summary> | ||
| 19 | /// <remarks></remarks> | ||
| 20 | public enum CpiAssemblyAttributes | ||
| 21 | { | ||
| 22 | EventClass = (1 << 0), | ||
| 23 | DotNetAssembly = (1 << 1), | ||
| 24 | DllPathFromGAC = (1 << 2), | ||
| 25 | RegisterInCommit = (1 << 3) | ||
| 26 | } | ||
| 27 | |||
| 28 | public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/complus"; | ||
| 29 | |||
| 30 | /// <summary> | ||
| 31 | /// Processes an element for the Compiler. | ||
| 32 | /// </summary> | ||
| 33 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
| 34 | /// <param name="parentElement">Parent element of element to process.</param> | ||
| 35 | /// <param name="element">Element to process.</param> | ||
| 36 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | ||
| 37 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
| 38 | { | ||
| 39 | switch (parentElement.Name.LocalName) | ||
| 40 | { | ||
| 41 | case "Component": | ||
| 42 | var componentId = context["ComponentId"]; | ||
| 43 | var directoryId = context["DirectoryId"]; | ||
| 44 | var win64 = Boolean.Parse(context["Win64"]); | ||
| 45 | |||
| 46 | switch (element.Name.LocalName) | ||
| 47 | { | ||
| 48 | case "ComPlusPartition": | ||
| 49 | this.ParseComPlusPartitionElement(intermediate, section, element, componentId, win64); | ||
| 50 | break; | ||
| 51 | case "ComPlusPartitionRole": | ||
| 52 | this.ParseComPlusPartitionRoleElement(intermediate, section, element, componentId, null); | ||
| 53 | break; | ||
| 54 | case "ComPlusUserInPartitionRole": | ||
| 55 | this.ParseComPlusUserInPartitionRoleElement(intermediate, section, element, componentId, null); | ||
| 56 | break; | ||
| 57 | case "ComPlusGroupInPartitionRole": | ||
| 58 | this.ParseComPlusGroupInPartitionRoleElement(intermediate, section, element, componentId, null); | ||
| 59 | break; | ||
| 60 | case "ComPlusPartitionUser": | ||
| 61 | this.ParseComPlusPartitionUserElement(intermediate, section, element, componentId, null); | ||
| 62 | break; | ||
| 63 | case "ComPlusApplication": | ||
| 64 | this.ParseComPlusApplicationElement(intermediate, section, element, componentId, win64, null); | ||
| 65 | break; | ||
| 66 | case "ComPlusApplicationRole": | ||
| 67 | this.ParseComPlusApplicationRoleElement(intermediate, section, element, componentId, null); | ||
| 68 | break; | ||
| 69 | case "ComPlusUserInApplicationRole": | ||
| 70 | this.ParseComPlusUserInApplicationRoleElement(intermediate, section, element, componentId, null); | ||
| 71 | break; | ||
| 72 | case "ComPlusGroupInApplicationRole": | ||
| 73 | this.ParseComPlusGroupInApplicationRoleElement(intermediate, section, element, componentId, null); | ||
| 74 | break; | ||
| 75 | case "ComPlusAssembly": | ||
| 76 | this.ParseComPlusAssemblyElement(intermediate, section, element, componentId, win64, null); | ||
| 77 | break; | ||
| 78 | case "ComPlusRoleForComponent": | ||
| 79 | this.ParseComPlusRoleForComponentElement(intermediate, section, element, componentId, null); | ||
| 80 | break; | ||
| 81 | case "ComPlusRoleForInterface": | ||
| 82 | this.ParseComPlusRoleForInterfaceElement(intermediate, section, element, componentId, null); | ||
| 83 | break; | ||
| 84 | case "ComPlusRoleForMethod": | ||
| 85 | this.ParseComPlusRoleForMethodElement(intermediate, section, element, componentId, null); | ||
| 86 | break; | ||
| 87 | case "ComPlusSubscription": | ||
| 88 | this.ParseComPlusSubscriptionElement(intermediate, section, element, componentId, null); | ||
| 89 | break; | ||
| 90 | default: | ||
| 91 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
| 92 | break; | ||
| 93 | } | ||
| 94 | break; | ||
| 95 | case "Fragment": | ||
| 96 | case "Module": | ||
| 97 | case "Package": | ||
| 98 | switch (element.Name.LocalName) | ||
| 99 | { | ||
| 100 | case "ComPlusPartition": | ||
| 101 | this.ParseComPlusPartitionElement(intermediate, section, element, null, false); | ||
| 102 | break; | ||
| 103 | case "ComPlusPartitionRole": | ||
| 104 | this.ParseComPlusPartitionRoleElement(intermediate, section, element, null, null); | ||
| 105 | break; | ||
| 106 | case "ComPlusApplication": | ||
| 107 | this.ParseComPlusApplicationElement(intermediate, section, element, null, false, null); | ||
| 108 | break; | ||
| 109 | case "ComPlusApplicationRole": | ||
| 110 | this.ParseComPlusApplicationRoleElement(intermediate, section, element, null, null); | ||
| 111 | break; | ||
| 112 | default: | ||
| 113 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
| 114 | break; | ||
| 115 | } | ||
| 116 | break; | ||
| 117 | default: | ||
| 118 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
| 119 | break; | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | /// <summary> | ||
| 124 | /// Parses a COM+ partition element. | ||
| 125 | /// </summary> | ||
| 126 | /// <param name="node">Element to parse.</param> | ||
| 127 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 128 | private void ParseComPlusPartitionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64) | ||
| 129 | { | ||
| 130 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 131 | |||
| 132 | Identifier key = null; | ||
| 133 | string id = null; | ||
| 134 | string name = null; | ||
| 135 | |||
| 136 | var properties = new Dictionary<string, string>(); | ||
| 137 | |||
| 138 | foreach (var attrib in node.Attributes()) | ||
| 139 | { | ||
| 140 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 141 | { | ||
| 142 | switch (attrib.Name.LocalName) | ||
| 143 | { | ||
| 144 | case "Id": | ||
| 145 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 146 | break; | ||
| 147 | case "PartitionId": | ||
| 148 | id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); | ||
| 149 | break; | ||
| 150 | case "Name": | ||
| 151 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 152 | break; | ||
| 153 | case "Changeable": | ||
| 154 | this.Messaging.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 155 | break; | ||
| 156 | case "Deleteable": | ||
| 157 | if (null == componentKey) | ||
| 158 | { | ||
| 159 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 160 | } | ||
| 161 | properties["Deleteable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 162 | break; | ||
| 163 | case "Description": | ||
| 164 | if (null == componentKey) | ||
| 165 | { | ||
| 166 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 167 | } | ||
| 168 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 169 | break; | ||
| 170 | default: | ||
| 171 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 172 | break; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | else | ||
| 176 | { | ||
| 177 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 181 | if (null != componentKey && null == name) | ||
| 182 | { | ||
| 183 | this.Messaging.Write(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); | ||
| 184 | } | ||
| 185 | if (null == componentKey && null == id && null == name) | ||
| 186 | { | ||
| 187 | this.Messaging.Write(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); | ||
| 188 | } | ||
| 189 | |||
| 190 | foreach (var child in node.Elements()) | ||
| 191 | { | ||
| 192 | if (this.Namespace == child.Name.Namespace) | ||
| 193 | { | ||
| 194 | switch (child.Name.LocalName) | ||
| 195 | { | ||
| 196 | case "ComPlusPartitionRole": | ||
| 197 | this.ParseComPlusPartitionRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 198 | break; | ||
| 199 | case "ComPlusPartitionUser": | ||
| 200 | this.ParseComPlusPartitionUserElement(intermediate, section, child, componentKey, key?.Id); | ||
| 201 | break; | ||
| 202 | case "ComPlusApplication": | ||
| 203 | this.ParseComPlusApplicationElement(intermediate, section, child, componentKey, win64, key?.Id); | ||
| 204 | break; | ||
| 205 | default: | ||
| 206 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 207 | break; | ||
| 208 | } | ||
| 209 | } | ||
| 210 | else | ||
| 211 | { | ||
| 212 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 213 | } | ||
| 214 | } | ||
| 215 | |||
| 216 | section.AddSymbol(new ComPlusPartitionSymbol(sourceLineNumbers, key) | ||
| 217 | { | ||
| 218 | ComponentRef = componentKey, | ||
| 219 | PartitionId = id, | ||
| 220 | Name = name, | ||
| 221 | }); | ||
| 222 | |||
| 223 | foreach (var kvp in properties) | ||
| 224 | { | ||
| 225 | section.AddSymbol(new ComPlusPartitionPropertySymbol(sourceLineNumbers) | ||
| 226 | { | ||
| 227 | PartitionRef = key?.Id, | ||
| 228 | Name = kvp.Key, | ||
| 229 | Value = kvp.Value, | ||
| 230 | }); | ||
| 231 | } | ||
| 232 | |||
| 233 | if (componentKey != null) | ||
| 234 | { | ||
| 235 | this.AddReferenceToConfigureComPlus(section, sourceLineNumbers, node.Name.LocalName, win64); | ||
| 236 | } | ||
| 237 | } | ||
| 238 | |||
| 239 | /// <summary> | ||
| 240 | /// Parses a COM+ partition role element. | ||
| 241 | /// </summary> | ||
| 242 | /// <param name="node">Element to parse.</param> | ||
| 243 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 244 | /// <param name="applicationKey">Optional identifier of parent application.</param> | ||
| 245 | private void ParseComPlusPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionKey) | ||
| 246 | { | ||
| 247 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 248 | |||
| 249 | Identifier key = null; | ||
| 250 | string name = null; | ||
| 251 | |||
| 252 | foreach (var attrib in node.Attributes()) | ||
| 253 | { | ||
| 254 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 255 | { | ||
| 256 | switch (attrib.Name.LocalName) | ||
| 257 | { | ||
| 258 | case "Id": | ||
| 259 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 260 | break; | ||
| 261 | case "Partition": | ||
| 262 | if (null != partitionKey) | ||
| 263 | { | ||
| 264 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 265 | } | ||
| 266 | partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 267 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusPartition, partitionKey); | ||
| 268 | break; | ||
| 269 | case "Name": | ||
| 270 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 271 | break; | ||
| 272 | default: | ||
| 273 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 274 | break; | ||
| 275 | } | ||
| 276 | } | ||
| 277 | else | ||
| 278 | { | ||
| 279 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 280 | } | ||
| 281 | } | ||
| 282 | |||
| 283 | if (null == partitionKey) | ||
| 284 | { | ||
| 285 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); | ||
| 286 | } | ||
| 287 | |||
| 288 | foreach (var child in node.Elements()) | ||
| 289 | { | ||
| 290 | if (this.Namespace == child.Name.Namespace) | ||
| 291 | { | ||
| 292 | switch (child.Name.LocalName) | ||
| 293 | { | ||
| 294 | case "ComPlusUserInPartitionRole": | ||
| 295 | this.ParseComPlusUserInPartitionRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 296 | break; | ||
| 297 | case "ComPlusGroupInPartitionRole": | ||
| 298 | this.ParseComPlusGroupInPartitionRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 299 | break; | ||
| 300 | default: | ||
| 301 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 302 | break; | ||
| 303 | } | ||
| 304 | } | ||
| 305 | else | ||
| 306 | { | ||
| 307 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 308 | } | ||
| 309 | } | ||
| 310 | |||
| 311 | section.AddSymbol(new ComPlusPartitionRoleSymbol(sourceLineNumbers, key) | ||
| 312 | { | ||
| 313 | PartitionRef = partitionKey, | ||
| 314 | Name = name, | ||
| 315 | }); | ||
| 316 | } | ||
| 317 | |||
| 318 | /// <summary> | ||
| 319 | /// Parses a COM+ partition role user element. | ||
| 320 | /// </summary> | ||
| 321 | /// <param name="node">Element to parse.</param> | ||
| 322 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 323 | /// <param name="applicationKey">Optional identifier of parent application role.</param> | ||
| 324 | private void ParseComPlusUserInPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionRoleKey) | ||
| 325 | { | ||
| 326 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 327 | |||
| 328 | Identifier key = null; | ||
| 329 | string user = null; | ||
| 330 | |||
| 331 | foreach (var attrib in node.Attributes()) | ||
| 332 | { | ||
| 333 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 334 | { | ||
| 335 | switch (attrib.Name.LocalName) | ||
| 336 | { | ||
| 337 | case "Id": | ||
| 338 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 339 | break; | ||
| 340 | case "PartitionRole": | ||
| 341 | if (null != partitionRoleKey) | ||
| 342 | { | ||
| 343 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 344 | } | ||
| 345 | partitionRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 346 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusPartitionRole, partitionRoleKey); | ||
| 347 | break; | ||
| 348 | case "User": | ||
| 349 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 350 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); | ||
| 351 | break; | ||
| 352 | default: | ||
| 353 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 354 | break; | ||
| 355 | } | ||
| 356 | } | ||
| 357 | else | ||
| 358 | { | ||
| 359 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 360 | } | ||
| 361 | } | ||
| 362 | |||
| 363 | if (null == partitionRoleKey) | ||
| 364 | { | ||
| 365 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); | ||
| 366 | } | ||
| 367 | |||
| 368 | section.AddSymbol(new ComPlusUserInPartitionRoleSymbol(sourceLineNumbers, key) | ||
| 369 | { | ||
| 370 | PartitionRoleRef = partitionRoleKey, | ||
| 371 | ComponentRef = componentKey, | ||
| 372 | UserRef = user, | ||
| 373 | }); | ||
| 374 | } | ||
| 375 | |||
| 376 | /// <summary> | ||
| 377 | /// Parses a COM+ partition role user element. | ||
| 378 | /// </summary> | ||
| 379 | /// <param name="node">Element to parse.</param> | ||
| 380 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 381 | /// <param name="applicationKey">Optional identifier of parent application role.</param> | ||
| 382 | private void ParseComPlusGroupInPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionRoleKey) | ||
| 383 | { | ||
| 384 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 385 | |||
| 386 | Identifier key = null; | ||
| 387 | string group = null; | ||
| 388 | |||
| 389 | foreach (var attrib in node.Attributes()) | ||
| 390 | { | ||
| 391 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 392 | { | ||
| 393 | switch (attrib.Name.LocalName) | ||
| 394 | { | ||
| 395 | case "Id": | ||
| 396 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 397 | break; | ||
| 398 | case "PartitionRole": | ||
| 399 | if (null != partitionRoleKey) | ||
| 400 | { | ||
| 401 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 402 | } | ||
| 403 | partitionRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 404 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusPartitionRole, partitionRoleKey); | ||
| 405 | break; | ||
| 406 | case "Group": | ||
| 407 | group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 408 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group); | ||
| 409 | break; | ||
| 410 | default: | ||
| 411 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 412 | break; | ||
| 413 | } | ||
| 414 | } | ||
| 415 | else | ||
| 416 | { | ||
| 417 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 418 | } | ||
| 419 | } | ||
| 420 | |||
| 421 | if (null == partitionRoleKey) | ||
| 422 | { | ||
| 423 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); | ||
| 424 | } | ||
| 425 | |||
| 426 | section.AddSymbol(new ComPlusGroupInPartitionRoleSymbol(sourceLineNumbers, key) | ||
| 427 | { | ||
| 428 | PartitionRoleRef = partitionRoleKey, | ||
| 429 | ComponentRef = componentKey, | ||
| 430 | GroupRef = group, | ||
| 431 | }); | ||
| 432 | } | ||
| 433 | |||
| 434 | /// <summary> | ||
| 435 | /// Parses a COM+ partition element. | ||
| 436 | /// </summary> | ||
| 437 | /// <param name="node">Element to parse.</param> | ||
| 438 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 439 | private void ParseComPlusPartitionUserElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionKey) | ||
| 440 | { | ||
| 441 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 442 | |||
| 443 | Identifier key = null; | ||
| 444 | string user = null; | ||
| 445 | |||
| 446 | foreach (var attrib in node.Attributes()) | ||
| 447 | { | ||
| 448 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 449 | { | ||
| 450 | switch (attrib.Name.LocalName) | ||
| 451 | { | ||
| 452 | case "Id": | ||
| 453 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 454 | break; | ||
| 455 | case "Partition": | ||
| 456 | if (null != partitionKey) | ||
| 457 | { | ||
| 458 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 459 | } | ||
| 460 | partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 461 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusPartition, partitionKey); | ||
| 462 | break; | ||
| 463 | case "User": | ||
| 464 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 465 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); | ||
| 466 | break; | ||
| 467 | default: | ||
| 468 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 469 | break; | ||
| 470 | } | ||
| 471 | } | ||
| 472 | else | ||
| 473 | { | ||
| 474 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 475 | } | ||
| 476 | } | ||
| 477 | |||
| 478 | if (null == partitionKey) | ||
| 479 | { | ||
| 480 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); | ||
| 481 | } | ||
| 482 | |||
| 483 | section.AddSymbol(new ComPlusPartitionUserSymbol(sourceLineNumbers, key) | ||
| 484 | { | ||
| 485 | PartitionRef = partitionKey, | ||
| 486 | ComponentRef = componentKey, | ||
| 487 | UserRef = user, | ||
| 488 | }); | ||
| 489 | } | ||
| 490 | |||
| 491 | /// <summary> | ||
| 492 | /// Parses a COM+ application element. | ||
| 493 | /// </summary> | ||
| 494 | /// <param name="node">Element to parse.</param> | ||
| 495 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 496 | /// <param name="partitionKey">Optional identifier of parent partition.</param> | ||
| 497 | private void ParseComPlusApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64, string partitionKey) | ||
| 498 | { | ||
| 499 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 500 | |||
| 501 | Identifier key = null; | ||
| 502 | string id = null; | ||
| 503 | string name = null; | ||
| 504 | |||
| 505 | var properties = new Dictionary<string, string>(); | ||
| 506 | |||
| 507 | foreach (XAttribute attrib in node.Attributes()) | ||
| 508 | { | ||
| 509 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 510 | { | ||
| 511 | switch (attrib.Name.LocalName) | ||
| 512 | { | ||
| 513 | case "Id": | ||
| 514 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 515 | break; | ||
| 516 | case "Partition": | ||
| 517 | if (null != partitionKey) | ||
| 518 | { | ||
| 519 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 520 | } | ||
| 521 | partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 522 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusPartition, partitionKey); | ||
| 523 | break; | ||
| 524 | case "ApplicationId": | ||
| 525 | id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); | ||
| 526 | break; | ||
| 527 | case "Name": | ||
| 528 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 529 | break; | ||
| 530 | case "ThreeGigSupportEnabled": | ||
| 531 | if (null == componentKey) | ||
| 532 | { | ||
| 533 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 534 | } | ||
| 535 | properties["3GigSupportEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 536 | break; | ||
| 537 | case "AccessChecksLevel": | ||
| 538 | if (null == componentKey) | ||
| 539 | { | ||
| 540 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 541 | } | ||
| 542 | var accessChecksLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 543 | switch (accessChecksLevelValue) | ||
| 544 | { | ||
| 545 | case "applicationLevel": | ||
| 546 | properties["AccessChecksLevel"] = "0"; | ||
| 547 | break; | ||
| 548 | case "applicationComponentLevel": | ||
| 549 | properties["AccessChecksLevel"] = "1"; | ||
| 550 | break; | ||
| 551 | default: | ||
| 552 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AccessChecksLevel", accessChecksLevelValue, "applicationLevel", "applicationComponentLevel")); | ||
| 553 | break; | ||
| 554 | } | ||
| 555 | break; | ||
| 556 | case "Activation": | ||
| 557 | if (null == componentKey) | ||
| 558 | { | ||
| 559 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 560 | } | ||
| 561 | var activationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 562 | switch (activationValue) | ||
| 563 | { | ||
| 564 | case "inproc": | ||
| 565 | properties["Activation"] = "Inproc"; | ||
| 566 | break; | ||
| 567 | case "local": | ||
| 568 | properties["Activation"] = "Local"; | ||
| 569 | break; | ||
| 570 | default: | ||
| 571 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Activation", activationValue, "inproc", "local")); | ||
| 572 | break; | ||
| 573 | } | ||
| 574 | break; | ||
| 575 | case "ApplicationAccessChecksEnabled": | ||
| 576 | if (null == componentKey) | ||
| 577 | { | ||
| 578 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 579 | } | ||
| 580 | properties["ApplicationAccessChecksEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 581 | break; | ||
| 582 | case "ApplicationDirectory": | ||
| 583 | if (null == componentKey) | ||
| 584 | { | ||
| 585 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 586 | } | ||
| 587 | properties["ApplicationDirectory"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 588 | break; | ||
| 589 | case "Authentication": | ||
| 590 | if (null == componentKey) | ||
| 591 | { | ||
| 592 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 593 | } | ||
| 594 | string authenticationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 595 | switch (authenticationValue) | ||
| 596 | { | ||
| 597 | case "default": | ||
| 598 | properties["Authentication"] = "0"; | ||
| 599 | break; | ||
| 600 | case "none": | ||
| 601 | properties["Authentication"] = "1"; | ||
| 602 | break; | ||
| 603 | case "connect": | ||
| 604 | properties["Authentication"] = "2"; | ||
| 605 | break; | ||
| 606 | case "call": | ||
| 607 | properties["Authentication"] = "3"; | ||
| 608 | break; | ||
| 609 | case "packet": | ||
| 610 | properties["Authentication"] = "4"; | ||
| 611 | break; | ||
| 612 | case "integrity": | ||
| 613 | properties["Authentication"] = "5"; | ||
| 614 | break; | ||
| 615 | case "privacy": | ||
| 616 | properties["Authentication"] = "6"; | ||
| 617 | break; | ||
| 618 | default: | ||
| 619 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Authentication", authenticationValue, "default", "none", "connect", "call", "packet", "integrity", "privacy")); | ||
| 620 | break; | ||
| 621 | } | ||
| 622 | break; | ||
| 623 | case "AuthenticationCapability": | ||
| 624 | if (null == componentKey) | ||
| 625 | { | ||
| 626 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 627 | } | ||
| 628 | var authenticationCapabilityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 629 | switch (authenticationCapabilityValue) | ||
| 630 | { | ||
| 631 | case "none": | ||
| 632 | properties["AuthenticationCapability"] = "0"; | ||
| 633 | break; | ||
| 634 | case "secureReference": | ||
| 635 | properties["AuthenticationCapability"] = "2"; | ||
| 636 | break; | ||
| 637 | case "staticCloaking": | ||
| 638 | properties["AuthenticationCapability"] = "32"; | ||
| 639 | break; | ||
| 640 | case "dynamicCloaking": | ||
| 641 | properties["AuthenticationCapability"] = "64"; | ||
| 642 | break; | ||
| 643 | default: | ||
| 644 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AuthenticationCapability", authenticationCapabilityValue, "none", "secureReference", "staticCloaking", "dynamicCloaking")); | ||
| 645 | break; | ||
| 646 | } | ||
| 647 | break; | ||
| 648 | case "Changeable": | ||
| 649 | this.Messaging.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 650 | break; | ||
| 651 | case "CommandLine": | ||
| 652 | if (null == componentKey) | ||
| 653 | { | ||
| 654 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 655 | } | ||
| 656 | properties["CommandLine"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 657 | break; | ||
| 658 | case "ConcurrentApps": | ||
| 659 | if (null == componentKey) | ||
| 660 | { | ||
| 661 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 662 | } | ||
| 663 | properties["ConcurrentApps"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 664 | break; | ||
| 665 | case "CreatedBy": | ||
| 666 | if (null == componentKey) | ||
| 667 | { | ||
| 668 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 669 | } | ||
| 670 | properties["CreatedBy"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 671 | break; | ||
| 672 | case "CRMEnabled": | ||
| 673 | if (null == componentKey) | ||
| 674 | { | ||
| 675 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 676 | } | ||
| 677 | properties["CRMEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 678 | break; | ||
| 679 | case "CRMLogFile": | ||
| 680 | if (null == componentKey) | ||
| 681 | { | ||
| 682 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 683 | } | ||
| 684 | properties["CRMLogFile"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 685 | break; | ||
| 686 | case "Deleteable": | ||
| 687 | if (null == componentKey) | ||
| 688 | { | ||
| 689 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 690 | } | ||
| 691 | properties["Deleteable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 692 | break; | ||
| 693 | case "Description": | ||
| 694 | if (null == componentKey) | ||
| 695 | { | ||
| 696 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 697 | } | ||
| 698 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 699 | break; | ||
| 700 | case "DumpEnabled": | ||
| 701 | if (null == componentKey) | ||
| 702 | { | ||
| 703 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 704 | } | ||
| 705 | properties["DumpEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 706 | break; | ||
| 707 | case "DumpOnException": | ||
| 708 | if (null == componentKey) | ||
| 709 | { | ||
| 710 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 711 | } | ||
| 712 | properties["DumpOnException"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 713 | break; | ||
| 714 | case "DumpOnFailfast": | ||
| 715 | if (null == componentKey) | ||
| 716 | { | ||
| 717 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 718 | } | ||
| 719 | properties["DumpOnFailfast"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 720 | break; | ||
| 721 | case "DumpPath": | ||
| 722 | if (null == componentKey) | ||
| 723 | { | ||
| 724 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 725 | } | ||
| 726 | properties["DumpPath"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 727 | break; | ||
| 728 | case "EventsEnabled": | ||
| 729 | if (null == componentKey) | ||
| 730 | { | ||
| 731 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 732 | } | ||
| 733 | properties["EventsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 734 | break; | ||
| 735 | case "Identity": | ||
| 736 | if (null == componentKey) | ||
| 737 | { | ||
| 738 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 739 | } | ||
| 740 | properties["Identity"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 741 | break; | ||
| 742 | case "ImpersonationLevel": | ||
| 743 | if (null == componentKey) | ||
| 744 | { | ||
| 745 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 746 | } | ||
| 747 | string impersonationLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 748 | switch (impersonationLevelValue) | ||
| 749 | { | ||
| 750 | case "anonymous": | ||
| 751 | properties["ImpersonationLevel"] = "1"; | ||
| 752 | break; | ||
| 753 | case "identify": | ||
| 754 | properties["ImpersonationLevel"] = "2"; | ||
| 755 | break; | ||
| 756 | case "impersonate": | ||
| 757 | properties["ImpersonationLevel"] = "3"; | ||
| 758 | break; | ||
| 759 | case "delegate": | ||
| 760 | properties["ImpersonationLevel"] = "4"; | ||
| 761 | break; | ||
| 762 | default: | ||
| 763 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "ImpersonationLevel", impersonationLevelValue, "anonymous", "identify", "impersonate", "delegate")); | ||
| 764 | break; | ||
| 765 | } | ||
| 766 | break; | ||
| 767 | case "IsEnabled": | ||
| 768 | if (null == componentKey) | ||
| 769 | { | ||
| 770 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 771 | } | ||
| 772 | properties["IsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 773 | break; | ||
| 774 | case "MaxDumpCount": | ||
| 775 | if (null == componentKey) | ||
| 776 | { | ||
| 777 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 778 | } | ||
| 779 | properties["MaxDumpCount"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 780 | break; | ||
| 781 | case "Password": | ||
| 782 | if (null == componentKey) | ||
| 783 | { | ||
| 784 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 785 | } | ||
| 786 | properties["Password"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 787 | break; | ||
| 788 | case "QCAuthenticateMsgs": | ||
| 789 | if (null == componentKey) | ||
| 790 | { | ||
| 791 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 792 | } | ||
| 793 | string qcAuthenticateMsgsValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 794 | switch (qcAuthenticateMsgsValue) | ||
| 795 | { | ||
| 796 | case "secureApps": | ||
| 797 | properties["QCAuthenticateMsgs"] = "0"; | ||
| 798 | break; | ||
| 799 | case "off": | ||
| 800 | properties["QCAuthenticateMsgs"] = "1"; | ||
| 801 | break; | ||
| 802 | case "on": | ||
| 803 | properties["QCAuthenticateMsgs"] = "2"; | ||
| 804 | break; | ||
| 805 | default: | ||
| 806 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "QCAuthenticateMsgs", qcAuthenticateMsgsValue, "secureApps", "off", "on")); | ||
| 807 | break; | ||
| 808 | } | ||
| 809 | break; | ||
| 810 | case "QCListenerMaxThreads": | ||
| 811 | if (null == componentKey) | ||
| 812 | { | ||
| 813 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 814 | } | ||
| 815 | properties["QCListenerMaxThreads"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 816 | break; | ||
| 817 | case "QueueListenerEnabled": | ||
| 818 | if (null == componentKey) | ||
| 819 | { | ||
| 820 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 821 | } | ||
| 822 | properties["QueueListenerEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 823 | break; | ||
| 824 | case "QueuingEnabled": | ||
| 825 | if (null == componentKey) | ||
| 826 | { | ||
| 827 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 828 | } | ||
| 829 | properties["QueuingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 830 | break; | ||
| 831 | case "RecycleActivationLimit": | ||
| 832 | if (null == componentKey) | ||
| 833 | { | ||
| 834 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 835 | } | ||
| 836 | properties["RecycleActivationLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 837 | break; | ||
| 838 | case "RecycleCallLimit": | ||
| 839 | if (null == componentKey) | ||
| 840 | { | ||
| 841 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 842 | } | ||
| 843 | properties["RecycleCallLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 844 | break; | ||
| 845 | case "RecycleExpirationTimeout": | ||
| 846 | if (null == componentKey) | ||
| 847 | { | ||
| 848 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 849 | } | ||
| 850 | properties["RecycleExpirationTimeout"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 851 | break; | ||
| 852 | case "RecycleLifetimeLimit": | ||
| 853 | if (null == componentKey) | ||
| 854 | { | ||
| 855 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 856 | } | ||
| 857 | properties["RecycleLifetimeLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 858 | break; | ||
| 859 | case "RecycleMemoryLimit": | ||
| 860 | if (null == componentKey) | ||
| 861 | { | ||
| 862 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 863 | } | ||
| 864 | properties["RecycleMemoryLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 865 | break; | ||
| 866 | case "Replicable": | ||
| 867 | if (null == componentKey) | ||
| 868 | { | ||
| 869 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 870 | } | ||
| 871 | properties["Replicable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 872 | break; | ||
| 873 | case "RunForever": | ||
| 874 | if (null == componentKey) | ||
| 875 | { | ||
| 876 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 877 | } | ||
| 878 | properties["RunForever"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 879 | break; | ||
| 880 | case "ShutdownAfter": | ||
| 881 | if (null == componentKey) | ||
| 882 | { | ||
| 883 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 884 | } | ||
| 885 | properties["ShutdownAfter"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 886 | break; | ||
| 887 | case "SoapActivated": | ||
| 888 | if (null == componentKey) | ||
| 889 | { | ||
| 890 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 891 | } | ||
| 892 | properties["SoapActivated"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 893 | break; | ||
| 894 | case "SoapBaseUrl": | ||
| 895 | if (null == componentKey) | ||
| 896 | { | ||
| 897 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 898 | } | ||
| 899 | properties["SoapBaseUrl"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 900 | break; | ||
| 901 | case "SoapMailTo": | ||
| 902 | if (null == componentKey) | ||
| 903 | { | ||
| 904 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 905 | } | ||
| 906 | properties["SoapMailTo"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 907 | break; | ||
| 908 | case "SoapVRoot": | ||
| 909 | if (null == componentKey) | ||
| 910 | { | ||
| 911 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 912 | } | ||
| 913 | properties["SoapVRoot"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 914 | break; | ||
| 915 | case "SRPEnabled": | ||
| 916 | if (null == componentKey) | ||
| 917 | { | ||
| 918 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 919 | } | ||
| 920 | properties["SRPEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 921 | break; | ||
| 922 | case "SRPTrustLevel": | ||
| 923 | if (null == componentKey) | ||
| 924 | { | ||
| 925 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 926 | } | ||
| 927 | var srpTrustLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 928 | switch (srpTrustLevelValue) | ||
| 929 | { | ||
| 930 | case "disallowed": | ||
| 931 | properties["SRPTrustLevel"] = "0"; | ||
| 932 | break; | ||
| 933 | case "fullyTrusted": | ||
| 934 | properties["SRPTrustLevel"] = "262144"; | ||
| 935 | break; | ||
| 936 | default: | ||
| 937 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "SRPTrustLevel", srpTrustLevelValue, "disallowed", "fullyTrusted")); | ||
| 938 | break; | ||
| 939 | } | ||
| 940 | break; | ||
| 941 | default: | ||
| 942 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 943 | break; | ||
| 944 | } | ||
| 945 | } | ||
| 946 | else | ||
| 947 | { | ||
| 948 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 949 | } | ||
| 950 | } | ||
| 951 | |||
| 952 | if (null != componentKey && null == name) | ||
| 953 | { | ||
| 954 | this.Messaging.Write(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); | ||
| 955 | } | ||
| 956 | if (null == componentKey && null == id && null == name) | ||
| 957 | { | ||
| 958 | this.Messaging.Write(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); | ||
| 959 | } | ||
| 960 | |||
| 961 | foreach (var child in node.Elements()) | ||
| 962 | { | ||
| 963 | if (this.Namespace == child.Name.Namespace) | ||
| 964 | { | ||
| 965 | switch (child.Name.LocalName) | ||
| 966 | { | ||
| 967 | case "ComPlusApplicationRole": | ||
| 968 | this.ParseComPlusApplicationRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 969 | break; | ||
| 970 | case "ComPlusAssembly": | ||
| 971 | this.ParseComPlusAssemblyElement(intermediate, section, child, componentKey, win64, key?.Id); | ||
| 972 | break; | ||
| 973 | default: | ||
| 974 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 975 | break; | ||
| 976 | } | ||
| 977 | } | ||
| 978 | else | ||
| 979 | { | ||
| 980 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 981 | } | ||
| 982 | } | ||
| 983 | |||
| 984 | section.AddSymbol(new ComPlusApplicationSymbol(sourceLineNumbers, key) | ||
| 985 | { | ||
| 986 | PartitionRef = partitionKey, | ||
| 987 | ComponentRef = componentKey, | ||
| 988 | ApplicationId = id, | ||
| 989 | Name = name, | ||
| 990 | }); | ||
| 991 | |||
| 992 | foreach (var kvp in properties) | ||
| 993 | { | ||
| 994 | section.AddSymbol(new ComPlusApplicationPropertySymbol(sourceLineNumbers) | ||
| 995 | { | ||
| 996 | ApplicationRef = key?.Id, | ||
| 997 | Name = kvp.Key, | ||
| 998 | Value = kvp.Value, | ||
| 999 | }); | ||
| 1000 | } | ||
| 1001 | |||
| 1002 | if (componentKey != null) | ||
| 1003 | { | ||
| 1004 | this.AddReferenceToConfigureComPlus(section, sourceLineNumbers, node.Name.LocalName, win64); | ||
| 1005 | } | ||
| 1006 | } | ||
| 1007 | |||
| 1008 | /// <summary> | ||
| 1009 | /// Parses a COM+ application role element. | ||
| 1010 | /// </summary> | ||
| 1011 | /// <param name="node">Element to parse.</param> | ||
| 1012 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1013 | /// <param name="applicationKey">Optional identifier of parent application.</param> | ||
| 1014 | private void ParseComPlusApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationKey) | ||
| 1015 | { | ||
| 1016 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1017 | |||
| 1018 | Identifier key = null; | ||
| 1019 | string name = null; | ||
| 1020 | |||
| 1021 | var properties = new Dictionary<string, string>(); | ||
| 1022 | |||
| 1023 | foreach (var attrib in node.Attributes()) | ||
| 1024 | { | ||
| 1025 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1026 | { | ||
| 1027 | switch (attrib.Name.LocalName) | ||
| 1028 | { | ||
| 1029 | case "Id": | ||
| 1030 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1031 | break; | ||
| 1032 | case "Application": | ||
| 1033 | if (null != applicationKey) | ||
| 1034 | { | ||
| 1035 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1036 | } | ||
| 1037 | applicationKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1038 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusApplication, applicationKey); | ||
| 1039 | break; | ||
| 1040 | case "Name": | ||
| 1041 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1042 | break; | ||
| 1043 | case "Description": | ||
| 1044 | if (null == componentKey) | ||
| 1045 | { | ||
| 1046 | this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); | ||
| 1047 | } | ||
| 1048 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1049 | break; | ||
| 1050 | default: | ||
| 1051 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1052 | break; | ||
| 1053 | } | ||
| 1054 | } | ||
| 1055 | else | ||
| 1056 | { | ||
| 1057 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1058 | } | ||
| 1059 | } | ||
| 1060 | |||
| 1061 | if (null == applicationKey) | ||
| 1062 | { | ||
| 1063 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application")); | ||
| 1064 | } | ||
| 1065 | |||
| 1066 | foreach (var child in node.Elements()) | ||
| 1067 | { | ||
| 1068 | if (this.Namespace == child.Name.Namespace) | ||
| 1069 | { | ||
| 1070 | switch (child.Name.LocalName) | ||
| 1071 | { | ||
| 1072 | case "ComPlusUserInApplicationRole": | ||
| 1073 | this.ParseComPlusUserInApplicationRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1074 | break; | ||
| 1075 | case "ComPlusGroupInApplicationRole": | ||
| 1076 | this.ParseComPlusGroupInApplicationRoleElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1077 | break; | ||
| 1078 | default: | ||
| 1079 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 1080 | break; | ||
| 1081 | } | ||
| 1082 | } | ||
| 1083 | else | ||
| 1084 | { | ||
| 1085 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 1086 | } | ||
| 1087 | } | ||
| 1088 | |||
| 1089 | section.AddSymbol(new ComPlusApplicationRoleSymbol(sourceLineNumbers, key) | ||
| 1090 | { | ||
| 1091 | ApplicationRef = applicationKey, | ||
| 1092 | ComponentRef = componentKey, | ||
| 1093 | Name = name, | ||
| 1094 | }); | ||
| 1095 | |||
| 1096 | foreach (var kvp in properties) | ||
| 1097 | { | ||
| 1098 | section.AddSymbol(new ComPlusApplicationRolePropertySymbol(sourceLineNumbers) | ||
| 1099 | { | ||
| 1100 | ApplicationRoleRef = key?.Id, | ||
| 1101 | Name = kvp.Key, | ||
| 1102 | Value = kvp.Value, | ||
| 1103 | }); | ||
| 1104 | } | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | /// <summary> | ||
| 1108 | /// Parses a COM+ application role user element. | ||
| 1109 | /// </summary> | ||
| 1110 | /// <param name="node">Element to parse.</param> | ||
| 1111 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1112 | /// <param name="applicationKey">Optional identifier of parent application role.</param> | ||
| 1113 | private void ParseComPlusUserInApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationRoleKey) | ||
| 1114 | { | ||
| 1115 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1116 | |||
| 1117 | Identifier key = null; | ||
| 1118 | string user = null; | ||
| 1119 | |||
| 1120 | foreach (var attrib in node.Attributes()) | ||
| 1121 | { | ||
| 1122 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1123 | { | ||
| 1124 | switch (attrib.Name.LocalName) | ||
| 1125 | { | ||
| 1126 | case "Id": | ||
| 1127 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1128 | break; | ||
| 1129 | case "ApplicationRole": | ||
| 1130 | if (null != applicationRoleKey) | ||
| 1131 | { | ||
| 1132 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1133 | } | ||
| 1134 | applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1135 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusApplicationRole, applicationRoleKey); | ||
| 1136 | break; | ||
| 1137 | case "User": | ||
| 1138 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1139 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); | ||
| 1140 | break; | ||
| 1141 | default: | ||
| 1142 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1143 | break; | ||
| 1144 | } | ||
| 1145 | } | ||
| 1146 | else | ||
| 1147 | { | ||
| 1148 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1149 | } | ||
| 1150 | } | ||
| 1151 | |||
| 1152 | if (null == applicationRoleKey) | ||
| 1153 | { | ||
| 1154 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | section.AddSymbol(new ComPlusUserInApplicationRoleSymbol(sourceLineNumbers, key) | ||
| 1158 | { | ||
| 1159 | ApplicationRoleRef = applicationRoleKey, | ||
| 1160 | ComponentRef = componentKey, | ||
| 1161 | UserRef = user, | ||
| 1162 | }); | ||
| 1163 | } | ||
| 1164 | |||
| 1165 | /// <summary> | ||
| 1166 | /// Parses a COM+ application role group element. | ||
| 1167 | /// </summary> | ||
| 1168 | /// <param name="node">Element to parse.</param> | ||
| 1169 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1170 | /// <param name="applicationKey">Optional identifier of parent application role.</param> | ||
| 1171 | private void ParseComPlusGroupInApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationRoleKey) | ||
| 1172 | { | ||
| 1173 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1174 | |||
| 1175 | Identifier key = null; | ||
| 1176 | string group = null; | ||
| 1177 | |||
| 1178 | foreach (var attrib in node.Attributes()) | ||
| 1179 | { | ||
| 1180 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1181 | { | ||
| 1182 | switch (attrib.Name.LocalName) | ||
| 1183 | { | ||
| 1184 | case "Id": | ||
| 1185 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1186 | break; | ||
| 1187 | case "ApplicationRole": | ||
| 1188 | if (null != applicationRoleKey) | ||
| 1189 | { | ||
| 1190 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1191 | } | ||
| 1192 | applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1193 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusApplicationRole, applicationRoleKey); | ||
| 1194 | break; | ||
| 1195 | case "Group": | ||
| 1196 | group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1197 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group); | ||
| 1198 | break; | ||
| 1199 | default: | ||
| 1200 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1201 | break; | ||
| 1202 | } | ||
| 1203 | } | ||
| 1204 | else | ||
| 1205 | { | ||
| 1206 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1207 | } | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | if (null == applicationRoleKey) | ||
| 1211 | { | ||
| 1212 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); | ||
| 1213 | } | ||
| 1214 | |||
| 1215 | section.AddSymbol(new ComPlusGroupInApplicationRoleSymbol(sourceLineNumbers, key) | ||
| 1216 | { | ||
| 1217 | ApplicationRoleRef = applicationRoleKey, | ||
| 1218 | ComponentRef = componentKey, | ||
| 1219 | GroupRef = group, | ||
| 1220 | }); | ||
| 1221 | } | ||
| 1222 | |||
| 1223 | /// <summary> | ||
| 1224 | /// Parses a COM+ assembly element. | ||
| 1225 | /// </summary> | ||
| 1226 | /// <param name="node">Element to parse.</param> | ||
| 1227 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1228 | /// <param name="applicationKey">Optional identifier of parent application.</param> | ||
| 1229 | private void ParseComPlusAssemblyElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64, string applicationKey) | ||
| 1230 | { | ||
| 1231 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1232 | |||
| 1233 | Identifier key = null; | ||
| 1234 | string assemblyName = null; | ||
| 1235 | string dllPath = null; | ||
| 1236 | string tlbPath = null; | ||
| 1237 | string psDllPath = null; | ||
| 1238 | int attributes = 0; | ||
| 1239 | |||
| 1240 | var hasComponents = false; | ||
| 1241 | |||
| 1242 | foreach (var attrib in node.Attributes()) | ||
| 1243 | { | ||
| 1244 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1245 | { | ||
| 1246 | switch (attrib.Name.LocalName) | ||
| 1247 | { | ||
| 1248 | case "Id": | ||
| 1249 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1250 | break; | ||
| 1251 | case "Application": | ||
| 1252 | if (null != applicationKey) | ||
| 1253 | { | ||
| 1254 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1255 | } | ||
| 1256 | applicationKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1257 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusApplication, applicationKey); | ||
| 1258 | break; | ||
| 1259 | case "AssemblyName": | ||
| 1260 | assemblyName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1261 | break; | ||
| 1262 | case "DllPath": | ||
| 1263 | dllPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1264 | break; | ||
| 1265 | case "TlbPath": | ||
| 1266 | tlbPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1267 | break; | ||
| 1268 | case "PSDllPath": | ||
| 1269 | psDllPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1270 | break; | ||
| 1271 | case "Type": | ||
| 1272 | string typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1273 | switch (typeValue) | ||
| 1274 | { | ||
| 1275 | case ".net": | ||
| 1276 | attributes |= (int)CpiAssemblyAttributes.DotNetAssembly; | ||
| 1277 | break; | ||
| 1278 | case "native": | ||
| 1279 | attributes &= ~(int)CpiAssemblyAttributes.DotNetAssembly; | ||
| 1280 | break; | ||
| 1281 | default: | ||
| 1282 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusAssembly", "Type", typeValue, ".net", "native")); | ||
| 1283 | break; | ||
| 1284 | } | ||
| 1285 | break; | ||
| 1286 | case "EventClass": | ||
| 1287 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
| 1288 | { | ||
| 1289 | attributes |= (int)CpiAssemblyAttributes.EventClass; | ||
| 1290 | } | ||
| 1291 | else | ||
| 1292 | { | ||
| 1293 | attributes &= ~(int)CpiAssemblyAttributes.EventClass; | ||
| 1294 | } | ||
| 1295 | break; | ||
| 1296 | case "DllPathFromGAC": | ||
| 1297 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
| 1298 | { | ||
| 1299 | attributes |= (int)CpiAssemblyAttributes.DllPathFromGAC; | ||
| 1300 | } | ||
| 1301 | else | ||
| 1302 | { | ||
| 1303 | attributes &= ~(int)CpiAssemblyAttributes.DllPathFromGAC; | ||
| 1304 | } | ||
| 1305 | break; | ||
| 1306 | case "RegisterInCommit": | ||
| 1307 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | ||
| 1308 | { | ||
| 1309 | attributes |= (int)CpiAssemblyAttributes.RegisterInCommit; | ||
| 1310 | } | ||
| 1311 | else | ||
| 1312 | { | ||
| 1313 | attributes &= ~(int)CpiAssemblyAttributes.RegisterInCommit; | ||
| 1314 | } | ||
| 1315 | break; | ||
| 1316 | default: | ||
| 1317 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1318 | break; | ||
| 1319 | } | ||
| 1320 | } | ||
| 1321 | else | ||
| 1322 | { | ||
| 1323 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1324 | } | ||
| 1325 | } | ||
| 1326 | |||
| 1327 | if (null == applicationKey && 0 == (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) | ||
| 1328 | { | ||
| 1329 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application", "Type", "native")); | ||
| 1330 | } | ||
| 1331 | if (null != assemblyName && 0 == (attributes & (int)CpiAssemblyAttributes.DllPathFromGAC)) | ||
| 1332 | { | ||
| 1333 | this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithoutOtherValue(sourceLineNumbers, node.Name.LocalName, "AssemblyName", "DllPathFromGAC", "no")); | ||
| 1334 | } | ||
| 1335 | if (null == tlbPath && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) | ||
| 1336 | { | ||
| 1337 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TlbPath", "Type", ".net")); | ||
| 1338 | } | ||
| 1339 | if (null != psDllPath && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) | ||
| 1340 | { | ||
| 1341 | this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "PSDllPath", "Type", ".net")); | ||
| 1342 | } | ||
| 1343 | if (0 != (attributes & (int)CpiAssemblyAttributes.EventClass) && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) | ||
| 1344 | { | ||
| 1345 | this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "EventClass", "yes", "Type", ".net")); | ||
| 1346 | } | ||
| 1347 | |||
| 1348 | foreach (var child in node.Elements()) | ||
| 1349 | { | ||
| 1350 | if (this.Namespace == child.Name.Namespace) | ||
| 1351 | { | ||
| 1352 | switch (child.Name.LocalName) | ||
| 1353 | { | ||
| 1354 | case "ComPlusAssemblyDependency": | ||
| 1355 | this.ParseComPlusAssemblyDependencyElement(intermediate, section, child, key?.Id); | ||
| 1356 | break; | ||
| 1357 | case "ComPlusComponent": | ||
| 1358 | this.ParseComPlusComponentElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1359 | hasComponents = true; | ||
| 1360 | break; | ||
| 1361 | default: | ||
| 1362 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 1363 | break; | ||
| 1364 | } | ||
| 1365 | } | ||
| 1366 | else | ||
| 1367 | { | ||
| 1368 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 1369 | } | ||
| 1370 | } | ||
| 1371 | |||
| 1372 | if (0 == (attributes & (int)CpiAssemblyAttributes.DotNetAssembly) && !hasComponents) | ||
| 1373 | { | ||
| 1374 | this.Messaging.Write(ComPlusWarnings.MissingComponents(sourceLineNumbers)); | ||
| 1375 | } | ||
| 1376 | |||
| 1377 | section.AddSymbol(new ComPlusAssemblySymbol(sourceLineNumbers, key) | ||
| 1378 | { | ||
| 1379 | ApplicationRef = applicationKey, | ||
| 1380 | ComponentRef = componentKey, | ||
| 1381 | AssemblyName = assemblyName, | ||
| 1382 | DllPath = dllPath, | ||
| 1383 | TlbPath = tlbPath, | ||
| 1384 | PSDllPath = psDllPath, | ||
| 1385 | Attributes = attributes, | ||
| 1386 | }); | ||
| 1387 | |||
| 1388 | this.AddReferenceToConfigureComPlus(section, sourceLineNumbers, node.Name.LocalName, win64); | ||
| 1389 | } | ||
| 1390 | |||
| 1391 | /// <summary> | ||
| 1392 | /// Parses a COM+ assembly dependency element. | ||
| 1393 | /// </summary> | ||
| 1394 | /// <param name="node">Element to parse.</param> | ||
| 1395 | /// <param name="assemblyKey">Identifier of parent assembly.</param> | ||
| 1396 | private void ParseComPlusAssemblyDependencyElement(Intermediate intermediate, IntermediateSection section, XElement node, string assemblyKey) | ||
| 1397 | { | ||
| 1398 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1399 | |||
| 1400 | string requiredAssemblyKey = null; | ||
| 1401 | |||
| 1402 | foreach (var attrib in node.Attributes()) | ||
| 1403 | { | ||
| 1404 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1405 | { | ||
| 1406 | switch (attrib.Name.LocalName) | ||
| 1407 | { | ||
| 1408 | case "RequiredAssembly": | ||
| 1409 | requiredAssemblyKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1410 | break; | ||
| 1411 | default: | ||
| 1412 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1413 | break; | ||
| 1414 | } | ||
| 1415 | } | ||
| 1416 | else | ||
| 1417 | { | ||
| 1418 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1419 | } | ||
| 1420 | } | ||
| 1421 | |||
| 1422 | section.AddSymbol(new ComPlusAssemblyDependencySymbol(sourceLineNumbers) | ||
| 1423 | { | ||
| 1424 | AssemblyRef = assemblyKey, | ||
| 1425 | RequiredAssemblyRef = requiredAssemblyKey, | ||
| 1426 | }); | ||
| 1427 | } | ||
| 1428 | |||
| 1429 | /// <summary> | ||
| 1430 | /// Parses a COM+ component element. | ||
| 1431 | /// </summary> | ||
| 1432 | /// <param name="node">Element to parse.</param> | ||
| 1433 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1434 | /// <param name="assemblyKey">Identifier of parent assembly.</param> | ||
| 1435 | private void ParseComPlusComponentElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string assemblyKey) | ||
| 1436 | { | ||
| 1437 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1438 | |||
| 1439 | Identifier key = null; | ||
| 1440 | string clsid = null; | ||
| 1441 | |||
| 1442 | var properties = new Dictionary<string, string>(); | ||
| 1443 | |||
| 1444 | foreach (var attrib in node.Attributes()) | ||
| 1445 | { | ||
| 1446 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1447 | { | ||
| 1448 | switch (attrib.Name.LocalName) | ||
| 1449 | { | ||
| 1450 | case "Id": | ||
| 1451 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1452 | break; | ||
| 1453 | case "CLSID": | ||
| 1454 | clsid = "{" + this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib) + "}"; | ||
| 1455 | break; | ||
| 1456 | case "AllowInprocSubscribers": | ||
| 1457 | properties["AllowInprocSubscribers"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1458 | break; | ||
| 1459 | case "ComponentAccessChecksEnabled": | ||
| 1460 | properties["ComponentAccessChecksEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1461 | break; | ||
| 1462 | case "ComponentTransactionTimeout": | ||
| 1463 | properties["ComponentTransactionTimeout"] = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 3600).ToString(); | ||
| 1464 | break; | ||
| 1465 | case "ComponentTransactionTimeoutEnabled": | ||
| 1466 | properties["ComponentTransactionTimeoutEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1467 | break; | ||
| 1468 | case "COMTIIntrinsics": | ||
| 1469 | properties["COMTIIntrinsics"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1470 | break; | ||
| 1471 | case "ConstructionEnabled": | ||
| 1472 | properties["ConstructionEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1473 | break; | ||
| 1474 | case "ConstructorString": | ||
| 1475 | properties["ConstructorString"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1476 | break; | ||
| 1477 | case "CreationTimeout": | ||
| 1478 | properties["CreationTimeout"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1479 | break; | ||
| 1480 | case "Description": | ||
| 1481 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1482 | break; | ||
| 1483 | case "EventTrackingEnabled": | ||
| 1484 | properties["EventTrackingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1485 | break; | ||
| 1486 | case "ExceptionClass": | ||
| 1487 | properties["ExceptionClass"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1488 | break; | ||
| 1489 | case "FireInParallel": | ||
| 1490 | properties["FireInParallel"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1491 | break; | ||
| 1492 | case "IISIntrinsics": | ||
| 1493 | properties["IISIntrinsics"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1494 | break; | ||
| 1495 | case "InitializesServerApplication": | ||
| 1496 | properties["InitializesServerApplication"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1497 | break; | ||
| 1498 | case "IsEnabled": | ||
| 1499 | properties["IsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1500 | break; | ||
| 1501 | case "IsPrivateComponent": | ||
| 1502 | properties["IsPrivateComponent"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1503 | break; | ||
| 1504 | case "JustInTimeActivation": | ||
| 1505 | properties["JustInTimeActivation"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1506 | break; | ||
| 1507 | case "LoadBalancingSupported": | ||
| 1508 | properties["LoadBalancingSupported"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1509 | break; | ||
| 1510 | case "MaxPoolSize": | ||
| 1511 | properties["MaxPoolSize"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1512 | break; | ||
| 1513 | case "MinPoolSize": | ||
| 1514 | properties["MinPoolSize"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1515 | break; | ||
| 1516 | case "MultiInterfacePublisherFilterCLSID": | ||
| 1517 | properties["MultiInterfacePublisherFilterCLSID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1518 | break; | ||
| 1519 | case "MustRunInClientContext": | ||
| 1520 | properties["MustRunInClientContext"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1521 | break; | ||
| 1522 | case "MustRunInDefaultContext": | ||
| 1523 | properties["MustRunInDefaultContext"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1524 | break; | ||
| 1525 | case "ObjectPoolingEnabled": | ||
| 1526 | properties["ObjectPoolingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1527 | break; | ||
| 1528 | case "PublisherID": | ||
| 1529 | properties["PublisherID"] = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); | ||
| 1530 | break; | ||
| 1531 | case "SoapAssemblyName": | ||
| 1532 | properties["SoapAssemblyName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1533 | break; | ||
| 1534 | case "SoapTypeName": | ||
| 1535 | properties["SoapTypeName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1536 | break; | ||
| 1537 | case "Synchronization": | ||
| 1538 | var synchronizationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1539 | switch (synchronizationValue) | ||
| 1540 | { | ||
| 1541 | case "ignored": | ||
| 1542 | properties["Synchronization"] = "0"; | ||
| 1543 | break; | ||
| 1544 | case "none": | ||
| 1545 | properties["Synchronization"] = "1"; | ||
| 1546 | break; | ||
| 1547 | case "supported": | ||
| 1548 | properties["Synchronization"] = "2"; | ||
| 1549 | break; | ||
| 1550 | case "required": | ||
| 1551 | properties["Synchronization"] = "3"; | ||
| 1552 | break; | ||
| 1553 | case "requiresNew": | ||
| 1554 | properties["Synchronization"] = "4"; | ||
| 1555 | break; | ||
| 1556 | default: | ||
| 1557 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Synchronization", synchronizationValue, "ignored", "none", "supported", "required", "requiresNew")); | ||
| 1558 | break; | ||
| 1559 | } | ||
| 1560 | break; | ||
| 1561 | case "Transaction": | ||
| 1562 | var transactionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1563 | switch (transactionValue) | ||
| 1564 | { | ||
| 1565 | case "ignored": | ||
| 1566 | properties["Transaction"] = "0"; | ||
| 1567 | break; | ||
| 1568 | case "none": | ||
| 1569 | properties["Transaction"] = "1"; | ||
| 1570 | break; | ||
| 1571 | case "supported": | ||
| 1572 | properties["Transaction"] = "2"; | ||
| 1573 | break; | ||
| 1574 | case "required": | ||
| 1575 | properties["Transaction"] = "3"; | ||
| 1576 | break; | ||
| 1577 | case "requiresNew": | ||
| 1578 | properties["Transaction"] = "4"; | ||
| 1579 | break; | ||
| 1580 | default: | ||
| 1581 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Transaction", transactionValue, "ignored", "none", "supported", "required", "requiresNew")); | ||
| 1582 | break; | ||
| 1583 | } | ||
| 1584 | break; | ||
| 1585 | case "TxIsolationLevel": | ||
| 1586 | var txIsolationLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1587 | switch (txIsolationLevelValue) | ||
| 1588 | { | ||
| 1589 | case "any": | ||
| 1590 | properties["TxIsolationLevel"] = "0"; | ||
| 1591 | break; | ||
| 1592 | case "readUnCommitted": | ||
| 1593 | properties["TxIsolationLevel"] = "1"; | ||
| 1594 | break; | ||
| 1595 | case "readCommitted": | ||
| 1596 | properties["TxIsolationLevel"] = "2"; | ||
| 1597 | break; | ||
| 1598 | case "repeatableRead": | ||
| 1599 | properties["TxIsolationLevel"] = "3"; | ||
| 1600 | break; | ||
| 1601 | case "serializable": | ||
| 1602 | properties["TxIsolationLevel"] = "4"; | ||
| 1603 | break; | ||
| 1604 | default: | ||
| 1605 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "TxIsolationLevel", txIsolationLevelValue, "any", "readUnCommitted", "readCommitted", "repeatableRead", "serializable")); | ||
| 1606 | break; | ||
| 1607 | } | ||
| 1608 | break; | ||
| 1609 | default: | ||
| 1610 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1611 | break; | ||
| 1612 | } | ||
| 1613 | } | ||
| 1614 | else | ||
| 1615 | { | ||
| 1616 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1617 | } | ||
| 1618 | } | ||
| 1619 | |||
| 1620 | foreach (var child in node.Elements()) | ||
| 1621 | { | ||
| 1622 | if (this.Namespace == child.Name.Namespace) | ||
| 1623 | { | ||
| 1624 | switch (child.Name.LocalName) | ||
| 1625 | { | ||
| 1626 | case "ComPlusRoleForComponent": | ||
| 1627 | this.ParseComPlusRoleForComponentElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1628 | break; | ||
| 1629 | case "ComPlusInterface": | ||
| 1630 | this.ParseComPlusInterfaceElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1631 | break; | ||
| 1632 | case "ComPlusSubscription": | ||
| 1633 | this.ParseComPlusSubscriptionElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1634 | break; | ||
| 1635 | default: | ||
| 1636 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 1637 | break; | ||
| 1638 | } | ||
| 1639 | } | ||
| 1640 | else | ||
| 1641 | { | ||
| 1642 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 1643 | } | ||
| 1644 | } | ||
| 1645 | |||
| 1646 | section.AddSymbol(new ComPlusComponentSymbol(sourceLineNumbers, key) | ||
| 1647 | { | ||
| 1648 | AssemblyRef = assemblyKey, | ||
| 1649 | CLSID = clsid, | ||
| 1650 | }); | ||
| 1651 | |||
| 1652 | foreach (var kvp in properties) | ||
| 1653 | { | ||
| 1654 | section.AddSymbol(new ComPlusComponentPropertySymbol(sourceLineNumbers) | ||
| 1655 | { | ||
| 1656 | ComPlusComponentRef = key?.Id, | ||
| 1657 | Name = kvp.Key, | ||
| 1658 | Value = kvp.Value, | ||
| 1659 | }); | ||
| 1660 | } | ||
| 1661 | } | ||
| 1662 | |||
| 1663 | /// <summary> | ||
| 1664 | /// Parses a COM+ application role for component element. | ||
| 1665 | /// </summary> | ||
| 1666 | /// <param name="node">Element to parse.</param> | ||
| 1667 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1668 | /// <param name="cpcomponentKey">Identifier of parent COM+ component.</param> | ||
| 1669 | private void ParseComPlusRoleForComponentElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) | ||
| 1670 | { | ||
| 1671 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1672 | |||
| 1673 | Identifier key = null; | ||
| 1674 | string applicationRoleKey = null; | ||
| 1675 | |||
| 1676 | foreach (var attrib in node.Attributes()) | ||
| 1677 | { | ||
| 1678 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1679 | { | ||
| 1680 | switch (attrib.Name.LocalName) | ||
| 1681 | { | ||
| 1682 | case "Id": | ||
| 1683 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1684 | break; | ||
| 1685 | case "Component": | ||
| 1686 | if (null != cpcomponentKey) | ||
| 1687 | { | ||
| 1688 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1689 | } | ||
| 1690 | cpcomponentKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1691 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusComponent, cpcomponentKey); | ||
| 1692 | break; | ||
| 1693 | case "ApplicationRole": | ||
| 1694 | applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1695 | break; | ||
| 1696 | default: | ||
| 1697 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1698 | break; | ||
| 1699 | } | ||
| 1700 | } | ||
| 1701 | else | ||
| 1702 | { | ||
| 1703 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1704 | } | ||
| 1705 | } | ||
| 1706 | |||
| 1707 | if (null == cpcomponentKey) | ||
| 1708 | { | ||
| 1709 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); | ||
| 1710 | } | ||
| 1711 | |||
| 1712 | section.AddSymbol(new ComPlusRoleForComponentSymbol(sourceLineNumbers, key) | ||
| 1713 | { | ||
| 1714 | ComPlusComponentRef = cpcomponentKey, | ||
| 1715 | ApplicationRoleRef = applicationRoleKey, | ||
| 1716 | ComponentRef = componentKey, | ||
| 1717 | }); | ||
| 1718 | } | ||
| 1719 | |||
| 1720 | /// <summary> | ||
| 1721 | /// Parses a COM+ interface element. | ||
| 1722 | /// </summary> | ||
| 1723 | /// <param name="node">Element to parse.</param> | ||
| 1724 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1725 | /// <param name="cpcomponentKey">Identifier of parent COM+ component.</param> | ||
| 1726 | private void ParseComPlusInterfaceElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) | ||
| 1727 | { | ||
| 1728 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1729 | |||
| 1730 | // parse attributes | ||
| 1731 | Identifier key = null; | ||
| 1732 | string iid = null; | ||
| 1733 | |||
| 1734 | var properties = new Dictionary<string, string>(); | ||
| 1735 | |||
| 1736 | foreach (var attrib in node.Attributes()) | ||
| 1737 | { | ||
| 1738 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1739 | { | ||
| 1740 | switch (attrib.Name.LocalName) | ||
| 1741 | { | ||
| 1742 | case "Id": | ||
| 1743 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1744 | break; | ||
| 1745 | case "IID": | ||
| 1746 | iid = "{" + this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib) + "}"; | ||
| 1747 | break; | ||
| 1748 | case "Description": | ||
| 1749 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1750 | break; | ||
| 1751 | case "QueuingEnabled": | ||
| 1752 | properties["QueuingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1753 | break; | ||
| 1754 | default: | ||
| 1755 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1756 | break; | ||
| 1757 | } | ||
| 1758 | } | ||
| 1759 | else | ||
| 1760 | { | ||
| 1761 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1762 | } | ||
| 1763 | } | ||
| 1764 | |||
| 1765 | foreach (var child in node.Elements()) | ||
| 1766 | { | ||
| 1767 | if (this.Namespace == child.Name.Namespace) | ||
| 1768 | { | ||
| 1769 | switch (child.Name.LocalName) | ||
| 1770 | { | ||
| 1771 | case "ComPlusRoleForInterface": | ||
| 1772 | this.ParseComPlusRoleForInterfaceElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1773 | break; | ||
| 1774 | case "ComPlusMethod": | ||
| 1775 | this.ParseComPlusMethodElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1776 | break; | ||
| 1777 | default: | ||
| 1778 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 1779 | break; | ||
| 1780 | } | ||
| 1781 | } | ||
| 1782 | else | ||
| 1783 | { | ||
| 1784 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 1785 | } | ||
| 1786 | } | ||
| 1787 | |||
| 1788 | section.AddSymbol(new ComPlusInterfaceSymbol(sourceLineNumbers, key) | ||
| 1789 | { | ||
| 1790 | ComPlusComponentRef = cpcomponentKey, | ||
| 1791 | IID = iid, | ||
| 1792 | }); | ||
| 1793 | |||
| 1794 | foreach (var kvp in properties) | ||
| 1795 | { | ||
| 1796 | section.AddSymbol(new ComPlusInterfacePropertySymbol(sourceLineNumbers) | ||
| 1797 | { | ||
| 1798 | InterfaceRef = key?.Id, | ||
| 1799 | Name = kvp.Key, | ||
| 1800 | Value = kvp.Value, | ||
| 1801 | }); | ||
| 1802 | } | ||
| 1803 | } | ||
| 1804 | |||
| 1805 | /// <summary> | ||
| 1806 | /// Parses a COM+ application role for interface element. | ||
| 1807 | /// </summary> | ||
| 1808 | /// <param name="node">Element to parse.</param> | ||
| 1809 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1810 | /// <param name="interfaceKey">Identifier of parent interface.</param> | ||
| 1811 | private void ParseComPlusRoleForInterfaceElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string interfaceKey) | ||
| 1812 | { | ||
| 1813 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1814 | |||
| 1815 | Identifier key = null; | ||
| 1816 | string applicationRoleKey = null; | ||
| 1817 | |||
| 1818 | foreach (var attrib in node.Attributes()) | ||
| 1819 | { | ||
| 1820 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1821 | { | ||
| 1822 | switch (attrib.Name.LocalName) | ||
| 1823 | { | ||
| 1824 | case "Id": | ||
| 1825 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1826 | break; | ||
| 1827 | case "Interface": | ||
| 1828 | if (null != interfaceKey) | ||
| 1829 | { | ||
| 1830 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1831 | } | ||
| 1832 | interfaceKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1833 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusInterface, interfaceKey); | ||
| 1834 | break; | ||
| 1835 | case "ApplicationRole": | ||
| 1836 | applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1837 | break; | ||
| 1838 | default: | ||
| 1839 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1840 | break; | ||
| 1841 | } | ||
| 1842 | } | ||
| 1843 | else | ||
| 1844 | { | ||
| 1845 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1846 | } | ||
| 1847 | } | ||
| 1848 | |||
| 1849 | if (null == interfaceKey) | ||
| 1850 | { | ||
| 1851 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Interface")); | ||
| 1852 | } | ||
| 1853 | |||
| 1854 | section.AddSymbol(new ComPlusRoleForInterfaceSymbol(sourceLineNumbers, key) | ||
| 1855 | { | ||
| 1856 | InterfaceRef = interfaceKey, | ||
| 1857 | ApplicationRoleRef = applicationRoleKey, | ||
| 1858 | ComponentRef = componentKey, | ||
| 1859 | }); | ||
| 1860 | } | ||
| 1861 | |||
| 1862 | /// <summary> | ||
| 1863 | /// Parses a COM+ method element. | ||
| 1864 | /// </summary> | ||
| 1865 | /// <param name="node">Element to parse.</param> | ||
| 1866 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1867 | /// <param name="interfaceKey">Identifier of parent interface.</param> | ||
| 1868 | private void ParseComPlusMethodElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string interfaceKey) | ||
| 1869 | { | ||
| 1870 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1871 | |||
| 1872 | Identifier key = null; | ||
| 1873 | var index = CompilerConstants.IntegerNotSet; | ||
| 1874 | string name = null; | ||
| 1875 | |||
| 1876 | var properties = new Dictionary<string, string>(); | ||
| 1877 | |||
| 1878 | foreach (var attrib in node.Attributes()) | ||
| 1879 | { | ||
| 1880 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1881 | { | ||
| 1882 | switch (attrib.Name.LocalName) | ||
| 1883 | { | ||
| 1884 | case "Id": | ||
| 1885 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1886 | break; | ||
| 1887 | case "Index": | ||
| 1888 | index = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | ||
| 1889 | break; | ||
| 1890 | case "Name": | ||
| 1891 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1892 | break; | ||
| 1893 | case "AutoComplete": | ||
| 1894 | properties["AutoComplete"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 1895 | break; | ||
| 1896 | case "Description": | ||
| 1897 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1898 | break; | ||
| 1899 | default: | ||
| 1900 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1901 | break; | ||
| 1902 | } | ||
| 1903 | } | ||
| 1904 | else | ||
| 1905 | { | ||
| 1906 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1907 | } | ||
| 1908 | } | ||
| 1909 | |||
| 1910 | foreach (var child in node.Elements()) | ||
| 1911 | { | ||
| 1912 | if (this.Namespace == child.Name.Namespace) | ||
| 1913 | { | ||
| 1914 | switch (child.Name.LocalName) | ||
| 1915 | { | ||
| 1916 | case "ComPlusRoleForMethod": | ||
| 1917 | this.ParseComPlusRoleForMethodElement(intermediate, section, child, componentKey, key?.Id); | ||
| 1918 | break; | ||
| 1919 | default: | ||
| 1920 | this.ParseHelper.UnexpectedElement(node, child); | ||
| 1921 | break; | ||
| 1922 | } | ||
| 1923 | } | ||
| 1924 | else | ||
| 1925 | { | ||
| 1926 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); | ||
| 1927 | } | ||
| 1928 | } | ||
| 1929 | |||
| 1930 | if (CompilerConstants.IntegerNotSet == index && null == name) | ||
| 1931 | { | ||
| 1932 | this.Messaging.Write(ComPlusErrors.RequiredAttribute(sourceLineNumbers, node.Name.LocalName, "Index", "Name")); | ||
| 1933 | } | ||
| 1934 | |||
| 1935 | var symbol = section.AddSymbol(new ComPlusMethodSymbol(sourceLineNumbers, key) | ||
| 1936 | { | ||
| 1937 | InterfaceRef = interfaceKey, | ||
| 1938 | Name = name, | ||
| 1939 | }); | ||
| 1940 | |||
| 1941 | if (CompilerConstants.IntegerNotSet != index) | ||
| 1942 | { | ||
| 1943 | symbol.Index = index; | ||
| 1944 | } | ||
| 1945 | |||
| 1946 | foreach (var kvp in properties) | ||
| 1947 | { | ||
| 1948 | section.AddSymbol(new ComPlusMethodPropertySymbol(sourceLineNumbers) | ||
| 1949 | { | ||
| 1950 | MethodRef = key?.Id, | ||
| 1951 | Name = kvp.Key, | ||
| 1952 | Value = kvp.Value, | ||
| 1953 | }); | ||
| 1954 | } | ||
| 1955 | } | ||
| 1956 | |||
| 1957 | /// <summary> | ||
| 1958 | /// Parses a COM+ application role for method element. | ||
| 1959 | /// </summary> | ||
| 1960 | /// <param name="node">Element to parse.</param> | ||
| 1961 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 1962 | /// <param name="methodKey">Identifier of parent method.</param> | ||
| 1963 | private void ParseComPlusRoleForMethodElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string methodKey) | ||
| 1964 | { | ||
| 1965 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 1966 | |||
| 1967 | Identifier key = null; | ||
| 1968 | string applicationRoleKey = null; | ||
| 1969 | |||
| 1970 | foreach (var attrib in node.Attributes()) | ||
| 1971 | { | ||
| 1972 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 1973 | { | ||
| 1974 | switch (attrib.Name.LocalName) | ||
| 1975 | { | ||
| 1976 | case "Id": | ||
| 1977 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 1978 | break; | ||
| 1979 | case "Method": | ||
| 1980 | if (null != methodKey) | ||
| 1981 | { | ||
| 1982 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 1983 | } | ||
| 1984 | methodKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1985 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusMethod, methodKey); | ||
| 1986 | break; | ||
| 1987 | case "ApplicationRole": | ||
| 1988 | applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1989 | break; | ||
| 1990 | default: | ||
| 1991 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 1992 | break; | ||
| 1993 | } | ||
| 1994 | } | ||
| 1995 | else | ||
| 1996 | { | ||
| 1997 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 1998 | } | ||
| 1999 | } | ||
| 2000 | |||
| 2001 | if (null == methodKey) | ||
| 2002 | { | ||
| 2003 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Method")); | ||
| 2004 | } | ||
| 2005 | |||
| 2006 | section.AddSymbol(new ComPlusRoleForMethodSymbol(sourceLineNumbers, key) | ||
| 2007 | { | ||
| 2008 | MethodRef = methodKey, | ||
| 2009 | ApplicationRoleRef = applicationRoleKey, | ||
| 2010 | ComponentRef = componentKey, | ||
| 2011 | }); | ||
| 2012 | } | ||
| 2013 | |||
| 2014 | /// <summary> | ||
| 2015 | /// Parses a COM+ event subscription element. | ||
| 2016 | /// </summary> | ||
| 2017 | /// <param name="node">Element to parse.</param> | ||
| 2018 | /// <param name="componentKey">Identifier of parent component.</param> | ||
| 2019 | /// <param name="cpcomponentKey">Identifier of parent COM+ component.</param> | ||
| 2020 | private void ParseComPlusSubscriptionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) | ||
| 2021 | { | ||
| 2022 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 2023 | |||
| 2024 | Identifier key = null; | ||
| 2025 | string id = null; | ||
| 2026 | string name = null; | ||
| 2027 | string eventCLSID = null; | ||
| 2028 | string publisherID = null; | ||
| 2029 | |||
| 2030 | var properties = new Dictionary<string, string>(); | ||
| 2031 | |||
| 2032 | foreach (var attrib in node.Attributes()) | ||
| 2033 | { | ||
| 2034 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 2035 | { | ||
| 2036 | switch (attrib.Name.LocalName) | ||
| 2037 | { | ||
| 2038 | case "Id": | ||
| 2039 | key = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | ||
| 2040 | break; | ||
| 2041 | case "Component": | ||
| 2042 | if (null != cpcomponentKey) | ||
| 2043 | { | ||
| 2044 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | ||
| 2045 | } | ||
| 2046 | cpcomponentKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2047 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ComPlusSymbolDefinitions.ComPlusComponent, cpcomponentKey); | ||
| 2048 | break; | ||
| 2049 | case "SubscriptionId": | ||
| 2050 | id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); | ||
| 2051 | break; | ||
| 2052 | case "Name": | ||
| 2053 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2054 | break; | ||
| 2055 | case "EventCLSID": | ||
| 2056 | eventCLSID = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2057 | break; | ||
| 2058 | case "PublisherID": | ||
| 2059 | publisherID = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); | ||
| 2060 | break; | ||
| 2061 | case "Description": | ||
| 2062 | properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2063 | break; | ||
| 2064 | case "Enabled": | ||
| 2065 | properties["Enabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 2066 | break; | ||
| 2067 | case "EventClassPartitionID": | ||
| 2068 | properties["EventClassPartitionID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2069 | break; | ||
| 2070 | case "FilterCriteria": | ||
| 2071 | properties["FilterCriteria"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2072 | break; | ||
| 2073 | case "InterfaceID": | ||
| 2074 | properties["InterfaceID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2075 | break; | ||
| 2076 | case "MachineName": | ||
| 2077 | properties["MachineName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2078 | break; | ||
| 2079 | case "MethodName": | ||
| 2080 | properties["MethodName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2081 | break; | ||
| 2082 | case "PerUser": | ||
| 2083 | properties["PerUser"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 2084 | break; | ||
| 2085 | case "Queued": | ||
| 2086 | properties["Queued"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; | ||
| 2087 | break; | ||
| 2088 | case "SubscriberMoniker": | ||
| 2089 | properties["SubscriberMoniker"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2090 | break; | ||
| 2091 | case "UserName": | ||
| 2092 | properties["UserName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2093 | break; | ||
| 2094 | default: | ||
| 2095 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 2096 | break; | ||
| 2097 | } | ||
| 2098 | } | ||
| 2099 | else | ||
| 2100 | { | ||
| 2101 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 2102 | } | ||
| 2103 | } | ||
| 2104 | |||
| 2105 | if (null == cpcomponentKey) | ||
| 2106 | { | ||
| 2107 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); | ||
| 2108 | } | ||
| 2109 | |||
| 2110 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
| 2111 | |||
| 2112 | section.AddSymbol(new ComPlusSubscriptionSymbol(sourceLineNumbers, key) | ||
| 2113 | { | ||
| 2114 | Subscription = key?.Id, | ||
| 2115 | ComPlusComponentRef = cpcomponentKey, | ||
| 2116 | ComponentRef = componentKey, | ||
| 2117 | SubscriptionId = id, | ||
| 2118 | Name = name, | ||
| 2119 | EventCLSID = eventCLSID, | ||
| 2120 | PublisherID = publisherID, | ||
| 2121 | }); | ||
| 2122 | |||
| 2123 | foreach (var kvp in properties) | ||
| 2124 | { | ||
| 2125 | section.AddSymbol(new ComPlusSubscriptionPropertySymbol(sourceLineNumbers) | ||
| 2126 | { | ||
| 2127 | SubscriptionRef = key?.Id, | ||
| 2128 | Name = kvp.Key, | ||
| 2129 | Value = kvp.Value, | ||
| 2130 | }); | ||
| 2131 | } | ||
| 2132 | } | ||
| 2133 | |||
| 2134 | /// <summary> | ||
| 2135 | /// Attempts to parse the input value as a GUID, and in case the value is a valid | ||
| 2136 | /// GUID returnes it in the format "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}". | ||
| 2137 | /// </summary> | ||
| 2138 | /// <param name="val"></param> | ||
| 2139 | /// <returns></returns> | ||
| 2140 | private string TryFormatGuidValue(string val) | ||
| 2141 | { | ||
| 2142 | if (!Guid.TryParse(val, out var guid)) | ||
| 2143 | { | ||
| 2144 | return val; | ||
| 2145 | } | ||
| 2146 | return guid.ToString("B").ToUpper(); | ||
| 2147 | } | ||
| 2148 | |||
| 2149 | private void AddReferenceToConfigureComPlus(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, bool win64) | ||
| 2150 | { | ||
| 2151 | if (win64) | ||
| 2152 | { | ||
| 2153 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); | ||
| 2154 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); | ||
| 2155 | } | ||
| 2156 | else | ||
| 2157 | { | ||
| 2158 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); | ||
| 2159 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); | ||
| 2160 | } | ||
| 2161 | |||
| 2162 | } | ||
| 2163 | } | ||
| 2164 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusDecompiler.cs b/src/ext/ComPlus/wixext/ComPlusDecompiler.cs new file mode 100644 index 00000000..6da2df94 --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusDecompiler.cs | |||
| @@ -0,0 +1,1845 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | #if TODO_CONSIDER_DECOMPILER | ||
| 6 | using System; | ||
| 7 | using System.Collections; | ||
| 8 | using System.Globalization; | ||
| 9 | using WixToolset.Data; | ||
| 10 | using WixToolset.Extensibility; | ||
| 11 | using ComPlus = WixToolset.Extensions.Serialize.ComPlus; | ||
| 12 | using Wix = WixToolset.Data.Serialize; | ||
| 13 | |||
| 14 | /// <summary> | ||
| 15 | /// The decompiler for the WiX Toolset COM+ Extension. | ||
| 16 | /// </summary> | ||
| 17 | public sealed class ComPlusDecompiler : DecompilerExtension | ||
| 18 | { | ||
| 19 | /// <summary> | ||
| 20 | /// Creates a decompiler for ComPlus Extension. | ||
| 21 | /// </summary> | ||
| 22 | public ComPlusDecompiler() | ||
| 23 | { | ||
| 24 | this.TableDefinitions = ComPlusExtensionData.GetExtensionTableDefinitions(); | ||
| 25 | } | ||
| 26 | |||
| 27 | /// <summary> | ||
| 28 | /// Get the extensions library to be removed. | ||
| 29 | /// </summary> | ||
| 30 | /// <param name="tableDefinitions">Table definitions for library.</param> | ||
| 31 | /// <returns>Library to remove from decompiled output.</returns> | ||
| 32 | public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) | ||
| 33 | { | ||
| 34 | return ComPlusExtensionData.GetExtensionLibrary(tableDefinitions); | ||
| 35 | } | ||
| 36 | |||
| 37 | /// <summary> | ||
| 38 | /// Decompiles an extension table. | ||
| 39 | /// </summary> | ||
| 40 | /// <param name="table">The table to decompile.</param> | ||
| 41 | public override void DecompileTable(Table table) | ||
| 42 | { | ||
| 43 | switch (table.Name) | ||
| 44 | { | ||
| 45 | case "ComPlusPartition": | ||
| 46 | this.DecompileComPlusPartitionTable(table); | ||
| 47 | break; | ||
| 48 | case "ComPlusPartitionProperty": | ||
| 49 | this.DecompileComPlusPartitionPropertyTable(table); | ||
| 50 | break; | ||
| 51 | case "ComPlusPartitionRole": | ||
| 52 | this.DecompileComPlusPartitionRoleTable(table); | ||
| 53 | break; | ||
| 54 | case "ComPlusUserInPartitionRole": | ||
| 55 | this.DecompileComPlusUserInPartitionRoleTable(table); | ||
| 56 | break; | ||
| 57 | case "ComPlusGroupInPartitionRole": | ||
| 58 | this.DecompileComPlusGroupInPartitionRoleTable(table); | ||
| 59 | break; | ||
| 60 | case "ComPlusPartitionUser": | ||
| 61 | this.DecompileComPlusPartitionUserTable(table); | ||
| 62 | break; | ||
| 63 | case "ComPlusApplication": | ||
| 64 | this.DecompileComPlusApplicationTable(table); | ||
| 65 | break; | ||
| 66 | case "ComPlusApplicationProperty": | ||
| 67 | this.DecompileComPlusApplicationPropertyTable(table); | ||
| 68 | break; | ||
| 69 | case "ComPlusApplicationRole": | ||
| 70 | this.DecompileComPlusApplicationRoleTable(table); | ||
| 71 | break; | ||
| 72 | case "ComPlusApplicationRoleProperty": | ||
| 73 | this.DecompileComPlusApplicationRolePropertyTable(table); | ||
| 74 | break; | ||
| 75 | case "ComPlusUserInApplicationRole": | ||
| 76 | this.DecompileComPlusUserInApplicationRoleTable(table); | ||
| 77 | break; | ||
| 78 | case "ComPlusGroupInApplicationRole": | ||
| 79 | this.DecompileComPlusGroupInApplicationRoleTable(table); | ||
| 80 | break; | ||
| 81 | case "ComPlusAssembly": | ||
| 82 | this.DecompileComPlusAssemblyTable(table); | ||
| 83 | break; | ||
| 84 | case "ComPlusComponent": | ||
| 85 | this.DecompileComPlusComponentTable(table); | ||
| 86 | break; | ||
| 87 | case "ComPlusComponentProperty": | ||
| 88 | this.DecompileComPlusComponentPropertyTable(table); | ||
| 89 | break; | ||
| 90 | case "ComPlusRoleForComponent": | ||
| 91 | this.DecompileComPlusRoleForComponentTable(table); | ||
| 92 | break; | ||
| 93 | case "ComPlusInterface": | ||
| 94 | this.DecompileComPlusInterfaceTable(table); | ||
| 95 | break; | ||
| 96 | case "ComPlusInterfaceProperty": | ||
| 97 | this.DecompileComPlusInterfacePropertyTable(table); | ||
| 98 | break; | ||
| 99 | case "ComPlusRoleForInterface": | ||
| 100 | this.DecompileComPlusRoleForInterfaceTable(table); | ||
| 101 | break; | ||
| 102 | case "ComPlusMethod": | ||
| 103 | this.DecompileComPlusMethodTable(table); | ||
| 104 | break; | ||
| 105 | case "ComPlusMethodProperty": | ||
| 106 | this.DecompileComPlusMethodPropertyTable(table); | ||
| 107 | break; | ||
| 108 | case "ComPlusRoleForMethod": | ||
| 109 | this.DecompileComPlusRoleForMethodTable(table); | ||
| 110 | break; | ||
| 111 | case "ComPlusSubscription": | ||
| 112 | this.DecompileComPlusSubscriptionTable(table); | ||
| 113 | break; | ||
| 114 | case "ComPlusSubscriptionProperty": | ||
| 115 | this.DecompileComPlusSubscriptionPropertyTable(table); | ||
| 116 | break; | ||
| 117 | default: | ||
| 118 | base.DecompileTable(table); | ||
| 119 | break; | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | /// <summary> | ||
| 124 | /// Decompile the ComPlusPartition table. | ||
| 125 | /// </summary> | ||
| 126 | /// <param name="table">The table to decompile.</param> | ||
| 127 | private void DecompileComPlusPartitionTable(Table table) | ||
| 128 | { | ||
| 129 | foreach (Row row in table.Rows) | ||
| 130 | { | ||
| 131 | ComPlus.ComPlusPartition partition = new ComPlus.ComPlusPartition(); | ||
| 132 | |||
| 133 | partition.Id = (string)row[0]; | ||
| 134 | |||
| 135 | if (null != row[2]) | ||
| 136 | { | ||
| 137 | partition.PartitionId = (string)row[2]; | ||
| 138 | } | ||
| 139 | |||
| 140 | if (null != row[3]) | ||
| 141 | { | ||
| 142 | partition.Name = (string)row[3]; | ||
| 143 | } | ||
| 144 | |||
| 145 | if (null != row[1]) | ||
| 146 | { | ||
| 147 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
| 148 | if (null != component) | ||
| 149 | { | ||
| 150 | component.AddChild(partition); | ||
| 151 | } | ||
| 152 | else | ||
| 153 | { | ||
| 154 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component")); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | else | ||
| 158 | { | ||
| 159 | this.Core.RootElement.AddChild(partition); | ||
| 160 | } | ||
| 161 | this.Core.IndexElement(row, partition); | ||
| 162 | } | ||
| 163 | } | ||
| 164 | |||
| 165 | /// <summary> | ||
| 166 | /// Decompile the ComPlusPartitionProperty table. | ||
| 167 | /// </summary> | ||
| 168 | /// <param name="table">The table to decompile.</param> | ||
| 169 | private void DecompileComPlusPartitionPropertyTable(Table table) | ||
| 170 | { | ||
| 171 | foreach (Row row in table.Rows) | ||
| 172 | { | ||
| 173 | ComPlus.ComPlusPartition partition = (ComPlus.ComPlusPartition)this.Core.GetIndexedElement("ComPlusPartition", (string)row[0]); | ||
| 174 | if (null == partition) | ||
| 175 | { | ||
| 176 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Partition_", (string)row[0], "ComPlusPartition")); | ||
| 177 | } | ||
| 178 | |||
| 179 | switch ((string)row[1]) | ||
| 180 | { | ||
| 181 | case "Changeable": | ||
| 182 | switch ((string)row[2]) | ||
| 183 | { | ||
| 184 | case "1": | ||
| 185 | partition.Changeable = ComPlus.YesNoType.yes; | ||
| 186 | break; | ||
| 187 | case "0": | ||
| 188 | partition.Changeable = ComPlus.YesNoType.no; | ||
| 189 | break; | ||
| 190 | default: | ||
| 191 | // TODO: Warning | ||
| 192 | break; | ||
| 193 | } | ||
| 194 | break; | ||
| 195 | case "Deleteable": | ||
| 196 | switch ((string)row[2]) | ||
| 197 | { | ||
| 198 | case "1": | ||
| 199 | partition.Deleteable = ComPlus.YesNoType.yes; | ||
| 200 | break; | ||
| 201 | case "0": | ||
| 202 | partition.Deleteable = ComPlus.YesNoType.no; | ||
| 203 | break; | ||
| 204 | default: | ||
| 205 | // TODO: Warning | ||
| 206 | break; | ||
| 207 | } | ||
| 208 | break; | ||
| 209 | case "Description": | ||
| 210 | partition.Description = (string)row[2]; | ||
| 211 | break; | ||
| 212 | default: | ||
| 213 | // TODO: Warning | ||
| 214 | break; | ||
| 215 | } | ||
| 216 | } | ||
| 217 | } | ||
| 218 | |||
| 219 | /// <summary> | ||
| 220 | /// Decompile the ComPlusPartitionRole table. | ||
| 221 | /// </summary> | ||
| 222 | /// <param name="table">The table to decompile.</param> | ||
| 223 | private void DecompileComPlusPartitionRoleTable(Table table) | ||
| 224 | { | ||
| 225 | foreach (Row row in table.Rows) | ||
| 226 | { | ||
| 227 | ComPlus.ComPlusPartitionRole partitionRole = new ComPlus.ComPlusPartitionRole(); | ||
| 228 | |||
| 229 | partitionRole.Id = (string)row[0]; | ||
| 230 | partitionRole.Partition = (string)row[1]; | ||
| 231 | partitionRole.Name = (string)row[3]; | ||
| 232 | |||
| 233 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 234 | if (null != component) | ||
| 235 | { | ||
| 236 | component.AddChild(partitionRole); | ||
| 237 | } | ||
| 238 | else | ||
| 239 | { | ||
| 240 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 241 | } | ||
| 242 | } | ||
| 243 | } | ||
| 244 | |||
| 245 | /// <summary> | ||
| 246 | /// Decompile the ComPlusUserInPartitionRole table. | ||
| 247 | /// </summary> | ||
| 248 | /// <param name="table">The table to decompile.</param> | ||
| 249 | private void DecompileComPlusUserInPartitionRoleTable(Table table) | ||
| 250 | { | ||
| 251 | foreach (Row row in table.Rows) | ||
| 252 | { | ||
| 253 | ComPlus.ComPlusUserInPartitionRole userInPartitionRole = new ComPlus.ComPlusUserInPartitionRole(); | ||
| 254 | |||
| 255 | userInPartitionRole.Id = (string)row[0]; | ||
| 256 | userInPartitionRole.PartitionRole = (string)row[1]; | ||
| 257 | userInPartitionRole.User = (string)row[3]; | ||
| 258 | |||
| 259 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 260 | if (null != component) | ||
| 261 | { | ||
| 262 | component.AddChild(userInPartitionRole); | ||
| 263 | } | ||
| 264 | else | ||
| 265 | { | ||
| 266 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | } | ||
| 270 | |||
| 271 | /// <summary> | ||
| 272 | /// Decompile the ComPlusGroupInPartitionRole table. | ||
| 273 | /// </summary> | ||
| 274 | /// <param name="table">The table to decompile.</param> | ||
| 275 | private void DecompileComPlusGroupInPartitionRoleTable(Table table) | ||
| 276 | { | ||
| 277 | foreach (Row row in table.Rows) | ||
| 278 | { | ||
| 279 | ComPlus.ComPlusGroupInPartitionRole groupInPartitionRole = new ComPlus.ComPlusGroupInPartitionRole(); | ||
| 280 | |||
| 281 | groupInPartitionRole.Id = (string)row[0]; | ||
| 282 | groupInPartitionRole.PartitionRole = (string)row[1]; | ||
| 283 | groupInPartitionRole.Group = (string)row[3]; | ||
| 284 | |||
| 285 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 286 | if (null != component) | ||
| 287 | { | ||
| 288 | component.AddChild(groupInPartitionRole); | ||
| 289 | } | ||
| 290 | else | ||
| 291 | { | ||
| 292 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 293 | } | ||
| 294 | } | ||
| 295 | } | ||
| 296 | |||
| 297 | /// <summary> | ||
| 298 | /// Decompile the ComPlusPartitionUser table. | ||
| 299 | /// </summary> | ||
| 300 | /// <param name="table">The table to decompile.</param> | ||
| 301 | private void DecompileComPlusPartitionUserTable(Table table) | ||
| 302 | { | ||
| 303 | foreach (Row row in table.Rows) | ||
| 304 | { | ||
| 305 | ComPlus.ComPlusPartitionUser partitionUser = new ComPlus.ComPlusPartitionUser(); | ||
| 306 | |||
| 307 | partitionUser.Id = (string)row[0]; | ||
| 308 | partitionUser.Partition = (string)row[1]; | ||
| 309 | partitionUser.User = (string)row[3]; | ||
| 310 | |||
| 311 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 312 | if (null != component) | ||
| 313 | { | ||
| 314 | component.AddChild(partitionUser); | ||
| 315 | } | ||
| 316 | else | ||
| 317 | { | ||
| 318 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 319 | } | ||
| 320 | } | ||
| 321 | } | ||
| 322 | |||
| 323 | /// <summary> | ||
| 324 | /// Decompile the ComPlusApplication table. | ||
| 325 | /// </summary> | ||
| 326 | /// <param name="table">The table to decompile.</param> | ||
| 327 | private void DecompileComPlusApplicationTable(Table table) | ||
| 328 | { | ||
| 329 | foreach (Row row in table.Rows) | ||
| 330 | { | ||
| 331 | ComPlus.ComPlusApplication application = new ComPlus.ComPlusApplication(); | ||
| 332 | |||
| 333 | application.Id = (string)row[0]; | ||
| 334 | application.Partition = (string)row[1]; | ||
| 335 | |||
| 336 | if (null != row[3]) | ||
| 337 | { | ||
| 338 | application.ApplicationId = (string)row[3]; | ||
| 339 | } | ||
| 340 | |||
| 341 | if (null != row[4]) | ||
| 342 | { | ||
| 343 | application.Name = (string)row[4]; | ||
| 344 | } | ||
| 345 | |||
| 346 | if (null != row[2]) | ||
| 347 | { | ||
| 348 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
| 349 | if (null != component) | ||
| 350 | { | ||
| 351 | component.AddChild(application); | ||
| 352 | } | ||
| 353 | else | ||
| 354 | { | ||
| 355 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 356 | } | ||
| 357 | } | ||
| 358 | else | ||
| 359 | { | ||
| 360 | this.Core.RootElement.AddChild(application); | ||
| 361 | } | ||
| 362 | this.Core.IndexElement(row, application); | ||
| 363 | } | ||
| 364 | } | ||
| 365 | |||
| 366 | /// <summary> | ||
| 367 | /// Decompile the ComPlusApplicationProperty table. | ||
| 368 | /// </summary> | ||
| 369 | /// <param name="table">The table to decompile.</param> | ||
| 370 | private void DecompileComPlusApplicationPropertyTable(Table table) | ||
| 371 | { | ||
| 372 | foreach (Row row in table.Rows) | ||
| 373 | { | ||
| 374 | ComPlus.ComPlusApplication application = (ComPlus.ComPlusApplication)this.Core.GetIndexedElement("ComPlusApplication", (string)row[0]); | ||
| 375 | if (null == application) | ||
| 376 | { | ||
| 377 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Application_", (string)row[0], "ComPlusApplication")); | ||
| 378 | } | ||
| 379 | |||
| 380 | switch ((string)row[1]) | ||
| 381 | { | ||
| 382 | case "3GigSupportEnabled": | ||
| 383 | switch ((string)row[2]) | ||
| 384 | { | ||
| 385 | case "1": | ||
| 386 | application.ThreeGigSupportEnabled = ComPlus.YesNoType.yes; | ||
| 387 | break; | ||
| 388 | case "0": | ||
| 389 | application.ThreeGigSupportEnabled = ComPlus.YesNoType.no; | ||
| 390 | break; | ||
| 391 | default: | ||
| 392 | // TODO: Warning | ||
| 393 | break; | ||
| 394 | } | ||
| 395 | break; | ||
| 396 | case "AccessChecksLevel": | ||
| 397 | switch ((string)row[2]) | ||
| 398 | { | ||
| 399 | case "0": | ||
| 400 | application.AccessChecksLevel = ComPlus.ComPlusApplication.AccessChecksLevelType.applicationLevel; | ||
| 401 | break; | ||
| 402 | case "1": | ||
| 403 | application.AccessChecksLevel = ComPlus.ComPlusApplication.AccessChecksLevelType.applicationComponentLevel; | ||
| 404 | break; | ||
| 405 | default: | ||
| 406 | // TODO: Warning | ||
| 407 | break; | ||
| 408 | } | ||
| 409 | break; | ||
| 410 | case "Activation": | ||
| 411 | switch ((string)row[2]) | ||
| 412 | { | ||
| 413 | case "Inproc": | ||
| 414 | application.Activation = ComPlus.ComPlusApplication.ActivationType.inproc; | ||
| 415 | break; | ||
| 416 | case "Local": | ||
| 417 | application.Activation = ComPlus.ComPlusApplication.ActivationType.local; | ||
| 418 | break; | ||
| 419 | default: | ||
| 420 | // TODO: Warning | ||
| 421 | break; | ||
| 422 | } | ||
| 423 | break; | ||
| 424 | case "ApplicationAccessChecksEnabled": | ||
| 425 | switch ((string)row[2]) | ||
| 426 | { | ||
| 427 | case "1": | ||
| 428 | application.ApplicationAccessChecksEnabled = ComPlus.YesNoType.yes; | ||
| 429 | break; | ||
| 430 | case "0": | ||
| 431 | application.ApplicationAccessChecksEnabled = ComPlus.YesNoType.no; | ||
| 432 | break; | ||
| 433 | default: | ||
| 434 | // TODO: Warning | ||
| 435 | break; | ||
| 436 | } | ||
| 437 | break; | ||
| 438 | case "ApplicationDirectory": | ||
| 439 | application.ApplicationDirectory = (string)row[2]; | ||
| 440 | break; | ||
| 441 | case "Authentication": | ||
| 442 | switch ((string)row[2]) | ||
| 443 | { | ||
| 444 | case "0": | ||
| 445 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.@default; | ||
| 446 | break; | ||
| 447 | case "1": | ||
| 448 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.none; | ||
| 449 | break; | ||
| 450 | case "2": | ||
| 451 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.connect; | ||
| 452 | break; | ||
| 453 | case "3": | ||
| 454 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.call; | ||
| 455 | break; | ||
| 456 | case "4": | ||
| 457 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.packet; | ||
| 458 | break; | ||
| 459 | case "5": | ||
| 460 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.integrity; | ||
| 461 | break; | ||
| 462 | case "6": | ||
| 463 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.privacy; | ||
| 464 | break; | ||
| 465 | default: | ||
| 466 | // TODO: Warning | ||
| 467 | break; | ||
| 468 | } | ||
| 469 | break; | ||
| 470 | case "AuthenticationCapability": | ||
| 471 | switch ((string)row[2]) | ||
| 472 | { | ||
| 473 | case "0": | ||
| 474 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.none; | ||
| 475 | break; | ||
| 476 | case "2": | ||
| 477 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.secureReference; | ||
| 478 | break; | ||
| 479 | case "32": | ||
| 480 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.staticCloaking; | ||
| 481 | break; | ||
| 482 | case "64": | ||
| 483 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.dynamicCloaking; | ||
| 484 | break; | ||
| 485 | default: | ||
| 486 | // TODO: Warning | ||
| 487 | break; | ||
| 488 | } | ||
| 489 | break; | ||
| 490 | case "Changeable": | ||
| 491 | switch ((string)row[2]) | ||
| 492 | { | ||
| 493 | case "1": | ||
| 494 | application.Changeable = ComPlus.YesNoType.yes; | ||
| 495 | break; | ||
| 496 | case "0": | ||
| 497 | application.Changeable = ComPlus.YesNoType.no; | ||
| 498 | break; | ||
| 499 | default: | ||
| 500 | // TODO: Warning | ||
| 501 | break; | ||
| 502 | } | ||
| 503 | break; | ||
| 504 | case "CommandLine": | ||
| 505 | application.CommandLine = (string)row[2]; | ||
| 506 | break; | ||
| 507 | case "ConcurrentApps": | ||
| 508 | int concurrentApps; | ||
| 509 | if (Int32.TryParse((string)row[2], out concurrentApps)) | ||
| 510 | { | ||
| 511 | application.ConcurrentApps = concurrentApps; | ||
| 512 | } | ||
| 513 | else | ||
| 514 | { | ||
| 515 | // TODO: Warning | ||
| 516 | } | ||
| 517 | break; | ||
| 518 | case "CreatedBy": | ||
| 519 | application.CreatedBy = (string)row[2]; | ||
| 520 | break; | ||
| 521 | case "CRMEnabled": | ||
| 522 | switch ((string)row[2]) | ||
| 523 | { | ||
| 524 | case "1": | ||
| 525 | application.CRMEnabled = ComPlus.YesNoType.yes; | ||
| 526 | break; | ||
| 527 | case "0": | ||
| 528 | application.CRMEnabled = ComPlus.YesNoType.no; | ||
| 529 | break; | ||
| 530 | default: | ||
| 531 | // TODO: Warning | ||
| 532 | break; | ||
| 533 | } | ||
| 534 | break; | ||
| 535 | case "CRMLogFile": | ||
| 536 | application.CRMLogFile = (string)row[2]; | ||
| 537 | break; | ||
| 538 | case "Deleteable": | ||
| 539 | switch ((string)row[2]) | ||
| 540 | { | ||
| 541 | case "1": | ||
| 542 | application.Deleteable = ComPlus.YesNoType.yes; | ||
| 543 | break; | ||
| 544 | case "0": | ||
| 545 | application.Deleteable = ComPlus.YesNoType.no; | ||
| 546 | break; | ||
| 547 | default: | ||
| 548 | // TODO: Warning | ||
| 549 | break; | ||
| 550 | } | ||
| 551 | break; | ||
| 552 | case "Description": | ||
| 553 | application.Description = (string)row[2]; | ||
| 554 | break; | ||
| 555 | case "DumpEnabled": | ||
| 556 | switch ((string)row[2]) | ||
| 557 | { | ||
| 558 | case "1": | ||
| 559 | application.DumpEnabled = ComPlus.YesNoType.yes; | ||
| 560 | break; | ||
| 561 | case "0": | ||
| 562 | application.DumpEnabled = ComPlus.YesNoType.no; | ||
| 563 | break; | ||
| 564 | default: | ||
| 565 | // TODO: Warning | ||
| 566 | break; | ||
| 567 | } | ||
| 568 | break; | ||
| 569 | case "DumpOnException": | ||
| 570 | switch ((string)row[2]) | ||
| 571 | { | ||
| 572 | case "1": | ||
| 573 | application.DumpOnException = ComPlus.YesNoType.yes; | ||
| 574 | break; | ||
| 575 | case "0": | ||
| 576 | application.DumpOnException = ComPlus.YesNoType.no; | ||
| 577 | break; | ||
| 578 | default: | ||
| 579 | // TODO: Warning | ||
| 580 | break; | ||
| 581 | } | ||
| 582 | break; | ||
| 583 | case "DumpOnFailfast": | ||
| 584 | switch ((string)row[2]) | ||
| 585 | { | ||
| 586 | case "1": | ||
| 587 | application.DumpOnFailfast = ComPlus.YesNoType.yes; | ||
| 588 | break; | ||
| 589 | case "0": | ||
| 590 | application.DumpOnFailfast = ComPlus.YesNoType.no; | ||
| 591 | break; | ||
| 592 | default: | ||
| 593 | // TODO: Warning | ||
| 594 | break; | ||
| 595 | } | ||
| 596 | break; | ||
| 597 | case "DumpPath": | ||
| 598 | application.DumpPath = (string)row[2]; | ||
| 599 | break; | ||
| 600 | case "EventsEnabled": | ||
| 601 | switch ((string)row[2]) | ||
| 602 | { | ||
| 603 | case "1": | ||
| 604 | application.EventsEnabled = ComPlus.YesNoType.yes; | ||
| 605 | break; | ||
| 606 | case "0": | ||
| 607 | application.EventsEnabled = ComPlus.YesNoType.no; | ||
| 608 | break; | ||
| 609 | default: | ||
| 610 | // TODO: Warning | ||
| 611 | break; | ||
| 612 | } | ||
| 613 | break; | ||
| 614 | case "Identity": | ||
| 615 | application.Identity = (string)row[2]; | ||
| 616 | break; | ||
| 617 | case "ImpersonationLevel": | ||
| 618 | switch ((string)row[2]) | ||
| 619 | { | ||
| 620 | case "1": | ||
| 621 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.anonymous; | ||
| 622 | break; | ||
| 623 | case "2": | ||
| 624 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.identify; | ||
| 625 | break; | ||
| 626 | case "3": | ||
| 627 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.impersonate; | ||
| 628 | break; | ||
| 629 | case "4": | ||
| 630 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.@delegate; | ||
| 631 | break; | ||
| 632 | default: | ||
| 633 | // TODO: Warning | ||
| 634 | break; | ||
| 635 | } | ||
| 636 | break; | ||
| 637 | case "IsEnabled": | ||
| 638 | switch ((string)row[2]) | ||
| 639 | { | ||
| 640 | case "1": | ||
| 641 | application.IsEnabled = ComPlus.YesNoType.yes; | ||
| 642 | break; | ||
| 643 | case "0": | ||
| 644 | application.IsEnabled = ComPlus.YesNoType.no; | ||
| 645 | break; | ||
| 646 | default: | ||
| 647 | // TODO: Warning | ||
| 648 | break; | ||
| 649 | } | ||
| 650 | break; | ||
| 651 | case "MaxDumpCount": | ||
| 652 | int maxDumpCount; | ||
| 653 | if (Int32.TryParse((string)row[2], out maxDumpCount)) | ||
| 654 | { | ||
| 655 | application.MaxDumpCount = maxDumpCount; | ||
| 656 | } | ||
| 657 | else | ||
| 658 | { | ||
| 659 | // TODO: Warning | ||
| 660 | } | ||
| 661 | break; | ||
| 662 | case "Password": | ||
| 663 | application.Password = (string)row[2]; | ||
| 664 | break; | ||
| 665 | case "QCAuthenticateMsgs": | ||
| 666 | switch ((string)row[2]) | ||
| 667 | { | ||
| 668 | case "0": | ||
| 669 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.secureApps; | ||
| 670 | break; | ||
| 671 | case "1": | ||
| 672 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.off; | ||
| 673 | break; | ||
| 674 | case "2": | ||
| 675 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.on; | ||
| 676 | break; | ||
| 677 | default: | ||
| 678 | // TODO: Warning | ||
| 679 | break; | ||
| 680 | } | ||
| 681 | break; | ||
| 682 | case "QCListenerMaxThreads": | ||
| 683 | int qcListenerMaxThreads; | ||
| 684 | if (Int32.TryParse((string)row[2], out qcListenerMaxThreads)) | ||
| 685 | { | ||
| 686 | application.QCListenerMaxThreads = qcListenerMaxThreads; | ||
| 687 | } | ||
| 688 | else | ||
| 689 | { | ||
| 690 | // TODO: Warning | ||
| 691 | } | ||
| 692 | break; | ||
| 693 | case "QueueListenerEnabled": | ||
| 694 | switch ((string)row[2]) | ||
| 695 | { | ||
| 696 | case "1": | ||
| 697 | application.QueueListenerEnabled = ComPlus.YesNoType.yes; | ||
| 698 | break; | ||
| 699 | case "0": | ||
| 700 | application.QueueListenerEnabled = ComPlus.YesNoType.no; | ||
| 701 | break; | ||
| 702 | default: | ||
| 703 | // TODO: Warning | ||
| 704 | break; | ||
| 705 | } | ||
| 706 | break; | ||
| 707 | case "QueuingEnabled": | ||
| 708 | switch ((string)row[2]) | ||
| 709 | { | ||
| 710 | case "1": | ||
| 711 | application.QueuingEnabled = ComPlus.YesNoType.yes; | ||
| 712 | break; | ||
| 713 | case "0": | ||
| 714 | application.QueuingEnabled = ComPlus.YesNoType.no; | ||
| 715 | break; | ||
| 716 | default: | ||
| 717 | // TODO: Warning | ||
| 718 | break; | ||
| 719 | } | ||
| 720 | break; | ||
| 721 | case "RecycleActivationLimit": | ||
| 722 | int recycleActivationLimit; | ||
| 723 | if (Int32.TryParse((string)row[2], out recycleActivationLimit)) | ||
| 724 | { | ||
| 725 | application.RecycleActivationLimit = recycleActivationLimit; | ||
| 726 | } | ||
| 727 | else | ||
| 728 | { | ||
| 729 | // TODO: Warning | ||
| 730 | } | ||
| 731 | break; | ||
| 732 | case "RecycleCallLimit": | ||
| 733 | int recycleCallLimit; | ||
| 734 | if (Int32.TryParse((string)row[2], out recycleCallLimit)) | ||
| 735 | { | ||
| 736 | application.RecycleCallLimit = recycleCallLimit; | ||
| 737 | } | ||
| 738 | else | ||
| 739 | { | ||
| 740 | // TODO: Warning | ||
| 741 | } | ||
| 742 | break; | ||
| 743 | case "RecycleExpirationTimeout": | ||
| 744 | int recycleExpirationTimeout; | ||
| 745 | if (Int32.TryParse((string)row[2], out recycleExpirationTimeout)) | ||
| 746 | { | ||
| 747 | application.RecycleExpirationTimeout = recycleExpirationTimeout; | ||
| 748 | } | ||
| 749 | else | ||
| 750 | { | ||
| 751 | // TODO: Warning | ||
| 752 | } | ||
| 753 | break; | ||
| 754 | case "RecycleLifetimeLimit": | ||
| 755 | int recycleLifetimeLimit; | ||
| 756 | if (Int32.TryParse((string)row[2], out recycleLifetimeLimit)) | ||
| 757 | { | ||
| 758 | application.RecycleLifetimeLimit = recycleLifetimeLimit; | ||
| 759 | } | ||
| 760 | else | ||
| 761 | { | ||
| 762 | // TODO: Warning | ||
| 763 | } | ||
| 764 | break; | ||
| 765 | case "RecycleMemoryLimit": | ||
| 766 | int recycleMemoryLimit; | ||
| 767 | if (Int32.TryParse((string)row[2], out recycleMemoryLimit)) | ||
| 768 | { | ||
| 769 | application.RecycleMemoryLimit = recycleMemoryLimit; | ||
| 770 | } | ||
| 771 | else | ||
| 772 | { | ||
| 773 | // TODO: Warning | ||
| 774 | } | ||
| 775 | break; | ||
| 776 | case "Replicable": | ||
| 777 | switch ((string)row[2]) | ||
| 778 | { | ||
| 779 | case "1": | ||
| 780 | application.Replicable = ComPlus.YesNoType.yes; | ||
| 781 | break; | ||
| 782 | case "0": | ||
| 783 | application.Replicable = ComPlus.YesNoType.no; | ||
| 784 | break; | ||
| 785 | default: | ||
| 786 | // TODO: Warning | ||
| 787 | break; | ||
| 788 | } | ||
| 789 | break; | ||
| 790 | case "RunForever": | ||
| 791 | switch ((string)row[2]) | ||
| 792 | { | ||
| 793 | case "1": | ||
| 794 | application.RunForever = ComPlus.YesNoType.yes; | ||
| 795 | break; | ||
| 796 | case "0": | ||
| 797 | application.RunForever = ComPlus.YesNoType.no; | ||
| 798 | break; | ||
| 799 | default: | ||
| 800 | // TODO: Warning | ||
| 801 | break; | ||
| 802 | } | ||
| 803 | break; | ||
| 804 | case "ShutdownAfter": | ||
| 805 | int shutdownAfter; | ||
| 806 | if (Int32.TryParse((string)row[2], out shutdownAfter)) | ||
| 807 | { | ||
| 808 | application.ShutdownAfter = shutdownAfter; | ||
| 809 | } | ||
| 810 | else | ||
| 811 | { | ||
| 812 | // TODO: Warning | ||
| 813 | } | ||
| 814 | break; | ||
| 815 | case "SoapActivated": | ||
| 816 | switch ((string)row[2]) | ||
| 817 | { | ||
| 818 | case "1": | ||
| 819 | application.SoapActivated = ComPlus.YesNoType.yes; | ||
| 820 | break; | ||
| 821 | case "0": | ||
| 822 | application.SoapActivated = ComPlus.YesNoType.no; | ||
| 823 | break; | ||
| 824 | default: | ||
| 825 | // TODO: Warning | ||
| 826 | break; | ||
| 827 | } | ||
| 828 | break; | ||
| 829 | case "SoapBaseUrl": | ||
| 830 | application.SoapBaseUrl = (string)row[2]; | ||
| 831 | break; | ||
| 832 | case "SoapMailTo": | ||
| 833 | application.SoapMailTo = (string)row[2]; | ||
| 834 | break; | ||
| 835 | case "SoapVRoot": | ||
| 836 | application.SoapVRoot = (string)row[2]; | ||
| 837 | break; | ||
| 838 | case "SRPEnabled": | ||
| 839 | switch ((string)row[2]) | ||
| 840 | { | ||
| 841 | case "1": | ||
| 842 | application.SRPEnabled = ComPlus.YesNoType.yes; | ||
| 843 | break; | ||
| 844 | case "0": | ||
| 845 | application.SRPEnabled = ComPlus.YesNoType.no; | ||
| 846 | break; | ||
| 847 | default: | ||
| 848 | // TODO: Warning | ||
| 849 | break; | ||
| 850 | } | ||
| 851 | break; | ||
| 852 | case "SRPTrustLevel": | ||
| 853 | switch ((string)row[2]) | ||
| 854 | { | ||
| 855 | case "0": | ||
| 856 | application.SRPTrustLevel = ComPlus.ComPlusApplication.SRPTrustLevelType.disallowed; | ||
| 857 | break; | ||
| 858 | case "262144": | ||
| 859 | application.SRPTrustLevel = ComPlus.ComPlusApplication.SRPTrustLevelType.fullyTrusted; | ||
| 860 | break; | ||
| 861 | default: | ||
| 862 | // TODO: Warning | ||
| 863 | break; | ||
| 864 | } | ||
| 865 | break; | ||
| 866 | default: | ||
| 867 | // TODO: Warning | ||
| 868 | break; | ||
| 869 | } | ||
| 870 | } | ||
| 871 | } | ||
| 872 | |||
| 873 | /// <summary> | ||
| 874 | /// Decompile the ComPlusApplicationRole table. | ||
| 875 | /// </summary> | ||
| 876 | /// <param name="table">The table to decompile.</param> | ||
| 877 | private void DecompileComPlusApplicationRoleTable(Table table) | ||
| 878 | { | ||
| 879 | foreach (Row row in table.Rows) | ||
| 880 | { | ||
| 881 | ComPlus.ComPlusApplicationRole applicationRole = new ComPlus.ComPlusApplicationRole(); | ||
| 882 | |||
| 883 | applicationRole.Id = (string)row[0]; | ||
| 884 | applicationRole.Application = (string)row[1]; | ||
| 885 | |||
| 886 | if (null != row[3]) | ||
| 887 | { | ||
| 888 | applicationRole.Name = (string)row[3]; | ||
| 889 | } | ||
| 890 | |||
| 891 | if (null != row[2]) | ||
| 892 | { | ||
| 893 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 894 | if (null != component) | ||
| 895 | { | ||
| 896 | component.AddChild(applicationRole); | ||
| 897 | } | ||
| 898 | else | ||
| 899 | { | ||
| 900 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 901 | } | ||
| 902 | } | ||
| 903 | else | ||
| 904 | { | ||
| 905 | this.Core.RootElement.AddChild(applicationRole); | ||
| 906 | } | ||
| 907 | this.Core.IndexElement(row, applicationRole); | ||
| 908 | } | ||
| 909 | } | ||
| 910 | |||
| 911 | /// <summary> | ||
| 912 | /// Decompile the ComPlusApplicationRoleProperty table. | ||
| 913 | /// </summary> | ||
| 914 | /// <param name="table">The table to decompile.</param> | ||
| 915 | private void DecompileComPlusApplicationRolePropertyTable(Table table) | ||
| 916 | { | ||
| 917 | foreach (Row row in table.Rows) | ||
| 918 | { | ||
| 919 | ComPlus.ComPlusApplicationRole applicationRole = (ComPlus.ComPlusApplicationRole)this.Core.GetIndexedElement("ComPlusApplicationRole", (string)row[0]); | ||
| 920 | if (null == applicationRole) | ||
| 921 | { | ||
| 922 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ApplicationRole_", (string)row[0], "ComPlusApplicationRole")); | ||
| 923 | } | ||
| 924 | |||
| 925 | switch ((string)row[1]) | ||
| 926 | { | ||
| 927 | case "Description": | ||
| 928 | applicationRole.Description = (string)row[2]; | ||
| 929 | break; | ||
| 930 | default: | ||
| 931 | // TODO: Warning | ||
| 932 | break; | ||
| 933 | } | ||
| 934 | } | ||
| 935 | } | ||
| 936 | |||
| 937 | /// <summary> | ||
| 938 | /// Decompile the ComPlusUserInApplicationRole table. | ||
| 939 | /// </summary> | ||
| 940 | /// <param name="table">The table to decompile.</param> | ||
| 941 | private void DecompileComPlusUserInApplicationRoleTable(Table table) | ||
| 942 | { | ||
| 943 | foreach (Row row in table.Rows) | ||
| 944 | { | ||
| 945 | ComPlus.ComPlusUserInApplicationRole userInApplicationRole = new ComPlus.ComPlusUserInApplicationRole(); | ||
| 946 | |||
| 947 | userInApplicationRole.Id = (string)row[0]; | ||
| 948 | userInApplicationRole.ApplicationRole = (string)row[1]; | ||
| 949 | userInApplicationRole.User = (string)row[3]; | ||
| 950 | |||
| 951 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 952 | if (null != component) | ||
| 953 | { | ||
| 954 | component.AddChild(userInApplicationRole); | ||
| 955 | } | ||
| 956 | else | ||
| 957 | { | ||
| 958 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 959 | } | ||
| 960 | } | ||
| 961 | } | ||
| 962 | |||
| 963 | /// <summary> | ||
| 964 | /// Decompile the ComPlusGroupInApplicationRole table. | ||
| 965 | /// </summary> | ||
| 966 | /// <param name="table">The table to decompile.</param> | ||
| 967 | private void DecompileComPlusGroupInApplicationRoleTable(Table table) | ||
| 968 | { | ||
| 969 | foreach (Row row in table.Rows) | ||
| 970 | { | ||
| 971 | ComPlus.ComPlusGroupInApplicationRole groupInApplicationRole = new ComPlus.ComPlusGroupInApplicationRole(); | ||
| 972 | |||
| 973 | groupInApplicationRole.Id = (string)row[0]; | ||
| 974 | groupInApplicationRole.ApplicationRole = (string)row[1]; | ||
| 975 | groupInApplicationRole.Group = (string)row[3]; | ||
| 976 | |||
| 977 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 978 | if (null != component) | ||
| 979 | { | ||
| 980 | component.AddChild(groupInApplicationRole); | ||
| 981 | } | ||
| 982 | else | ||
| 983 | { | ||
| 984 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 985 | } | ||
| 986 | } | ||
| 987 | } | ||
| 988 | |||
| 989 | /// <summary> | ||
| 990 | /// Decompile the ComPlusAssembly table. | ||
| 991 | /// </summary> | ||
| 992 | /// <param name="table">The table to decompile.</param> | ||
| 993 | private void DecompileComPlusAssemblyTable(Table table) | ||
| 994 | { | ||
| 995 | foreach (Row row in table.Rows) | ||
| 996 | { | ||
| 997 | ComPlus.ComPlusAssembly assembly = new ComPlus.ComPlusAssembly(); | ||
| 998 | |||
| 999 | assembly.Id = (string)row[0]; | ||
| 1000 | assembly.Application = (string)row[1]; | ||
| 1001 | |||
| 1002 | if (null != row[3]) | ||
| 1003 | { | ||
| 1004 | assembly.AssemblyName = (string)row[3]; | ||
| 1005 | } | ||
| 1006 | |||
| 1007 | if (null != row[4]) | ||
| 1008 | { | ||
| 1009 | assembly.DllPath = (string)row[4]; | ||
| 1010 | } | ||
| 1011 | |||
| 1012 | if (null != row[5]) | ||
| 1013 | { | ||
| 1014 | assembly.TlbPath = (string)row[5]; | ||
| 1015 | } | ||
| 1016 | |||
| 1017 | if (null != row[6]) | ||
| 1018 | { | ||
| 1019 | assembly.PSDllPath = (string)row[6]; | ||
| 1020 | } | ||
| 1021 | |||
| 1022 | int attributes = (int)row[7]; | ||
| 1023 | |||
| 1024 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.EventClass)) | ||
| 1025 | { | ||
| 1026 | assembly.EventClass = ComPlus.YesNoType.yes; | ||
| 1027 | } | ||
| 1028 | |||
| 1029 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.DotNetAssembly)) | ||
| 1030 | { | ||
| 1031 | assembly.Type = ComPlus.ComPlusAssembly.TypeType.net; | ||
| 1032 | } | ||
| 1033 | |||
| 1034 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.DllPathFromGAC)) | ||
| 1035 | { | ||
| 1036 | assembly.DllPathFromGAC = ComPlus.YesNoType.yes; | ||
| 1037 | } | ||
| 1038 | |||
| 1039 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.RegisterInCommit)) | ||
| 1040 | { | ||
| 1041 | assembly.RegisterInCommit = ComPlus.YesNoType.yes; | ||
| 1042 | } | ||
| 1043 | |||
| 1044 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 1045 | if (null != component) | ||
| 1046 | { | ||
| 1047 | component.AddChild(assembly); | ||
| 1048 | } | ||
| 1049 | else | ||
| 1050 | { | ||
| 1051 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 1052 | } | ||
| 1053 | this.Core.IndexElement(row, assembly); | ||
| 1054 | } | ||
| 1055 | } | ||
| 1056 | |||
| 1057 | /// <summary> | ||
| 1058 | /// Decompile the ComPlusAssemblyDependency table. | ||
| 1059 | /// </summary> | ||
| 1060 | /// <param name="table">The table to decompile.</param> | ||
| 1061 | private void DecompileComPlusAssemblyDependencyTable(Table table) | ||
| 1062 | { | ||
| 1063 | foreach (Row row in table.Rows) | ||
| 1064 | { | ||
| 1065 | ComPlus.ComPlusAssemblyDependency assemblyDependency = new ComPlus.ComPlusAssemblyDependency(); | ||
| 1066 | |||
| 1067 | assemblyDependency.RequiredAssembly = (string)row[1]; | ||
| 1068 | |||
| 1069 | ComPlus.ComPlusAssembly assembly = (ComPlus.ComPlusAssembly)this.Core.GetIndexedElement("ComPlusAssembly", (string)row[0]); | ||
| 1070 | if (null != assembly) | ||
| 1071 | { | ||
| 1072 | assembly.AddChild(assemblyDependency); | ||
| 1073 | } | ||
| 1074 | else | ||
| 1075 | { | ||
| 1076 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Assembly_", (string)row[0], "ComPlusAssembly")); | ||
| 1077 | } | ||
| 1078 | } | ||
| 1079 | } | ||
| 1080 | |||
| 1081 | /// <summary> | ||
| 1082 | /// Decompile the ComPlusComponent table. | ||
| 1083 | /// </summary> | ||
| 1084 | /// <param name="table">The table to decompile.</param> | ||
| 1085 | private void DecompileComPlusComponentTable(Table table) | ||
| 1086 | { | ||
| 1087 | foreach (Row row in table.Rows) | ||
| 1088 | { | ||
| 1089 | ComPlus.ComPlusComponent comPlusComponent = new ComPlus.ComPlusComponent(); | ||
| 1090 | |||
| 1091 | comPlusComponent.Id = (string)row[0]; | ||
| 1092 | |||
| 1093 | try | ||
| 1094 | { | ||
| 1095 | Guid clsid = new Guid((string)row[2]); | ||
| 1096 | comPlusComponent.CLSID = clsid.ToString().ToUpper(); | ||
| 1097 | } | ||
| 1098 | catch | ||
| 1099 | { | ||
| 1100 | // TODO: Warning | ||
| 1101 | } | ||
| 1102 | |||
| 1103 | ComPlus.ComPlusAssembly assembly = (ComPlus.ComPlusAssembly)this.Core.GetIndexedElement("ComPlusAssembly", (string)row[1]); | ||
| 1104 | if (null != assembly) | ||
| 1105 | { | ||
| 1106 | assembly.AddChild(comPlusComponent); | ||
| 1107 | } | ||
| 1108 | else | ||
| 1109 | { | ||
| 1110 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Assembly_", (string)row[1], "ComPlusAssembly")); | ||
| 1111 | } | ||
| 1112 | this.Core.IndexElement(row, comPlusComponent); | ||
| 1113 | } | ||
| 1114 | } | ||
| 1115 | |||
| 1116 | /// <summary> | ||
| 1117 | /// Decompile the ComPlusComponentProperty table. | ||
| 1118 | /// </summary> | ||
| 1119 | /// <param name="table">The table to decompile.</param> | ||
| 1120 | private void DecompileComPlusComponentPropertyTable(Table table) | ||
| 1121 | { | ||
| 1122 | foreach (Row row in table.Rows) | ||
| 1123 | { | ||
| 1124 | ComPlus.ComPlusComponent comPlusComponent = (ComPlus.ComPlusComponent)this.Core.GetIndexedElement("ComPlusComponent", (string)row[0]); | ||
| 1125 | if (null == comPlusComponent) | ||
| 1126 | { | ||
| 1127 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ComPlusComponent_", (string)row[0], "ComPlusComponent")); | ||
| 1128 | } | ||
| 1129 | |||
| 1130 | switch ((string)row[1]) | ||
| 1131 | { | ||
| 1132 | case "AllowInprocSubscribers": | ||
| 1133 | switch ((string)row[2]) | ||
| 1134 | { | ||
| 1135 | case "1": | ||
| 1136 | comPlusComponent.AllowInprocSubscribers = ComPlus.YesNoType.yes; | ||
| 1137 | break; | ||
| 1138 | case "0": | ||
| 1139 | comPlusComponent.AllowInprocSubscribers = ComPlus.YesNoType.no; | ||
| 1140 | break; | ||
| 1141 | default: | ||
| 1142 | // TODO: Warning | ||
| 1143 | break; | ||
| 1144 | } | ||
| 1145 | break; | ||
| 1146 | case "ComponentAccessChecksEnabled": | ||
| 1147 | switch ((string)row[2]) | ||
| 1148 | { | ||
| 1149 | case "1": | ||
| 1150 | comPlusComponent.ComponentAccessChecksEnabled = ComPlus.YesNoType.yes; | ||
| 1151 | break; | ||
| 1152 | case "0": | ||
| 1153 | comPlusComponent.ComponentAccessChecksEnabled = ComPlus.YesNoType.no; | ||
| 1154 | break; | ||
| 1155 | default: | ||
| 1156 | // TODO: Warning | ||
| 1157 | break; | ||
| 1158 | } | ||
| 1159 | break; | ||
| 1160 | case "ComponentTransactionTimeout": | ||
| 1161 | int componentTransactionTimeout; | ||
| 1162 | if (Int32.TryParse((string)row[2], out componentTransactionTimeout)) | ||
| 1163 | { | ||
| 1164 | comPlusComponent.ComponentTransactionTimeout = componentTransactionTimeout; | ||
| 1165 | } | ||
| 1166 | else | ||
| 1167 | { | ||
| 1168 | // TODO: Warning | ||
| 1169 | } | ||
| 1170 | break; | ||
| 1171 | case "ComponentTransactionTimeoutEnabled": | ||
| 1172 | switch ((string)row[2]) | ||
| 1173 | { | ||
| 1174 | case "1": | ||
| 1175 | comPlusComponent.ComponentTransactionTimeoutEnabled = ComPlus.YesNoType.yes; | ||
| 1176 | break; | ||
| 1177 | case "0": | ||
| 1178 | comPlusComponent.ComponentTransactionTimeoutEnabled = ComPlus.YesNoType.no; | ||
| 1179 | break; | ||
| 1180 | default: | ||
| 1181 | // TODO: Warning | ||
| 1182 | break; | ||
| 1183 | } | ||
| 1184 | break; | ||
| 1185 | case "COMTIIntrinsics": | ||
| 1186 | switch ((string)row[2]) | ||
| 1187 | { | ||
| 1188 | case "1": | ||
| 1189 | comPlusComponent.COMTIIntrinsics = ComPlus.YesNoType.yes; | ||
| 1190 | break; | ||
| 1191 | case "0": | ||
| 1192 | comPlusComponent.COMTIIntrinsics = ComPlus.YesNoType.no; | ||
| 1193 | break; | ||
| 1194 | default: | ||
| 1195 | // TODO: Warning | ||
| 1196 | break; | ||
| 1197 | } | ||
| 1198 | break; | ||
| 1199 | case "ConstructionEnabled": | ||
| 1200 | switch ((string)row[2]) | ||
| 1201 | { | ||
| 1202 | case "1": | ||
| 1203 | comPlusComponent.ConstructionEnabled = ComPlus.YesNoType.yes; | ||
| 1204 | break; | ||
| 1205 | case "0": | ||
| 1206 | comPlusComponent.ConstructionEnabled = ComPlus.YesNoType.no; | ||
| 1207 | break; | ||
| 1208 | default: | ||
| 1209 | // TODO: Warning | ||
| 1210 | break; | ||
| 1211 | } | ||
| 1212 | break; | ||
| 1213 | case "ConstructorString": | ||
| 1214 | comPlusComponent.ConstructorString = (string)row[2]; | ||
| 1215 | break; | ||
| 1216 | case "CreationTimeout": | ||
| 1217 | int creationTimeout; | ||
| 1218 | if (Int32.TryParse((string)row[2], out creationTimeout)) | ||
| 1219 | { | ||
| 1220 | comPlusComponent.CreationTimeout = creationTimeout; | ||
| 1221 | } | ||
| 1222 | else | ||
| 1223 | { | ||
| 1224 | // TODO: Warning | ||
| 1225 | } | ||
| 1226 | break; | ||
| 1227 | case "Description": | ||
| 1228 | comPlusComponent.Description = (string)row[2]; | ||
| 1229 | break; | ||
| 1230 | case "EventTrackingEnabled": | ||
| 1231 | switch ((string)row[2]) | ||
| 1232 | { | ||
| 1233 | case "1": | ||
| 1234 | comPlusComponent.EventTrackingEnabled = ComPlus.YesNoType.yes; | ||
| 1235 | break; | ||
| 1236 | case "0": | ||
| 1237 | comPlusComponent.EventTrackingEnabled = ComPlus.YesNoType.no; | ||
| 1238 | break; | ||
| 1239 | default: | ||
| 1240 | // TODO: Warning | ||
| 1241 | break; | ||
| 1242 | } | ||
| 1243 | break; | ||
| 1244 | case "ExceptionClass": | ||
| 1245 | comPlusComponent.ExceptionClass = (string)row[2]; | ||
| 1246 | break; | ||
| 1247 | case "FireInParallel": | ||
| 1248 | switch ((string)row[2]) | ||
| 1249 | { | ||
| 1250 | case "1": | ||
| 1251 | comPlusComponent.FireInParallel = ComPlus.YesNoType.yes; | ||
| 1252 | break; | ||
| 1253 | case "0": | ||
| 1254 | comPlusComponent.FireInParallel = ComPlus.YesNoType.no; | ||
| 1255 | break; | ||
| 1256 | default: | ||
| 1257 | // TODO: Warning | ||
| 1258 | break; | ||
| 1259 | } | ||
| 1260 | break; | ||
| 1261 | case "IISIntrinsics": | ||
| 1262 | switch ((string)row[2]) | ||
| 1263 | { | ||
| 1264 | case "1": | ||
| 1265 | comPlusComponent.IISIntrinsics = ComPlus.YesNoType.yes; | ||
| 1266 | break; | ||
| 1267 | case "0": | ||
| 1268 | comPlusComponent.IISIntrinsics = ComPlus.YesNoType.no; | ||
| 1269 | break; | ||
| 1270 | default: | ||
| 1271 | // TODO: Warning | ||
| 1272 | break; | ||
| 1273 | } | ||
| 1274 | break; | ||
| 1275 | case "InitializesServerApplication": | ||
| 1276 | switch ((string)row[2]) | ||
| 1277 | { | ||
| 1278 | case "1": | ||
| 1279 | comPlusComponent.InitializesServerApplication = ComPlus.YesNoType.yes; | ||
| 1280 | break; | ||
| 1281 | case "0": | ||
| 1282 | comPlusComponent.InitializesServerApplication = ComPlus.YesNoType.no; | ||
| 1283 | break; | ||
| 1284 | default: | ||
| 1285 | // TODO: Warning | ||
| 1286 | break; | ||
| 1287 | } | ||
| 1288 | break; | ||
| 1289 | case "IsEnabled": | ||
| 1290 | switch ((string)row[2]) | ||
| 1291 | { | ||
| 1292 | case "1": | ||
| 1293 | comPlusComponent.IsEnabled = ComPlus.YesNoType.yes; | ||
| 1294 | break; | ||
| 1295 | case "0": | ||
| 1296 | comPlusComponent.IsEnabled = ComPlus.YesNoType.no; | ||
| 1297 | break; | ||
| 1298 | default: | ||
| 1299 | // TODO: Warning | ||
| 1300 | break; | ||
| 1301 | } | ||
| 1302 | break; | ||
| 1303 | case "IsPrivateComponent": | ||
| 1304 | switch ((string)row[2]) | ||
| 1305 | { | ||
| 1306 | case "1": | ||
| 1307 | comPlusComponent.IsPrivateComponent = ComPlus.YesNoType.yes; | ||
| 1308 | break; | ||
| 1309 | case "0": | ||
| 1310 | comPlusComponent.IsPrivateComponent = ComPlus.YesNoType.no; | ||
| 1311 | break; | ||
| 1312 | default: | ||
| 1313 | // TODO: Warning | ||
| 1314 | break; | ||
| 1315 | } | ||
| 1316 | break; | ||
| 1317 | case "JustInTimeActivation": | ||
| 1318 | switch ((string)row[2]) | ||
| 1319 | { | ||
| 1320 | case "1": | ||
| 1321 | comPlusComponent.JustInTimeActivation = ComPlus.YesNoType.yes; | ||
| 1322 | break; | ||
| 1323 | case "0": | ||
| 1324 | comPlusComponent.JustInTimeActivation = ComPlus.YesNoType.no; | ||
| 1325 | break; | ||
| 1326 | default: | ||
| 1327 | // TODO: Warning | ||
| 1328 | break; | ||
| 1329 | } | ||
| 1330 | break; | ||
| 1331 | case "LoadBalancingSupported": | ||
| 1332 | switch ((string)row[2]) | ||
| 1333 | { | ||
| 1334 | case "1": | ||
| 1335 | comPlusComponent.LoadBalancingSupported = ComPlus.YesNoType.yes; | ||
| 1336 | break; | ||
| 1337 | case "0": | ||
| 1338 | comPlusComponent.LoadBalancingSupported = ComPlus.YesNoType.no; | ||
| 1339 | break; | ||
| 1340 | default: | ||
| 1341 | // TODO: Warning | ||
| 1342 | break; | ||
| 1343 | } | ||
| 1344 | break; | ||
| 1345 | case "MaxPoolSize": | ||
| 1346 | int maxPoolSize; | ||
| 1347 | if (Int32.TryParse((string)row[2], out maxPoolSize)) | ||
| 1348 | { | ||
| 1349 | comPlusComponent.MaxPoolSize = maxPoolSize; | ||
| 1350 | } | ||
| 1351 | else | ||
| 1352 | { | ||
| 1353 | // TODO: Warning | ||
| 1354 | } | ||
| 1355 | break; | ||
| 1356 | case "MinPoolSize": | ||
| 1357 | int minPoolSize; | ||
| 1358 | if (Int32.TryParse((string)row[2], out minPoolSize)) | ||
| 1359 | { | ||
| 1360 | comPlusComponent.MinPoolSize = minPoolSize; | ||
| 1361 | } | ||
| 1362 | else | ||
| 1363 | { | ||
| 1364 | // TODO: Warning | ||
| 1365 | } | ||
| 1366 | break; | ||
| 1367 | case "MultiInterfacePublisherFilterCLSID": | ||
| 1368 | comPlusComponent.MultiInterfacePublisherFilterCLSID = (string)row[2]; | ||
| 1369 | break; | ||
| 1370 | case "MustRunInClientContext": | ||
| 1371 | switch ((string)row[2]) | ||
| 1372 | { | ||
| 1373 | case "1": | ||
| 1374 | comPlusComponent.MustRunInClientContext = ComPlus.YesNoType.yes; | ||
| 1375 | break; | ||
| 1376 | case "0": | ||
| 1377 | comPlusComponent.MustRunInClientContext = ComPlus.YesNoType.no; | ||
| 1378 | break; | ||
| 1379 | default: | ||
| 1380 | // TODO: Warning | ||
| 1381 | break; | ||
| 1382 | } | ||
| 1383 | break; | ||
| 1384 | case "MustRunInDefaultContext": | ||
| 1385 | switch ((string)row[2]) | ||
| 1386 | { | ||
| 1387 | case "1": | ||
| 1388 | comPlusComponent.MustRunInDefaultContext = ComPlus.YesNoType.yes; | ||
| 1389 | break; | ||
| 1390 | case "0": | ||
| 1391 | comPlusComponent.MustRunInDefaultContext = ComPlus.YesNoType.no; | ||
| 1392 | break; | ||
| 1393 | default: | ||
| 1394 | // TODO: Warning | ||
| 1395 | break; | ||
| 1396 | } | ||
| 1397 | break; | ||
| 1398 | case "ObjectPoolingEnabled": | ||
| 1399 | switch ((string)row[2]) | ||
| 1400 | { | ||
| 1401 | case "1": | ||
| 1402 | comPlusComponent.ObjectPoolingEnabled = ComPlus.YesNoType.yes; | ||
| 1403 | break; | ||
| 1404 | case "0": | ||
| 1405 | comPlusComponent.ObjectPoolingEnabled = ComPlus.YesNoType.no; | ||
| 1406 | break; | ||
| 1407 | default: | ||
| 1408 | // TODO: Warning | ||
| 1409 | break; | ||
| 1410 | } | ||
| 1411 | break; | ||
| 1412 | case "PublisherID": | ||
| 1413 | comPlusComponent.PublisherID = (string)row[2]; | ||
| 1414 | break; | ||
| 1415 | case "SoapAssemblyName": | ||
| 1416 | comPlusComponent.SoapAssemblyName = (string)row[2]; | ||
| 1417 | break; | ||
| 1418 | case "SoapTypeName": | ||
| 1419 | comPlusComponent.SoapTypeName = (string)row[2]; | ||
| 1420 | break; | ||
| 1421 | case "Synchronization": | ||
| 1422 | switch ((string)row[2]) | ||
| 1423 | { | ||
| 1424 | case "0": | ||
| 1425 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.ignored; | ||
| 1426 | break; | ||
| 1427 | case "1": | ||
| 1428 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.none; | ||
| 1429 | break; | ||
| 1430 | case "2": | ||
| 1431 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.supported; | ||
| 1432 | break; | ||
| 1433 | case "3": | ||
| 1434 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.required; | ||
| 1435 | break; | ||
| 1436 | case "4": | ||
| 1437 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.requiresNew; | ||
| 1438 | break; | ||
| 1439 | default: | ||
| 1440 | // TODO: Warning | ||
| 1441 | break; | ||
| 1442 | } | ||
| 1443 | break; | ||
| 1444 | case "Transaction": | ||
| 1445 | switch ((string)row[2]) | ||
| 1446 | { | ||
| 1447 | case "0": | ||
| 1448 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.ignored; | ||
| 1449 | break; | ||
| 1450 | case "1": | ||
| 1451 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.none; | ||
| 1452 | break; | ||
| 1453 | case "2": | ||
| 1454 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.supported; | ||
| 1455 | break; | ||
| 1456 | case "3": | ||
| 1457 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.required; | ||
| 1458 | break; | ||
| 1459 | case "4": | ||
| 1460 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.requiresNew; | ||
| 1461 | break; | ||
| 1462 | default: | ||
| 1463 | // TODO: Warning | ||
| 1464 | break; | ||
| 1465 | } | ||
| 1466 | break; | ||
| 1467 | case "TxIsolationLevel": | ||
| 1468 | switch ((string)row[2]) | ||
| 1469 | { | ||
| 1470 | case "0": | ||
| 1471 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.any; | ||
| 1472 | break; | ||
| 1473 | case "1": | ||
| 1474 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.readUnCommitted; | ||
| 1475 | break; | ||
| 1476 | case "2": | ||
| 1477 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.readCommitted; | ||
| 1478 | break; | ||
| 1479 | case "3": | ||
| 1480 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.repeatableRead; | ||
| 1481 | break; | ||
| 1482 | case "4": | ||
| 1483 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.serializable; | ||
| 1484 | break; | ||
| 1485 | default: | ||
| 1486 | // TODO: Warning | ||
| 1487 | break; | ||
| 1488 | } | ||
| 1489 | break; | ||
| 1490 | default: | ||
| 1491 | // TODO: Warning | ||
| 1492 | break; | ||
| 1493 | } | ||
| 1494 | } | ||
| 1495 | } | ||
| 1496 | |||
| 1497 | /// <summary> | ||
| 1498 | /// Decompile the ComPlusRoleForComponent table. | ||
| 1499 | /// </summary> | ||
| 1500 | /// <param name="table">The table to decompile.</param> | ||
| 1501 | private void DecompileComPlusRoleForComponentTable(Table table) | ||
| 1502 | { | ||
| 1503 | foreach (Row row in table.Rows) | ||
| 1504 | { | ||
| 1505 | ComPlus.ComPlusRoleForComponent roleForComponent = new ComPlus.ComPlusRoleForComponent(); | ||
| 1506 | |||
| 1507 | roleForComponent.Id = (string)row[0]; | ||
| 1508 | roleForComponent.Component = (string)row[1]; | ||
| 1509 | roleForComponent.ApplicationRole = (string)row[2]; | ||
| 1510 | |||
| 1511 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
| 1512 | if (null != component) | ||
| 1513 | { | ||
| 1514 | component.AddChild(roleForComponent); | ||
| 1515 | } | ||
| 1516 | else | ||
| 1517 | { | ||
| 1518 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
| 1519 | } | ||
| 1520 | } | ||
| 1521 | } | ||
| 1522 | |||
| 1523 | /// <summary> | ||
| 1524 | /// Decompile the ComPlusInterface table. | ||
| 1525 | /// </summary> | ||
| 1526 | /// <param name="table">The table to decompile.</param> | ||
| 1527 | private void DecompileComPlusInterfaceTable(Table table) | ||
| 1528 | { | ||
| 1529 | foreach (Row row in table.Rows) | ||
| 1530 | { | ||
| 1531 | ComPlus.ComPlusInterface comPlusInterface = new ComPlus.ComPlusInterface(); | ||
| 1532 | |||
| 1533 | comPlusInterface.Id = (string)row[0]; | ||
| 1534 | |||
| 1535 | try | ||
| 1536 | { | ||
| 1537 | Guid iid = new Guid((string)row[2]); | ||
| 1538 | comPlusInterface.IID = iid.ToString().ToUpper(); | ||
| 1539 | } | ||
| 1540 | catch | ||
| 1541 | { | ||
| 1542 | // TODO: Warning | ||
| 1543 | } | ||
| 1544 | |||
| 1545 | ComPlus.ComPlusComponent comPlusComponent = (ComPlus.ComPlusComponent)this.Core.GetIndexedElement("ComPlusComponent", (string)row[1]); | ||
| 1546 | if (null != comPlusComponent) | ||
| 1547 | { | ||
| 1548 | comPlusComponent.AddChild(comPlusInterface); | ||
| 1549 | } | ||
| 1550 | else | ||
| 1551 | { | ||
| 1552 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ComPlusComponent_", (string)row[1], "ComPlusComponent")); | ||
| 1553 | } | ||
| 1554 | this.Core.IndexElement(row, comPlusInterface); | ||
| 1555 | } | ||
| 1556 | } | ||
| 1557 | |||
| 1558 | /// <summary> | ||
| 1559 | /// Decompile the ComPlusInterfaceProperty table. | ||
| 1560 | /// </summary> | ||
| 1561 | /// <param name="table">The table to decompile.</param> | ||
| 1562 | private void DecompileComPlusInterfacePropertyTable(Table table) | ||
| 1563 | { | ||
| 1564 | foreach (Row row in table.Rows) | ||
| 1565 | { | ||
| 1566 | ComPlus.ComPlusInterface comPlusInterface = (ComPlus.ComPlusInterface)this.Core.GetIndexedElement("ComPlusInterface", (string)row[0]); | ||
| 1567 | if (null == comPlusInterface) | ||
| 1568 | { | ||
| 1569 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Interface_", (string)row[0], "ComPlusInterface")); | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | switch ((string)row[1]) | ||
| 1573 | { | ||
| 1574 | case "Description": | ||
| 1575 | comPlusInterface.Description = (string)row[2]; | ||
| 1576 | break; | ||
| 1577 | case "QueuingEnabled": | ||
| 1578 | switch ((string)row[2]) | ||
| 1579 | { | ||
| 1580 | case "1": | ||
| 1581 | comPlusInterface.QueuingEnabled = ComPlus.YesNoType.yes; | ||
| 1582 | break; | ||
| 1583 | case "0": | ||
| 1584 | comPlusInterface.QueuingEnabled = ComPlus.YesNoType.no; | ||
| 1585 | break; | ||
| 1586 | default: | ||
| 1587 | // TODO: Warning | ||
| 1588 | break; | ||
| 1589 | } | ||
| 1590 | break; | ||
| 1591 | default: | ||
| 1592 | // TODO: Warning | ||
| 1593 | break; | ||
| 1594 | } | ||
| 1595 | } | ||
| 1596 | } | ||
| 1597 | |||
| 1598 | /// <summary> | ||
| 1599 | /// Decompile the ComPlusRoleForInterface table. | ||
| 1600 | /// </summary> | ||
| 1601 | /// <param name="table">The table to decompile.</param> | ||
| 1602 | private void DecompileComPlusRoleForInterfaceTable(Table table) | ||
| 1603 | { | ||
| 1604 | foreach (Row row in table.Rows) | ||
| 1605 | { | ||
| 1606 | ComPlus.ComPlusRoleForInterface roleForInterface = new ComPlus.ComPlusRoleForInterface(); | ||
| 1607 | |||
| 1608 | roleForInterface.Id = (string)row[0]; | ||
| 1609 | roleForInterface.Interface = (string)row[1]; | ||
| 1610 | roleForInterface.ApplicationRole = (string)row[2]; | ||
| 1611 | |||
| 1612 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
| 1613 | if (null != component) | ||
| 1614 | { | ||
| 1615 | component.AddChild(roleForInterface); | ||
| 1616 | } | ||
| 1617 | else | ||
| 1618 | { | ||
| 1619 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
| 1620 | } | ||
| 1621 | } | ||
| 1622 | } | ||
| 1623 | |||
| 1624 | /// <summary> | ||
| 1625 | /// Decompile the ComPlusMethod table. | ||
| 1626 | /// </summary> | ||
| 1627 | /// <param name="table">The table to decompile.</param> | ||
| 1628 | private void DecompileComPlusMethodTable(Table table) | ||
| 1629 | { | ||
| 1630 | foreach (Row row in table.Rows) | ||
| 1631 | { | ||
| 1632 | ComPlus.ComPlusMethod comPlusMethod = new ComPlus.ComPlusMethod(); | ||
| 1633 | |||
| 1634 | comPlusMethod.Id = (string)row[0]; | ||
| 1635 | |||
| 1636 | if (null != row[2]) | ||
| 1637 | { | ||
| 1638 | comPlusMethod.Index = (int)row[2]; | ||
| 1639 | } | ||
| 1640 | |||
| 1641 | if (null != row[3]) | ||
| 1642 | { | ||
| 1643 | comPlusMethod.Name = (string)row[3]; | ||
| 1644 | } | ||
| 1645 | |||
| 1646 | ComPlus.ComPlusInterface comPlusInterface = (ComPlus.ComPlusInterface)this.Core.GetIndexedElement("ComPlusInterface", (string)row[1]); | ||
| 1647 | if (null != comPlusInterface) | ||
| 1648 | { | ||
| 1649 | comPlusInterface.AddChild(comPlusMethod); | ||
| 1650 | } | ||
| 1651 | else | ||
| 1652 | { | ||
| 1653 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Interface_", (string)row[1], "ComPlusInterface")); | ||
| 1654 | } | ||
| 1655 | this.Core.IndexElement(row, comPlusMethod); | ||
| 1656 | } | ||
| 1657 | } | ||
| 1658 | |||
| 1659 | /// <summary> | ||
| 1660 | /// Decompile the ComPlusMethodProperty table. | ||
| 1661 | /// </summary> | ||
| 1662 | /// <param name="table">The table to decompile.</param> | ||
| 1663 | private void DecompileComPlusMethodPropertyTable(Table table) | ||
| 1664 | { | ||
| 1665 | foreach (Row row in table.Rows) | ||
| 1666 | { | ||
| 1667 | ComPlus.ComPlusMethod comPlusMethod = (ComPlus.ComPlusMethod)this.Core.GetIndexedElement("ComPlusMethod", (string)row[0]); | ||
| 1668 | if (null == comPlusMethod) | ||
| 1669 | { | ||
| 1670 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Method_", (string)row[0], "ComPlusMethod")); | ||
| 1671 | } | ||
| 1672 | |||
| 1673 | switch ((string)row[1]) | ||
| 1674 | { | ||
| 1675 | case "AutoComplete": | ||
| 1676 | switch ((string)row[2]) | ||
| 1677 | { | ||
| 1678 | case "1": | ||
| 1679 | comPlusMethod.AutoComplete = ComPlus.YesNoType.yes; | ||
| 1680 | break; | ||
| 1681 | case "0": | ||
| 1682 | comPlusMethod.AutoComplete = ComPlus.YesNoType.no; | ||
| 1683 | break; | ||
| 1684 | default: | ||
| 1685 | // TODO: Warning | ||
| 1686 | break; | ||
| 1687 | } | ||
| 1688 | break; | ||
| 1689 | case "Description": | ||
| 1690 | comPlusMethod.Description = (string)row[2]; | ||
| 1691 | break; | ||
| 1692 | default: | ||
| 1693 | // TODO: Warning | ||
| 1694 | break; | ||
| 1695 | } | ||
| 1696 | } | ||
| 1697 | } | ||
| 1698 | |||
| 1699 | /// <summary> | ||
| 1700 | /// Decompile the ComPlusRoleForMethod table. | ||
| 1701 | /// </summary> | ||
| 1702 | /// <param name="table">The table to decompile.</param> | ||
| 1703 | private void DecompileComPlusRoleForMethodTable(Table table) | ||
| 1704 | { | ||
| 1705 | foreach (Row row in table.Rows) | ||
| 1706 | { | ||
| 1707 | ComPlus.ComPlusRoleForMethod roleForMethod = new ComPlus.ComPlusRoleForMethod(); | ||
| 1708 | |||
| 1709 | roleForMethod.Id = (string)row[0]; | ||
| 1710 | roleForMethod.Method = (string)row[1]; | ||
| 1711 | roleForMethod.ApplicationRole = (string)row[2]; | ||
| 1712 | |||
| 1713 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
| 1714 | if (null != component) | ||
| 1715 | { | ||
| 1716 | component.AddChild(roleForMethod); | ||
| 1717 | } | ||
| 1718 | else | ||
| 1719 | { | ||
| 1720 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
| 1721 | } | ||
| 1722 | } | ||
| 1723 | } | ||
| 1724 | |||
| 1725 | /// <summary> | ||
| 1726 | /// Decompile the ComPlusSubscription table. | ||
| 1727 | /// </summary> | ||
| 1728 | /// <param name="table">The table to decompile.</param> | ||
| 1729 | private void DecompileComPlusSubscriptionTable(Table table) | ||
| 1730 | { | ||
| 1731 | foreach (Row row in table.Rows) | ||
| 1732 | { | ||
| 1733 | ComPlus.ComPlusSubscription subscription = new ComPlus.ComPlusSubscription(); | ||
| 1734 | |||
| 1735 | subscription.Id = (string)row[0]; | ||
| 1736 | subscription.Component = (string)row[1]; | ||
| 1737 | subscription.SubscriptionId = (string)row[3]; | ||
| 1738 | subscription.Name = (string)row[4]; | ||
| 1739 | subscription.EventCLSID = (string)row[5]; | ||
| 1740 | subscription.PublisherID = (string)row[6]; | ||
| 1741 | |||
| 1742 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
| 1743 | if (null != component) | ||
| 1744 | { | ||
| 1745 | component.AddChild(subscription); | ||
| 1746 | } | ||
| 1747 | else | ||
| 1748 | { | ||
| 1749 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
| 1750 | } | ||
| 1751 | this.Core.IndexElement(row, subscription); | ||
| 1752 | } | ||
| 1753 | } | ||
| 1754 | |||
| 1755 | /// <summary> | ||
| 1756 | /// Decompile the ComPlusSubscriptionProperty table. | ||
| 1757 | /// </summary> | ||
| 1758 | /// <param name="table">The table to decompile.</param> | ||
| 1759 | private void DecompileComPlusSubscriptionPropertyTable(Table table) | ||
| 1760 | { | ||
| 1761 | foreach (Row row in table.Rows) | ||
| 1762 | { | ||
| 1763 | ComPlus.ComPlusSubscription subscription = (ComPlus.ComPlusSubscription)this.Core.GetIndexedElement("ComPlusSubscription", (string)row[0]); | ||
| 1764 | if (null == subscription) | ||
| 1765 | { | ||
| 1766 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Subscription_", (string)row[0], "ComPlusSubscription")); | ||
| 1767 | } | ||
| 1768 | |||
| 1769 | switch ((string)row[1]) | ||
| 1770 | { | ||
| 1771 | case "Description": | ||
| 1772 | subscription.Description = (string)row[2]; | ||
| 1773 | break; | ||
| 1774 | case "Enabled": | ||
| 1775 | switch ((string)row[2]) | ||
| 1776 | { | ||
| 1777 | case "1": | ||
| 1778 | subscription.Enabled = ComPlus.YesNoType.yes; | ||
| 1779 | break; | ||
| 1780 | case "0": | ||
| 1781 | subscription.Enabled = ComPlus.YesNoType.no; | ||
| 1782 | break; | ||
| 1783 | default: | ||
| 1784 | // TODO: Warning | ||
| 1785 | break; | ||
| 1786 | } | ||
| 1787 | break; | ||
| 1788 | case "EventClassPartitionID": | ||
| 1789 | subscription.EventClassPartitionID = (string)row[2]; | ||
| 1790 | break; | ||
| 1791 | case "FilterCriteria": | ||
| 1792 | subscription.FilterCriteria = (string)row[2]; | ||
| 1793 | break; | ||
| 1794 | case "InterfaceID": | ||
| 1795 | subscription.InterfaceID = (string)row[2]; | ||
| 1796 | break; | ||
| 1797 | case "MachineName": | ||
| 1798 | subscription.MachineName = (string)row[2]; | ||
| 1799 | break; | ||
| 1800 | case "MethodName": | ||
| 1801 | subscription.MethodName = (string)row[2]; | ||
| 1802 | break; | ||
| 1803 | case "PerUser": | ||
| 1804 | switch ((string)row[2]) | ||
| 1805 | { | ||
| 1806 | case "1": | ||
| 1807 | subscription.PerUser = ComPlus.YesNoType.yes; | ||
| 1808 | break; | ||
| 1809 | case "0": | ||
| 1810 | subscription.PerUser = ComPlus.YesNoType.no; | ||
| 1811 | break; | ||
| 1812 | default: | ||
| 1813 | // TODO: Warning | ||
| 1814 | break; | ||
| 1815 | } | ||
| 1816 | break; | ||
| 1817 | case "Queued": | ||
| 1818 | switch ((string)row[2]) | ||
| 1819 | { | ||
| 1820 | case "1": | ||
| 1821 | subscription.Queued = ComPlus.YesNoType.yes; | ||
| 1822 | break; | ||
| 1823 | case "0": | ||
| 1824 | subscription.Queued = ComPlus.YesNoType.no; | ||
| 1825 | break; | ||
| 1826 | default: | ||
| 1827 | // TODO: Warning | ||
| 1828 | break; | ||
| 1829 | } | ||
| 1830 | break; | ||
| 1831 | case "SubscriberMoniker": | ||
| 1832 | subscription.SubscriberMoniker = (string)row[2]; | ||
| 1833 | break; | ||
| 1834 | case "UserName": | ||
| 1835 | subscription.UserName = (string)row[2]; | ||
| 1836 | break; | ||
| 1837 | default: | ||
| 1838 | // TODO: Warning | ||
| 1839 | break; | ||
| 1840 | } | ||
| 1841 | } | ||
| 1842 | } | ||
| 1843 | } | ||
| 1844 | #endif | ||
| 1845 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusErrors.cs b/src/ext/ComPlus/wixext/ComPlusErrors.cs new file mode 100644 index 00000000..91b41679 --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusErrors.cs | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Resources; | ||
| 7 | using WixToolset.Data; | ||
| 8 | |||
| 9 | public static class ComPlusErrors | ||
| 10 | { | ||
| 11 | public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
| 12 | { | ||
| 13 | return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName, attributeName); | ||
| 14 | } | ||
| 15 | |||
| 16 | public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName) | ||
| 17 | { | ||
| 18 | return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName); | ||
| 19 | } | ||
| 20 | |||
| 21 | public static Message RequiredAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2) | ||
| 22 | { | ||
| 23 | return Message(sourceLineNumbers, Ids.RequiredAttribute, "A {0} element must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2); | ||
| 24 | } | ||
| 25 | |||
| 26 | public static Message RequiredAttributeNotUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2) | ||
| 27 | { | ||
| 28 | return Message(sourceLineNumbers, Ids.RequiredAttributeNotUnderComponent, "A {0} element not nested under a component must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2); | ||
| 29 | } | ||
| 30 | |||
| 31 | public static Message RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
| 32 | { | ||
| 33 | return Message(sourceLineNumbers, Ids.RequiredAttributeUnderComponent, "The {0}/@{1} attribute must be provided when {0} element is nested under a component.", elementName, attributeName); | ||
| 34 | } | ||
| 35 | |||
| 36 | public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) | ||
| 37 | { | ||
| 38 | return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute cannot coexist with the {2} attribute's value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue); | ||
| 39 | } | ||
| 40 | |||
| 41 | public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue) | ||
| 42 | { | ||
| 43 | return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'.", elementName, attributeName, value, otherAttributeName, otherValue); | ||
| 44 | } | ||
| 45 | |||
| 46 | public static Message UnexpectedAttributeWithoutOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) | ||
| 47 | { | ||
| 48 | return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithoutOtherValue, "The {0}/@{1} cannot be provided unless the {2} attribute is provided with a value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue); | ||
| 49 | } | ||
| 50 | |||
| 51 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
| 52 | { | ||
| 53 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | ||
| 54 | } | ||
| 55 | |||
| 56 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
| 57 | { | ||
| 58 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); | ||
| 59 | } | ||
| 60 | |||
| 61 | public enum Ids | ||
| 62 | { | ||
| 63 | IllegalAttributeWithoutComponent = 6000, | ||
| 64 | IllegalElementWithoutComponent = 6001, | ||
| 65 | UnexpectedAttributeWithOtherValue = 6002, | ||
| 66 | UnexpectedAttributeWithoutOtherValue = 6003, | ||
| 67 | RequiredAttributeUnderComponent = 6004, | ||
| 68 | RequiredAttribute = 6005, | ||
| 69 | RequiredAttributeNotUnderComponent = 6006, | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusExtensionData.cs b/src/ext/ComPlus/wixext/ComPlusExtensionData.cs new file mode 100644 index 00000000..9cd5341e --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusExtensionData.cs | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.Extensibility; | ||
| 7 | |||
| 8 | /// <summary> | ||
| 9 | /// The WiX Toolset COM+ Extension. | ||
| 10 | /// </summary> | ||
| 11 | public sealed class ComPlusExtensionData : BaseExtensionData | ||
| 12 | { | ||
| 13 | /// <summary> | ||
| 14 | /// Gets the default culture. | ||
| 15 | /// </summary> | ||
| 16 | /// <value>The default culture.</value> | ||
| 17 | public override string DefaultCulture => "en-US"; | ||
| 18 | |||
| 19 | public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) | ||
| 20 | { | ||
| 21 | symbolDefinition = ComPlusSymbolDefinitions.ByName(name); | ||
| 22 | return symbolDefinition != null; | ||
| 23 | } | ||
| 24 | |||
| 25 | public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) | ||
| 26 | { | ||
| 27 | return Intermediate.Load(typeof(ComPlusExtensionData).Assembly, "WixToolset.ComPlus.complus.wixlib", symbolDefinitions); | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusExtensionFactory.cs b/src/ext/ComPlus/wixext/ComPlusExtensionFactory.cs new file mode 100644 index 00000000..76b51bff --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusExtensionFactory.cs | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using WixToolset.Extensibility; | ||
| 8 | |||
| 9 | public class ComPlusExtensionFactory : BaseExtensionFactory | ||
| 10 | { | ||
| 11 | protected override IReadOnlyCollection<Type> ExtensionTypes => new[] | ||
| 12 | { | ||
| 13 | typeof(ComPlusCompiler), | ||
| 14 | typeof(ComPlusExtensionData), | ||
| 15 | typeof(ComPlusWindowsInstallerBackendBinderExtension), | ||
| 16 | }; | ||
| 17 | } | ||
| 18 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs b/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs new file mode 100644 index 00000000..565e1d44 --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs | |||
| @@ -0,0 +1,360 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data.WindowsInstaller; | ||
| 6 | |||
| 7 | public static class ComPlusTableDefinitions | ||
| 8 | { | ||
| 9 | public static readonly TableDefinition ComPlusPartition = new TableDefinition( | ||
| 10 | "ComPlusPartition", | ||
| 11 | ComPlusSymbolDefinitions.ComPlusPartition, | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new ColumnDefinition("Partition", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 15 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 16 | new ColumnDefinition("Id", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 17 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 18 | }, | ||
| 19 | symbolIdIsPrimaryKey: true | ||
| 20 | ); | ||
| 21 | |||
| 22 | public static readonly TableDefinition ComPlusPartitionProperty = new TableDefinition( | ||
| 23 | "ComPlusPartitionProperty", | ||
| 24 | ComPlusSymbolDefinitions.ComPlusPartitionProperty, | ||
| 25 | new[] | ||
| 26 | { | ||
| 27 | new ColumnDefinition("Partition_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusPartition", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 28 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 29 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 30 | }, | ||
| 31 | symbolIdIsPrimaryKey: false | ||
| 32 | ); | ||
| 33 | |||
| 34 | public static readonly TableDefinition ComPlusPartitionRole = new TableDefinition( | ||
| 35 | "ComPlusPartitionRole", | ||
| 36 | ComPlusSymbolDefinitions.ComPlusPartitionRole, | ||
| 37 | new[] | ||
| 38 | { | ||
| 39 | new ColumnDefinition("PartitionRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 40 | new ColumnDefinition("Partition_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusPartition", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 41 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 42 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 43 | }, | ||
| 44 | symbolIdIsPrimaryKey: true | ||
| 45 | ); | ||
| 46 | |||
| 47 | public static readonly TableDefinition ComPlusUserInPartitionRole = new TableDefinition( | ||
| 48 | "ComPlusUserInPartitionRole", | ||
| 49 | ComPlusSymbolDefinitions.ComPlusUserInPartitionRole, | ||
| 50 | new[] | ||
| 51 | { | ||
| 52 | new ColumnDefinition("UserInPartitionRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 53 | new ColumnDefinition("PartitionRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusPartitionRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 54 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 55 | new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 56 | }, | ||
| 57 | symbolIdIsPrimaryKey: true | ||
| 58 | ); | ||
| 59 | |||
| 60 | public static readonly TableDefinition ComPlusGroupInPartitionRole = new TableDefinition( | ||
| 61 | "ComPlusGroupInPartitionRole", | ||
| 62 | ComPlusSymbolDefinitions.ComPlusGroupInPartitionRole, | ||
| 63 | new[] | ||
| 64 | { | ||
| 65 | new ColumnDefinition("GroupInPartitionRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 66 | new ColumnDefinition("PartitionRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusPartitionRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 67 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 68 | new ColumnDefinition("Group_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 69 | }, | ||
| 70 | symbolIdIsPrimaryKey: true | ||
| 71 | ); | ||
| 72 | |||
| 73 | public static readonly TableDefinition ComPlusPartitionUser = new TableDefinition( | ||
| 74 | "ComPlusPartitionUser", | ||
| 75 | ComPlusSymbolDefinitions.ComPlusPartitionUser, | ||
| 76 | new[] | ||
| 77 | { | ||
| 78 | new ColumnDefinition("PartitionUser", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 79 | new ColumnDefinition("Partition_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusPartition", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 80 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 81 | new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 82 | }, | ||
| 83 | symbolIdIsPrimaryKey: true | ||
| 84 | ); | ||
| 85 | |||
| 86 | public static readonly TableDefinition ComPlusApplication = new TableDefinition( | ||
| 87 | "ComPlusApplication", | ||
| 88 | ComPlusSymbolDefinitions.ComPlusApplication, | ||
| 89 | new[] | ||
| 90 | { | ||
| 91 | new ColumnDefinition("Application", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 92 | new ColumnDefinition("Partition_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "ComPlusPartition", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 93 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 94 | new ColumnDefinition("Id", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 95 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 96 | }, | ||
| 97 | symbolIdIsPrimaryKey: true | ||
| 98 | ); | ||
| 99 | |||
| 100 | public static readonly TableDefinition ComPlusApplicationProperty = new TableDefinition( | ||
| 101 | "ComPlusApplicationProperty", | ||
| 102 | ComPlusSymbolDefinitions.ComPlusApplicationProperty, | ||
| 103 | new[] | ||
| 104 | { | ||
| 105 | new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplication", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 106 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 107 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 108 | }, | ||
| 109 | symbolIdIsPrimaryKey: false | ||
| 110 | ); | ||
| 111 | |||
| 112 | public static readonly TableDefinition ComPlusApplicationRole = new TableDefinition( | ||
| 113 | "ComPlusApplicationRole", | ||
| 114 | ComPlusSymbolDefinitions.ComPlusApplicationRole, | ||
| 115 | new[] | ||
| 116 | { | ||
| 117 | new ColumnDefinition("ApplicationRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 118 | new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplication", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 119 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 120 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 121 | }, | ||
| 122 | symbolIdIsPrimaryKey: true | ||
| 123 | ); | ||
| 124 | |||
| 125 | public static readonly TableDefinition ComPlusApplicationRoleProperty = new TableDefinition( | ||
| 126 | "ComPlusApplicationRoleProperty", | ||
| 127 | ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty, | ||
| 128 | new[] | ||
| 129 | { | ||
| 130 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 131 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 132 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 133 | }, | ||
| 134 | symbolIdIsPrimaryKey: false | ||
| 135 | ); | ||
| 136 | |||
| 137 | public static readonly TableDefinition ComPlusUserInApplicationRole = new TableDefinition( | ||
| 138 | "ComPlusUserInApplicationRole", | ||
| 139 | ComPlusSymbolDefinitions.ComPlusUserInApplicationRole, | ||
| 140 | new[] | ||
| 141 | { | ||
| 142 | new ColumnDefinition("UserInApplicationRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 143 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 144 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 145 | new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 146 | }, | ||
| 147 | symbolIdIsPrimaryKey: true | ||
| 148 | ); | ||
| 149 | |||
| 150 | public static readonly TableDefinition ComPlusGroupInApplicationRole = new TableDefinition( | ||
| 151 | "ComPlusGroupInApplicationRole", | ||
| 152 | ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole, | ||
| 153 | new[] | ||
| 154 | { | ||
| 155 | new ColumnDefinition("GroupInApplicationRole", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 156 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 157 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 158 | new ColumnDefinition("Group_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 159 | }, | ||
| 160 | symbolIdIsPrimaryKey: true | ||
| 161 | ); | ||
| 162 | |||
| 163 | public static readonly TableDefinition ComPlusAssembly = new TableDefinition( | ||
| 164 | "ComPlusAssembly", | ||
| 165 | ComPlusSymbolDefinitions.ComPlusAssembly, | ||
| 166 | new[] | ||
| 167 | { | ||
| 168 | new ColumnDefinition("Assembly", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 169 | new ColumnDefinition("Application_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "ComPlusApplication", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 170 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 171 | new ColumnDefinition("AssemblyName", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 172 | new ColumnDefinition("DllPath", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 173 | new ColumnDefinition("TlbPath", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 174 | new ColumnDefinition("PSDllPath", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 175 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 176 | }, | ||
| 177 | symbolIdIsPrimaryKey: true | ||
| 178 | ); | ||
| 179 | |||
| 180 | public static readonly TableDefinition ComPlusAssemblyDependency = new TableDefinition( | ||
| 181 | "ComPlusAssemblyDependency", | ||
| 182 | ComPlusSymbolDefinitions.ComPlusAssemblyDependency, | ||
| 183 | new[] | ||
| 184 | { | ||
| 185 | new ColumnDefinition("Assembly_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusAssembly", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 186 | new ColumnDefinition("RequiredAssembly_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusAssembly", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 187 | }, | ||
| 188 | symbolIdIsPrimaryKey: false | ||
| 189 | ); | ||
| 190 | |||
| 191 | public static readonly TableDefinition ComPlusComponent = new TableDefinition( | ||
| 192 | "ComPlusComponent", | ||
| 193 | ComPlusSymbolDefinitions.ComPlusComponent, | ||
| 194 | new[] | ||
| 195 | { | ||
| 196 | new ColumnDefinition("ComPlusComponent", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 197 | new ColumnDefinition("Assembly_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusAssembly", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 198 | new ColumnDefinition("CLSID", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 199 | }, | ||
| 200 | symbolIdIsPrimaryKey: true | ||
| 201 | ); | ||
| 202 | |||
| 203 | public static readonly TableDefinition ComPlusComponentProperty = new TableDefinition( | ||
| 204 | "ComPlusComponentProperty", | ||
| 205 | ComPlusSymbolDefinitions.ComPlusComponentProperty, | ||
| 206 | new[] | ||
| 207 | { | ||
| 208 | new ColumnDefinition("ComPlusComponent_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusComponent", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 209 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 210 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 211 | }, | ||
| 212 | symbolIdIsPrimaryKey: false | ||
| 213 | ); | ||
| 214 | |||
| 215 | public static readonly TableDefinition ComPlusRoleForComponent = new TableDefinition( | ||
| 216 | "ComPlusRoleForComponent", | ||
| 217 | ComPlusSymbolDefinitions.ComPlusRoleForComponent, | ||
| 218 | new[] | ||
| 219 | { | ||
| 220 | new ColumnDefinition("RoleForComponent", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 221 | new ColumnDefinition("ComPlusComponent_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusComponent", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 222 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 223 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 224 | }, | ||
| 225 | symbolIdIsPrimaryKey: true | ||
| 226 | ); | ||
| 227 | |||
| 228 | public static readonly TableDefinition ComPlusInterface = new TableDefinition( | ||
| 229 | "ComPlusInterface", | ||
| 230 | ComPlusSymbolDefinitions.ComPlusInterface, | ||
| 231 | new[] | ||
| 232 | { | ||
| 233 | new ColumnDefinition("Interface", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 234 | new ColumnDefinition("ComPlusComponent_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusComponent", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 235 | new ColumnDefinition("IID", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 236 | }, | ||
| 237 | symbolIdIsPrimaryKey: true | ||
| 238 | ); | ||
| 239 | |||
| 240 | public static readonly TableDefinition ComPlusInterfaceProperty = new TableDefinition( | ||
| 241 | "ComPlusInterfaceProperty", | ||
| 242 | ComPlusSymbolDefinitions.ComPlusInterfaceProperty, | ||
| 243 | new[] | ||
| 244 | { | ||
| 245 | new ColumnDefinition("Interface_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusInterface", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 246 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 247 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 248 | }, | ||
| 249 | symbolIdIsPrimaryKey: false | ||
| 250 | ); | ||
| 251 | |||
| 252 | public static readonly TableDefinition ComPlusRoleForInterface = new TableDefinition( | ||
| 253 | "ComPlusRoleForInterface", | ||
| 254 | ComPlusSymbolDefinitions.ComPlusRoleForInterface, | ||
| 255 | new[] | ||
| 256 | { | ||
| 257 | new ColumnDefinition("RoleForInterface", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 258 | new ColumnDefinition("Interface_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusInterface", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 259 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 260 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 261 | }, | ||
| 262 | symbolIdIsPrimaryKey: true | ||
| 263 | ); | ||
| 264 | |||
| 265 | public static readonly TableDefinition ComPlusMethod = new TableDefinition( | ||
| 266 | "ComPlusMethod", | ||
| 267 | ComPlusSymbolDefinitions.ComPlusMethod, | ||
| 268 | new[] | ||
| 269 | { | ||
| 270 | new ColumnDefinition("Method", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 271 | new ColumnDefinition("Interface_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusInterface", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 272 | new ColumnDefinition("Index", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown), | ||
| 273 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 274 | }, | ||
| 275 | symbolIdIsPrimaryKey: true | ||
| 276 | ); | ||
| 277 | |||
| 278 | public static readonly TableDefinition ComPlusMethodProperty = new TableDefinition( | ||
| 279 | "ComPlusMethodProperty", | ||
| 280 | ComPlusSymbolDefinitions.ComPlusMethodProperty, | ||
| 281 | new[] | ||
| 282 | { | ||
| 283 | new ColumnDefinition("Method_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusMethod", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 284 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 285 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 286 | }, | ||
| 287 | symbolIdIsPrimaryKey: false | ||
| 288 | ); | ||
| 289 | |||
| 290 | public static readonly TableDefinition ComPlusRoleForMethod = new TableDefinition( | ||
| 291 | "ComPlusRoleForMethod", | ||
| 292 | ComPlusSymbolDefinitions.ComPlusRoleForMethod, | ||
| 293 | new[] | ||
| 294 | { | ||
| 295 | new ColumnDefinition("RoleForMethod", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 296 | new ColumnDefinition("Method_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusMethod", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 297 | new ColumnDefinition("ApplicationRole_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusApplicationRole", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 298 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 299 | }, | ||
| 300 | symbolIdIsPrimaryKey: true | ||
| 301 | ); | ||
| 302 | |||
| 303 | public static readonly TableDefinition ComPlusSubscription = new TableDefinition( | ||
| 304 | "ComPlusSubscription", | ||
| 305 | ComPlusSymbolDefinitions.ComPlusSubscription, | ||
| 306 | new[] | ||
| 307 | { | ||
| 308 | new ColumnDefinition("Subscription", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
| 309 | new ColumnDefinition("ComPlusComponent_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusComponent", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 310 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 311 | new ColumnDefinition("Id", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 312 | new ColumnDefinition("Name", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 313 | new ColumnDefinition("EventCLSID", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 314 | new ColumnDefinition("PublisherID", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 315 | }, | ||
| 316 | symbolIdIsPrimaryKey: false | ||
| 317 | ); | ||
| 318 | |||
| 319 | public static readonly TableDefinition ComPlusSubscriptionProperty = new TableDefinition( | ||
| 320 | "ComPlusSubscriptionProperty", | ||
| 321 | ComPlusSymbolDefinitions.ComPlusSubscriptionProperty, | ||
| 322 | new[] | ||
| 323 | { | ||
| 324 | new ColumnDefinition("Subscription_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "ComPlusSubscription", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
| 325 | new ColumnDefinition("Name", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 326 | new ColumnDefinition("Value", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
| 327 | }, | ||
| 328 | symbolIdIsPrimaryKey: false | ||
| 329 | ); | ||
| 330 | |||
| 331 | public static readonly TableDefinition[] All = new[] | ||
| 332 | { | ||
| 333 | ComPlusPartition, | ||
| 334 | ComPlusPartitionProperty, | ||
| 335 | ComPlusPartitionRole, | ||
| 336 | ComPlusUserInPartitionRole, | ||
| 337 | ComPlusGroupInPartitionRole, | ||
| 338 | ComPlusPartitionUser, | ||
| 339 | ComPlusApplication, | ||
| 340 | ComPlusApplicationProperty, | ||
| 341 | ComPlusApplicationRole, | ||
| 342 | ComPlusApplicationRoleProperty, | ||
| 343 | ComPlusUserInApplicationRole, | ||
| 344 | ComPlusGroupInApplicationRole, | ||
| 345 | ComPlusAssembly, | ||
| 346 | ComPlusAssemblyDependency, | ||
| 347 | ComPlusComponent, | ||
| 348 | ComPlusComponentProperty, | ||
| 349 | ComPlusRoleForComponent, | ||
| 350 | ComPlusInterface, | ||
| 351 | ComPlusInterfaceProperty, | ||
| 352 | ComPlusRoleForInterface, | ||
| 353 | ComPlusMethod, | ||
| 354 | ComPlusMethodProperty, | ||
| 355 | ComPlusRoleForMethod, | ||
| 356 | ComPlusSubscription, | ||
| 357 | ComPlusSubscriptionProperty, | ||
| 358 | }; | ||
| 359 | } | ||
| 360 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusWarnings.cs b/src/ext/ComPlus/wixext/ComPlusWarnings.cs new file mode 100644 index 00000000..e0000918 --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusWarnings.cs | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Resources; | ||
| 7 | using WixToolset.Data; | ||
| 8 | |||
| 9 | public static class ComPlusWarnings | ||
| 10 | { | ||
| 11 | public static Message MissingComponents(SourceLineNumber sourceLineNumbers) | ||
| 12 | { | ||
| 13 | return Message(sourceLineNumbers, Ids.MissingComponents, "The ComPlusAssembly element has a Type attribute with a value of 'native', but the element does not contain any ComPlusComponent elements. All components contained in a native assembly must be listed, or they will not be correctly removed during uninstall."); | ||
| 14 | } | ||
| 15 | |||
| 16 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
| 17 | { | ||
| 18 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | ||
| 19 | } | ||
| 20 | |||
| 21 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
| 22 | { | ||
| 23 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); | ||
| 24 | } | ||
| 25 | |||
| 26 | public enum Ids | ||
| 27 | { | ||
| 28 | MissingComponents = 6007, | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs b/src/ext/ComPlus/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..cf226a3d --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using WixToolset.Data.WindowsInstaller; | ||
| 7 | using WixToolset.Extensibility; | ||
| 8 | |||
| 9 | public class ComPlusWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension | ||
| 10 | { | ||
| 11 | public override IReadOnlyCollection<TableDefinition> TableDefinitions => ComPlusTableDefinitions.All; | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationPropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationPropertySymbol.cs new file mode 100644 index 00000000..6d1e2d28 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationPropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusApplicationProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusApplicationProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertySymbolFields.ApplicationRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusApplicationPropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusApplicationPropertySymbolFields | ||
| 27 | { | ||
| 28 | ApplicationRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusApplicationPropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusApplicationPropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusApplicationProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusApplicationPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusApplicationProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusApplicationPropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ApplicationRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusApplicationPropertySymbolFields.ApplicationRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusApplicationPropertySymbolFields.ApplicationRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusApplicationPropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusApplicationPropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusApplicationPropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusApplicationPropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRolePropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRolePropertySymbol.cs new file mode 100644 index 00000000..3b957899 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRolePropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusApplicationRoleProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusApplicationRoleProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertySymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusApplicationRolePropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusApplicationRolePropertySymbolFields | ||
| 27 | { | ||
| 28 | ApplicationRoleRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusApplicationRolePropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusApplicationRolePropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusApplicationRolePropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusApplicationRolePropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ApplicationRoleRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusApplicationRolePropertySymbolFields.ApplicationRoleRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusApplicationRolePropertySymbolFields.ApplicationRoleRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusApplicationRolePropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusApplicationRolePropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusApplicationRolePropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusApplicationRolePropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRoleSymbol.cs new file mode 100644 index 00000000..84028ee3 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusApplicationRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusApplicationRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleSymbolFields.ApplicationRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleSymbolFields.Name), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusApplicationRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusApplicationRoleSymbolFields | ||
| 27 | { | ||
| 28 | ApplicationRef, | ||
| 29 | ComponentRef, | ||
| 30 | Name, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusApplicationRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusApplicationRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusApplicationRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusApplicationRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusApplicationRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusApplicationRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ApplicationRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusApplicationRoleSymbolFields.ApplicationRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusApplicationRoleSymbolFields.ApplicationRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusApplicationRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusApplicationRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Name | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusApplicationRoleSymbolFields.Name].AsString(); | ||
| 60 | set => this.Set((int)ComPlusApplicationRoleSymbolFields.Name, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationSymbol.cs new file mode 100644 index 00000000..ce541e43 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusApplicationSymbol.cs | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusApplication = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusApplication.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusApplicationSymbolFields.PartitionRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusApplicationSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusApplicationSymbolFields.ApplicationId), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(ComPlusApplicationSymbolFields.Name), IntermediateFieldType.String), | ||
| 18 | }, | ||
| 19 | typeof(ComPlusApplicationSymbol)); | ||
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | namespace WixToolset.ComPlus.Symbols | ||
| 24 | { | ||
| 25 | using WixToolset.Data; | ||
| 26 | |||
| 27 | public enum ComPlusApplicationSymbolFields | ||
| 28 | { | ||
| 29 | PartitionRef, | ||
| 30 | ComponentRef, | ||
| 31 | ApplicationId, | ||
| 32 | Name, | ||
| 33 | } | ||
| 34 | |||
| 35 | public class ComPlusApplicationSymbol : IntermediateSymbol | ||
| 36 | { | ||
| 37 | public ComPlusApplicationSymbol() : base(ComPlusSymbolDefinitions.ComPlusApplication, null, null) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public ComPlusApplicationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusApplication, sourceLineNumber, id) | ||
| 42 | { | ||
| 43 | } | ||
| 44 | |||
| 45 | public IntermediateField this[ComPlusApplicationSymbolFields index] => this.Fields[(int)index]; | ||
| 46 | |||
| 47 | public string PartitionRef | ||
| 48 | { | ||
| 49 | get => this.Fields[(int)ComPlusApplicationSymbolFields.PartitionRef].AsString(); | ||
| 50 | set => this.Set((int)ComPlusApplicationSymbolFields.PartitionRef, value); | ||
| 51 | } | ||
| 52 | |||
| 53 | public string ComponentRef | ||
| 54 | { | ||
| 55 | get => this.Fields[(int)ComPlusApplicationSymbolFields.ComponentRef].AsString(); | ||
| 56 | set => this.Set((int)ComPlusApplicationSymbolFields.ComponentRef, value); | ||
| 57 | } | ||
| 58 | |||
| 59 | public string ApplicationId | ||
| 60 | { | ||
| 61 | get => this.Fields[(int)ComPlusApplicationSymbolFields.ApplicationId].AsString(); | ||
| 62 | set => this.Set((int)ComPlusApplicationSymbolFields.ApplicationId, value); | ||
| 63 | } | ||
| 64 | |||
| 65 | public string Name | ||
| 66 | { | ||
| 67 | get => this.Fields[(int)ComPlusApplicationSymbolFields.Name].AsString(); | ||
| 68 | set => this.Set((int)ComPlusApplicationSymbolFields.Name, value); | ||
| 69 | } | ||
| 70 | } | ||
| 71 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblyDependencySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblyDependencySymbol.cs new file mode 100644 index 00000000..549d53e4 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblyDependencySymbol.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusAssemblyDependency = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusAssemblyDependency.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusAssemblyDependencySymbolFields.AssemblyRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusAssemblyDependencySymbolFields.RequiredAssemblyRef), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(ComPlusAssemblyDependencySymbol)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.ComPlus.Symbols | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum ComPlusAssemblyDependencySymbolFields | ||
| 26 | { | ||
| 27 | AssemblyRef, | ||
| 28 | RequiredAssemblyRef, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class ComPlusAssemblyDependencySymbol : IntermediateSymbol | ||
| 32 | { | ||
| 33 | public ComPlusAssemblyDependencySymbol() : base(ComPlusSymbolDefinitions.ComPlusAssemblyDependency, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public ComPlusAssemblyDependencySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusAssemblyDependency, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[ComPlusAssemblyDependencySymbolFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string AssemblyRef | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)ComPlusAssemblyDependencySymbolFields.AssemblyRef].AsString(); | ||
| 46 | set => this.Set((int)ComPlusAssemblyDependencySymbolFields.AssemblyRef, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string RequiredAssemblyRef | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)ComPlusAssemblyDependencySymbolFields.RequiredAssemblyRef].AsString(); | ||
| 52 | set => this.Set((int)ComPlusAssemblyDependencySymbolFields.RequiredAssemblyRef, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblySymbol.cs new file mode 100644 index 00000000..1329df30 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusAssemblySymbol.cs | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusAssembly = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusAssembly.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.ApplicationRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.AssemblyName), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.DllPath), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.TlbPath), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.PSDllPath), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(ComPlusAssemblySymbolFields.Attributes), IntermediateFieldType.Number), | ||
| 21 | }, | ||
| 22 | typeof(ComPlusAssemblySymbol)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | namespace WixToolset.ComPlus.Symbols | ||
| 27 | { | ||
| 28 | using WixToolset.Data; | ||
| 29 | |||
| 30 | public enum ComPlusAssemblySymbolFields | ||
| 31 | { | ||
| 32 | ApplicationRef, | ||
| 33 | ComponentRef, | ||
| 34 | AssemblyName, | ||
| 35 | DllPath, | ||
| 36 | TlbPath, | ||
| 37 | PSDllPath, | ||
| 38 | Attributes, | ||
| 39 | } | ||
| 40 | |||
| 41 | public class ComPlusAssemblySymbol : IntermediateSymbol | ||
| 42 | { | ||
| 43 | public ComPlusAssemblySymbol() : base(ComPlusSymbolDefinitions.ComPlusAssembly, null, null) | ||
| 44 | { | ||
| 45 | } | ||
| 46 | |||
| 47 | public ComPlusAssemblySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusAssembly, sourceLineNumber, id) | ||
| 48 | { | ||
| 49 | } | ||
| 50 | |||
| 51 | public IntermediateField this[ComPlusAssemblySymbolFields index] => this.Fields[(int)index]; | ||
| 52 | |||
| 53 | public string ApplicationRef | ||
| 54 | { | ||
| 55 | get => this.Fields[(int)ComPlusAssemblySymbolFields.ApplicationRef].AsString(); | ||
| 56 | set => this.Set((int)ComPlusAssemblySymbolFields.ApplicationRef, value); | ||
| 57 | } | ||
| 58 | |||
| 59 | public string ComponentRef | ||
| 60 | { | ||
| 61 | get => this.Fields[(int)ComPlusAssemblySymbolFields.ComponentRef].AsString(); | ||
| 62 | set => this.Set((int)ComPlusAssemblySymbolFields.ComponentRef, value); | ||
| 63 | } | ||
| 64 | |||
| 65 | public string AssemblyName | ||
| 66 | { | ||
| 67 | get => this.Fields[(int)ComPlusAssemblySymbolFields.AssemblyName].AsString(); | ||
| 68 | set => this.Set((int)ComPlusAssemblySymbolFields.AssemblyName, value); | ||
| 69 | } | ||
| 70 | |||
| 71 | public string DllPath | ||
| 72 | { | ||
| 73 | get => this.Fields[(int)ComPlusAssemblySymbolFields.DllPath].AsString(); | ||
| 74 | set => this.Set((int)ComPlusAssemblySymbolFields.DllPath, value); | ||
| 75 | } | ||
| 76 | |||
| 77 | public string TlbPath | ||
| 78 | { | ||
| 79 | get => this.Fields[(int)ComPlusAssemblySymbolFields.TlbPath].AsString(); | ||
| 80 | set => this.Set((int)ComPlusAssemblySymbolFields.TlbPath, value); | ||
| 81 | } | ||
| 82 | |||
| 83 | public string PSDllPath | ||
| 84 | { | ||
| 85 | get => this.Fields[(int)ComPlusAssemblySymbolFields.PSDllPath].AsString(); | ||
| 86 | set => this.Set((int)ComPlusAssemblySymbolFields.PSDllPath, value); | ||
| 87 | } | ||
| 88 | |||
| 89 | public int Attributes | ||
| 90 | { | ||
| 91 | get => this.Fields[(int)ComPlusAssemblySymbolFields.Attributes].AsNumber(); | ||
| 92 | set => this.Set((int)ComPlusAssemblySymbolFields.Attributes, value); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusComponentPropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusComponentPropertySymbol.cs new file mode 100644 index 00000000..b1d85b60 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusComponentPropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusComponentProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusComponentProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusComponentPropertySymbolFields.ComPlusComponentRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusComponentPropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusComponentPropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusComponentPropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusComponentPropertySymbolFields | ||
| 27 | { | ||
| 28 | ComPlusComponentRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusComponentPropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusComponentPropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusComponentProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusComponentPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusComponentProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusComponentPropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ComPlusComponentRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusComponentPropertySymbolFields.ComPlusComponentRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusComponentPropertySymbolFields.ComPlusComponentRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusComponentPropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusComponentPropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusComponentPropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusComponentPropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusComponentSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusComponentSymbol.cs new file mode 100644 index 00000000..020b754c --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusComponentSymbol.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusComponent = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusComponent.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusComponentSymbolFields.AssemblyRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusComponentSymbolFields.CLSID), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(ComPlusComponentSymbol)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.ComPlus.Symbols | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum ComPlusComponentSymbolFields | ||
| 26 | { | ||
| 27 | AssemblyRef, | ||
| 28 | CLSID, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class ComPlusComponentSymbol : IntermediateSymbol | ||
| 32 | { | ||
| 33 | public ComPlusComponentSymbol() : base(ComPlusSymbolDefinitions.ComPlusComponent, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public ComPlusComponentSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusComponent, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[ComPlusComponentSymbolFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string AssemblyRef | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)ComPlusComponentSymbolFields.AssemblyRef].AsString(); | ||
| 46 | set => this.Set((int)ComPlusComponentSymbolFields.AssemblyRef, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string CLSID | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)ComPlusComponentSymbolFields.CLSID].AsString(); | ||
| 52 | set => this.Set((int)ComPlusComponentSymbolFields.CLSID, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInApplicationRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInApplicationRoleSymbol.cs new file mode 100644 index 00000000..d6b91e99 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInApplicationRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusGroupInApplicationRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusGroupInApplicationRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleSymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleSymbolFields.GroupRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusGroupInApplicationRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusGroupInApplicationRoleSymbolFields | ||
| 27 | { | ||
| 28 | ApplicationRoleRef, | ||
| 29 | ComponentRef, | ||
| 30 | GroupRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusGroupInApplicationRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusGroupInApplicationRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusGroupInApplicationRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusGroupInApplicationRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ApplicationRoleRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusGroupInApplicationRoleSymbolFields.ApplicationRoleRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusGroupInApplicationRoleSymbolFields.ApplicationRoleRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusGroupInApplicationRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusGroupInApplicationRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string GroupRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusGroupInApplicationRoleSymbolFields.GroupRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusGroupInApplicationRoleSymbolFields.GroupRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInPartitionRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInPartitionRoleSymbol.cs new file mode 100644 index 00000000..da70de9f --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusGroupInPartitionRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusGroupInPartitionRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusGroupInPartitionRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleSymbolFields.PartitionRoleRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleSymbolFields.GroupRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusGroupInPartitionRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusGroupInPartitionRoleSymbolFields | ||
| 27 | { | ||
| 28 | PartitionRoleRef, | ||
| 29 | ComponentRef, | ||
| 30 | GroupRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusGroupInPartitionRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusGroupInPartitionRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusGroupInPartitionRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusGroupInPartitionRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusGroupInPartitionRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusGroupInPartitionRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string PartitionRoleRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusGroupInPartitionRoleSymbolFields.PartitionRoleRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusGroupInPartitionRoleSymbolFields.PartitionRoleRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusGroupInPartitionRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusGroupInPartitionRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string GroupRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusGroupInPartitionRoleSymbolFields.GroupRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusGroupInPartitionRoleSymbolFields.GroupRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusInterfacePropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusInterfacePropertySymbol.cs new file mode 100644 index 00000000..2ed4ce18 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusInterfacePropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusInterfaceProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusInterfaceProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertySymbolFields.InterfaceRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusInterfacePropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusInterfacePropertySymbolFields | ||
| 27 | { | ||
| 28 | InterfaceRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusInterfacePropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusInterfacePropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusInterfaceProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusInterfacePropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusInterfaceProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusInterfacePropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string InterfaceRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusInterfacePropertySymbolFields.InterfaceRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusInterfacePropertySymbolFields.InterfaceRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusInterfacePropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusInterfacePropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusInterfacePropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusInterfacePropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusInterfaceSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusInterfaceSymbol.cs new file mode 100644 index 00000000..f875b424 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusInterfaceSymbol.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusInterface = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusInterface.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusInterfaceSymbolFields.ComPlusComponentRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusInterfaceSymbolFields.IID), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(ComPlusInterfaceSymbol)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.ComPlus.Symbols | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum ComPlusInterfaceSymbolFields | ||
| 26 | { | ||
| 27 | ComPlusComponentRef, | ||
| 28 | IID, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class ComPlusInterfaceSymbol : IntermediateSymbol | ||
| 32 | { | ||
| 33 | public ComPlusInterfaceSymbol() : base(ComPlusSymbolDefinitions.ComPlusInterface, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public ComPlusInterfaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusInterface, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[ComPlusInterfaceSymbolFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string ComPlusComponentRef | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)ComPlusInterfaceSymbolFields.ComPlusComponentRef].AsString(); | ||
| 46 | set => this.Set((int)ComPlusInterfaceSymbolFields.ComPlusComponentRef, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string IID | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)ComPlusInterfaceSymbolFields.IID].AsString(); | ||
| 52 | set => this.Set((int)ComPlusInterfaceSymbolFields.IID, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusMethodPropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodPropertySymbol.cs new file mode 100644 index 00000000..65b17ea4 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodPropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusMethodProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusMethodProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusMethodPropertySymbolFields.MethodRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusMethodPropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusMethodPropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusMethodPropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusMethodPropertySymbolFields | ||
| 27 | { | ||
| 28 | MethodRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusMethodPropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusMethodPropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusMethodProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusMethodPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusMethodProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusMethodPropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string MethodRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusMethodPropertySymbolFields.MethodRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusMethodPropertySymbolFields.MethodRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusMethodPropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusMethodPropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusMethodPropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusMethodPropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs new file mode 100644 index 00000000..9959a56f --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusMethodSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusMethod = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusMethod.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.InterfaceRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.Index), IntermediateFieldType.Number), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusMethodSymbolFields.Name), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusMethodSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusMethodSymbolFields | ||
| 27 | { | ||
| 28 | InterfaceRef, | ||
| 29 | Index, | ||
| 30 | Name, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusMethodSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusMethodSymbol() : base(ComPlusSymbolDefinitions.ComPlusMethod, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusMethodSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusMethod, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusMethodSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string InterfaceRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusMethodSymbolFields.InterfaceRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusMethodSymbolFields.InterfaceRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public int? Index | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusMethodSymbolFields.Index].AsNullableNumber(); | ||
| 54 | set => this.Set((int)ComPlusMethodSymbolFields.Index, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Name | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusMethodSymbolFields.Name].AsString(); | ||
| 60 | set => this.Set((int)ComPlusMethodSymbolFields.Name, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionPropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionPropertySymbol.cs new file mode 100644 index 00000000..e42feae2 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionPropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusPartitionProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusPartitionProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertySymbolFields.PartitionRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusPartitionPropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusPartitionPropertySymbolFields | ||
| 27 | { | ||
| 28 | PartitionRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusPartitionPropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusPartitionPropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusPartitionProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusPartitionPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusPartitionProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusPartitionPropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string PartitionRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusPartitionPropertySymbolFields.PartitionRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusPartitionPropertySymbolFields.PartitionRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusPartitionPropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusPartitionPropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusPartitionPropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusPartitionPropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionRoleSymbol.cs new file mode 100644 index 00000000..23293d93 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusPartitionRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusPartitionRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleSymbolFields.PartitionRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleSymbolFields.Name), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusPartitionRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusPartitionRoleSymbolFields | ||
| 27 | { | ||
| 28 | PartitionRef, | ||
| 29 | ComponentRef, | ||
| 30 | Name, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusPartitionRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusPartitionRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusPartitionRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusPartitionRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusPartitionRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusPartitionRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string PartitionRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusPartitionRoleSymbolFields.PartitionRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusPartitionRoleSymbolFields.PartitionRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusPartitionRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusPartitionRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Name | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusPartitionRoleSymbolFields.Name].AsString(); | ||
| 60 | set => this.Set((int)ComPlusPartitionRoleSymbolFields.Name, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionSymbol.cs new file mode 100644 index 00000000..c60fca40 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusPartition = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusPartition.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusPartitionSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusPartitionSymbolFields.PartitionId), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusPartitionSymbolFields.Name), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusPartitionSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusPartitionSymbolFields | ||
| 27 | { | ||
| 28 | ComponentRef, | ||
| 29 | PartitionId, | ||
| 30 | Name, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusPartitionSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusPartitionSymbol() : base(ComPlusSymbolDefinitions.ComPlusPartition, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusPartitionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusPartition, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusPartitionSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ComponentRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusPartitionSymbolFields.ComponentRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusPartitionSymbolFields.ComponentRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string PartitionId | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusPartitionSymbolFields.PartitionId].AsString(); | ||
| 54 | set => this.Set((int)ComPlusPartitionSymbolFields.PartitionId, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Name | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusPartitionSymbolFields.Name].AsString(); | ||
| 60 | set => this.Set((int)ComPlusPartitionSymbolFields.Name, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionUserSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionUserSymbol.cs new file mode 100644 index 00000000..c4d52f54 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusPartitionUserSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusPartitionUser = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusPartitionUser.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusPartitionUserSymbolFields.PartitionRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusPartitionUserSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusPartitionUserSymbolFields.UserRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusPartitionUserSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusPartitionUserSymbolFields | ||
| 27 | { | ||
| 28 | PartitionRef, | ||
| 29 | ComponentRef, | ||
| 30 | UserRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusPartitionUserSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusPartitionUserSymbol() : base(ComPlusSymbolDefinitions.ComPlusPartitionUser, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusPartitionUserSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusPartitionUser, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusPartitionUserSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string PartitionRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusPartitionUserSymbolFields.PartitionRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusPartitionUserSymbolFields.PartitionRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusPartitionUserSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusPartitionUserSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string UserRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusPartitionUserSymbolFields.UserRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusPartitionUserSymbolFields.UserRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForComponentSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForComponentSymbol.cs new file mode 100644 index 00000000..2d9968ee --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForComponentSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusRoleForComponent = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusRoleForComponent.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentSymbolFields.ComPlusComponentRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentSymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusRoleForComponentSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusRoleForComponentSymbolFields | ||
| 27 | { | ||
| 28 | ComPlusComponentRef, | ||
| 29 | ApplicationRoleRef, | ||
| 30 | ComponentRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusRoleForComponentSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusRoleForComponentSymbol() : base(ComPlusSymbolDefinitions.ComPlusRoleForComponent, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusRoleForComponentSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusRoleForComponent, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusRoleForComponentSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ComPlusComponentRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusRoleForComponentSymbolFields.ComPlusComponentRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusRoleForComponentSymbolFields.ComPlusComponentRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ApplicationRoleRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusRoleForComponentSymbolFields.ApplicationRoleRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusRoleForComponentSymbolFields.ApplicationRoleRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string ComponentRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusRoleForComponentSymbolFields.ComponentRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusRoleForComponentSymbolFields.ComponentRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForInterfaceSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForInterfaceSymbol.cs new file mode 100644 index 00000000..b77bd215 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForInterfaceSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusRoleForInterface = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusRoleForInterface.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceSymbolFields.InterfaceRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceSymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusRoleForInterfaceSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusRoleForInterfaceSymbolFields | ||
| 27 | { | ||
| 28 | InterfaceRef, | ||
| 29 | ApplicationRoleRef, | ||
| 30 | ComponentRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusRoleForInterfaceSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusRoleForInterfaceSymbol() : base(ComPlusSymbolDefinitions.ComPlusRoleForInterface, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusRoleForInterfaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusRoleForInterface, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusRoleForInterfaceSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string InterfaceRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusRoleForInterfaceSymbolFields.InterfaceRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusRoleForInterfaceSymbolFields.InterfaceRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ApplicationRoleRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusRoleForInterfaceSymbolFields.ApplicationRoleRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusRoleForInterfaceSymbolFields.ApplicationRoleRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string ComponentRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusRoleForInterfaceSymbolFields.ComponentRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusRoleForInterfaceSymbolFields.ComponentRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForMethodSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForMethodSymbol.cs new file mode 100644 index 00000000..9ba9d03b --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusRoleForMethodSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusRoleForMethod = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusRoleForMethod.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodSymbolFields.MethodRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodSymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusRoleForMethodSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusRoleForMethodSymbolFields | ||
| 27 | { | ||
| 28 | MethodRef, | ||
| 29 | ApplicationRoleRef, | ||
| 30 | ComponentRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusRoleForMethodSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusRoleForMethodSymbol() : base(ComPlusSymbolDefinitions.ComPlusRoleForMethod, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusRoleForMethodSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusRoleForMethod, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusRoleForMethodSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string MethodRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusRoleForMethodSymbolFields.MethodRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusRoleForMethodSymbolFields.MethodRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ApplicationRoleRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusRoleForMethodSymbolFields.ApplicationRoleRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusRoleForMethodSymbolFields.ApplicationRoleRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string ComponentRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusRoleForMethodSymbolFields.ComponentRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusRoleForMethodSymbolFields.ComponentRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionPropertySymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionPropertySymbol.cs new file mode 100644 index 00000000..af995c3d --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionPropertySymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusSubscriptionProperty = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusSubscriptionProperty.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertySymbolFields.SubscriptionRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertySymbolFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertySymbolFields.Value), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusSubscriptionPropertySymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusSubscriptionPropertySymbolFields | ||
| 27 | { | ||
| 28 | SubscriptionRef, | ||
| 29 | Name, | ||
| 30 | Value, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusSubscriptionPropertySymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusSubscriptionPropertySymbol() : base(ComPlusSymbolDefinitions.ComPlusSubscriptionProperty, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusSubscriptionPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusSubscriptionProperty, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusSubscriptionPropertySymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string SubscriptionRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusSubscriptionPropertySymbolFields.SubscriptionRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusSubscriptionPropertySymbolFields.SubscriptionRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string Name | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusSubscriptionPropertySymbolFields.Name].AsString(); | ||
| 54 | set => this.Set((int)ComPlusSubscriptionPropertySymbolFields.Name, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Value | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusSubscriptionPropertySymbolFields.Value].AsString(); | ||
| 60 | set => this.Set((int)ComPlusSubscriptionPropertySymbolFields.Value, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionSymbol.cs new file mode 100644 index 00000000..24d3f92e --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusSubscriptionSymbol.cs | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusSubscription = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusSubscription.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.Subscription), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.ComPlusComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.SubscriptionId), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.Name), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.EventCLSID), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(ComPlusSubscriptionSymbolFields.PublisherID), IntermediateFieldType.String), | ||
| 21 | }, | ||
| 22 | typeof(ComPlusSubscriptionSymbol)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | namespace WixToolset.ComPlus.Symbols | ||
| 27 | { | ||
| 28 | using WixToolset.Data; | ||
| 29 | |||
| 30 | public enum ComPlusSubscriptionSymbolFields | ||
| 31 | { | ||
| 32 | Subscription, | ||
| 33 | ComPlusComponentRef, | ||
| 34 | ComponentRef, | ||
| 35 | SubscriptionId, | ||
| 36 | Name, | ||
| 37 | EventCLSID, | ||
| 38 | PublisherID, | ||
| 39 | } | ||
| 40 | |||
| 41 | public class ComPlusSubscriptionSymbol : IntermediateSymbol | ||
| 42 | { | ||
| 43 | public ComPlusSubscriptionSymbol() : base(ComPlusSymbolDefinitions.ComPlusSubscription, null, null) | ||
| 44 | { | ||
| 45 | } | ||
| 46 | |||
| 47 | public ComPlusSubscriptionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusSubscription, sourceLineNumber, id) | ||
| 48 | { | ||
| 49 | } | ||
| 50 | |||
| 51 | public IntermediateField this[ComPlusSubscriptionSymbolFields index] => this.Fields[(int)index]; | ||
| 52 | |||
| 53 | public string Subscription | ||
| 54 | { | ||
| 55 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.Subscription].AsString(); | ||
| 56 | set => this.Set((int)ComPlusSubscriptionSymbolFields.Subscription, value); | ||
| 57 | } | ||
| 58 | |||
| 59 | public string ComPlusComponentRef | ||
| 60 | { | ||
| 61 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.ComPlusComponentRef].AsString(); | ||
| 62 | set => this.Set((int)ComPlusSubscriptionSymbolFields.ComPlusComponentRef, value); | ||
| 63 | } | ||
| 64 | |||
| 65 | public string ComponentRef | ||
| 66 | { | ||
| 67 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.ComponentRef].AsString(); | ||
| 68 | set => this.Set((int)ComPlusSubscriptionSymbolFields.ComponentRef, value); | ||
| 69 | } | ||
| 70 | |||
| 71 | public string SubscriptionId | ||
| 72 | { | ||
| 73 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.SubscriptionId].AsString(); | ||
| 74 | set => this.Set((int)ComPlusSubscriptionSymbolFields.SubscriptionId, value); | ||
| 75 | } | ||
| 76 | |||
| 77 | public string Name | ||
| 78 | { | ||
| 79 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.Name].AsString(); | ||
| 80 | set => this.Set((int)ComPlusSubscriptionSymbolFields.Name, value); | ||
| 81 | } | ||
| 82 | |||
| 83 | public string EventCLSID | ||
| 84 | { | ||
| 85 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.EventCLSID].AsString(); | ||
| 86 | set => this.Set((int)ComPlusSubscriptionSymbolFields.EventCLSID, value); | ||
| 87 | } | ||
| 88 | |||
| 89 | public string PublisherID | ||
| 90 | { | ||
| 91 | get => this.Fields[(int)ComPlusSubscriptionSymbolFields.PublisherID].AsString(); | ||
| 92 | set => this.Set((int)ComPlusSubscriptionSymbolFields.PublisherID, value); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusSymbolDefinitions.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusSymbolDefinitions.cs new file mode 100644 index 00000000..407b9c14 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusSymbolDefinitions.cs | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | public enum ComPlusSymbolDefinitionType | ||
| 9 | { | ||
| 10 | ComPlusApplication, | ||
| 11 | ComPlusApplicationProperty, | ||
| 12 | ComPlusApplicationRole, | ||
| 13 | ComPlusApplicationRoleProperty, | ||
| 14 | ComPlusAssembly, | ||
| 15 | ComPlusAssemblyDependency, | ||
| 16 | ComPlusComponent, | ||
| 17 | ComPlusComponentProperty, | ||
| 18 | ComPlusGroupInApplicationRole, | ||
| 19 | ComPlusGroupInPartitionRole, | ||
| 20 | ComPlusInterface, | ||
| 21 | ComPlusInterfaceProperty, | ||
| 22 | ComPlusMethod, | ||
| 23 | ComPlusMethodProperty, | ||
| 24 | ComPlusPartition, | ||
| 25 | ComPlusPartitionProperty, | ||
| 26 | ComPlusPartitionRole, | ||
| 27 | ComPlusPartitionUser, | ||
| 28 | ComPlusRoleForComponent, | ||
| 29 | ComPlusRoleForInterface, | ||
| 30 | ComPlusRoleForMethod, | ||
| 31 | ComPlusSubscription, | ||
| 32 | ComPlusSubscriptionProperty, | ||
| 33 | ComPlusUserInApplicationRole, | ||
| 34 | ComPlusUserInPartitionRole, | ||
| 35 | } | ||
| 36 | |||
| 37 | public static partial class ComPlusSymbolDefinitions | ||
| 38 | { | ||
| 39 | public static readonly Version Version = new Version("4.0.0"); | ||
| 40 | |||
| 41 | public static IntermediateSymbolDefinition ByName(string name) | ||
| 42 | { | ||
| 43 | if (!Enum.TryParse(name, out ComPlusSymbolDefinitionType type)) | ||
| 44 | { | ||
| 45 | return null; | ||
| 46 | } | ||
| 47 | |||
| 48 | return ByType(type); | ||
| 49 | } | ||
| 50 | |||
| 51 | public static IntermediateSymbolDefinition ByType(ComPlusSymbolDefinitionType type) | ||
| 52 | { | ||
| 53 | switch (type) | ||
| 54 | { | ||
| 55 | case ComPlusSymbolDefinitionType.ComPlusApplication: | ||
| 56 | return ComPlusSymbolDefinitions.ComPlusApplication; | ||
| 57 | |||
| 58 | case ComPlusSymbolDefinitionType.ComPlusApplicationProperty: | ||
| 59 | return ComPlusSymbolDefinitions.ComPlusApplicationProperty; | ||
| 60 | |||
| 61 | case ComPlusSymbolDefinitionType.ComPlusApplicationRole: | ||
| 62 | return ComPlusSymbolDefinitions.ComPlusApplicationRole; | ||
| 63 | |||
| 64 | case ComPlusSymbolDefinitionType.ComPlusApplicationRoleProperty: | ||
| 65 | return ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty; | ||
| 66 | |||
| 67 | case ComPlusSymbolDefinitionType.ComPlusAssembly: | ||
| 68 | return ComPlusSymbolDefinitions.ComPlusAssembly; | ||
| 69 | |||
| 70 | case ComPlusSymbolDefinitionType.ComPlusAssemblyDependency: | ||
| 71 | return ComPlusSymbolDefinitions.ComPlusAssemblyDependency; | ||
| 72 | |||
| 73 | case ComPlusSymbolDefinitionType.ComPlusComponent: | ||
| 74 | return ComPlusSymbolDefinitions.ComPlusComponent; | ||
| 75 | |||
| 76 | case ComPlusSymbolDefinitionType.ComPlusComponentProperty: | ||
| 77 | return ComPlusSymbolDefinitions.ComPlusComponentProperty; | ||
| 78 | |||
| 79 | case ComPlusSymbolDefinitionType.ComPlusGroupInApplicationRole: | ||
| 80 | return ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole; | ||
| 81 | |||
| 82 | case ComPlusSymbolDefinitionType.ComPlusGroupInPartitionRole: | ||
| 83 | return ComPlusSymbolDefinitions.ComPlusGroupInPartitionRole; | ||
| 84 | |||
| 85 | case ComPlusSymbolDefinitionType.ComPlusInterface: | ||
| 86 | return ComPlusSymbolDefinitions.ComPlusInterface; | ||
| 87 | |||
| 88 | case ComPlusSymbolDefinitionType.ComPlusInterfaceProperty: | ||
| 89 | return ComPlusSymbolDefinitions.ComPlusInterfaceProperty; | ||
| 90 | |||
| 91 | case ComPlusSymbolDefinitionType.ComPlusMethod: | ||
| 92 | return ComPlusSymbolDefinitions.ComPlusMethod; | ||
| 93 | |||
| 94 | case ComPlusSymbolDefinitionType.ComPlusMethodProperty: | ||
| 95 | return ComPlusSymbolDefinitions.ComPlusMethodProperty; | ||
| 96 | |||
| 97 | case ComPlusSymbolDefinitionType.ComPlusPartition: | ||
| 98 | return ComPlusSymbolDefinitions.ComPlusPartition; | ||
| 99 | |||
| 100 | case ComPlusSymbolDefinitionType.ComPlusPartitionProperty: | ||
| 101 | return ComPlusSymbolDefinitions.ComPlusPartitionProperty; | ||
| 102 | |||
| 103 | case ComPlusSymbolDefinitionType.ComPlusPartitionRole: | ||
| 104 | return ComPlusSymbolDefinitions.ComPlusPartitionRole; | ||
| 105 | |||
| 106 | case ComPlusSymbolDefinitionType.ComPlusPartitionUser: | ||
| 107 | return ComPlusSymbolDefinitions.ComPlusPartitionUser; | ||
| 108 | |||
| 109 | case ComPlusSymbolDefinitionType.ComPlusRoleForComponent: | ||
| 110 | return ComPlusSymbolDefinitions.ComPlusRoleForComponent; | ||
| 111 | |||
| 112 | case ComPlusSymbolDefinitionType.ComPlusRoleForInterface: | ||
| 113 | return ComPlusSymbolDefinitions.ComPlusRoleForInterface; | ||
| 114 | |||
| 115 | case ComPlusSymbolDefinitionType.ComPlusRoleForMethod: | ||
| 116 | return ComPlusSymbolDefinitions.ComPlusRoleForMethod; | ||
| 117 | |||
| 118 | case ComPlusSymbolDefinitionType.ComPlusSubscription: | ||
| 119 | return ComPlusSymbolDefinitions.ComPlusSubscription; | ||
| 120 | |||
| 121 | case ComPlusSymbolDefinitionType.ComPlusSubscriptionProperty: | ||
| 122 | return ComPlusSymbolDefinitions.ComPlusSubscriptionProperty; | ||
| 123 | |||
| 124 | case ComPlusSymbolDefinitionType.ComPlusUserInApplicationRole: | ||
| 125 | return ComPlusSymbolDefinitions.ComPlusUserInApplicationRole; | ||
| 126 | |||
| 127 | case ComPlusSymbolDefinitionType.ComPlusUserInPartitionRole: | ||
| 128 | return ComPlusSymbolDefinitions.ComPlusUserInPartitionRole; | ||
| 129 | |||
| 130 | default: | ||
| 131 | throw new ArgumentOutOfRangeException(nameof(type)); | ||
| 132 | } | ||
| 133 | } | ||
| 134 | } | ||
| 135 | } | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusUserInApplicationRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusUserInApplicationRoleSymbol.cs new file mode 100644 index 00000000..1f2e01b2 --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusUserInApplicationRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusUserInApplicationRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusUserInApplicationRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleSymbolFields.ApplicationRoleRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleSymbolFields.UserRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusUserInApplicationRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusUserInApplicationRoleSymbolFields | ||
| 27 | { | ||
| 28 | ApplicationRoleRef, | ||
| 29 | ComponentRef, | ||
| 30 | UserRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusUserInApplicationRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusUserInApplicationRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusUserInApplicationRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusUserInApplicationRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusUserInApplicationRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusUserInApplicationRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string ApplicationRoleRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusUserInApplicationRoleSymbolFields.ApplicationRoleRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusUserInApplicationRoleSymbolFields.ApplicationRoleRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusUserInApplicationRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusUserInApplicationRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string UserRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusUserInApplicationRoleSymbolFields.UserRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusUserInApplicationRoleSymbolFields.UserRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/Symbols/ComPlusUserInPartitionRoleSymbol.cs b/src/ext/ComPlus/wixext/Symbols/ComPlusUserInPartitionRoleSymbol.cs new file mode 100644 index 00000000..10df94bf --- /dev/null +++ b/src/ext/ComPlus/wixext/Symbols/ComPlusUserInPartitionRoleSymbol.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.ComPlus | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.ComPlus.Symbols; | ||
| 7 | |||
| 8 | public static partial class ComPlusSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition ComPlusUserInPartitionRole = new IntermediateSymbolDefinition( | ||
| 11 | ComPlusSymbolDefinitionType.ComPlusUserInPartitionRole.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleSymbolFields.PartitionRoleRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleSymbolFields.UserRef), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(ComPlusUserInPartitionRoleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.ComPlus.Symbols | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum ComPlusUserInPartitionRoleSymbolFields | ||
| 27 | { | ||
| 28 | PartitionRoleRef, | ||
| 29 | ComponentRef, | ||
| 30 | UserRef, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class ComPlusUserInPartitionRoleSymbol : IntermediateSymbol | ||
| 34 | { | ||
| 35 | public ComPlusUserInPartitionRoleSymbol() : base(ComPlusSymbolDefinitions.ComPlusUserInPartitionRole, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public ComPlusUserInPartitionRoleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusSymbolDefinitions.ComPlusUserInPartitionRole, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[ComPlusUserInPartitionRoleSymbolFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string PartitionRoleRef | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)ComPlusUserInPartitionRoleSymbolFields.PartitionRoleRef].AsString(); | ||
| 48 | set => this.Set((int)ComPlusUserInPartitionRoleSymbolFields.PartitionRoleRef, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string ComponentRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)ComPlusUserInPartitionRoleSymbolFields.ComponentRef].AsString(); | ||
| 54 | set => this.Set((int)ComPlusUserInPartitionRoleSymbolFields.ComponentRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string UserRef | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)ComPlusUserInPartitionRoleSymbolFields.UserRef].AsString(); | ||
| 60 | set => this.Set((int)ComPlusUserInPartitionRoleSymbolFields.UserRef, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.csproj b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.csproj new file mode 100644 index 00000000..11271ad3 --- /dev/null +++ b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.csproj | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- 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. --> | ||
| 3 | |||
| 4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
| 5 | <PropertyGroup> | ||
| 6 | <TargetFramework>netstandard2.0</TargetFramework> | ||
| 7 | <DebugType>embedded</DebugType> | ||
| 8 | <RootNamespace>WixToolset.ComPlus</RootNamespace> | ||
| 9 | <Description>WiX Toolset ComPlus Extension</Description> | ||
| 10 | <Title>WiX Toolset ComPlus Extension</Title> | ||
| 11 | <IsTool>true</IsTool> | ||
| 12 | <IncludeSymbols>true</IncludeSymbols> | ||
| 13 | </PropertyGroup> | ||
| 14 | |||
| 15 | <ItemGroup> | ||
| 16 | <EmbeddedResource Include="$(OutputPath)..\complus.wixlib" /> | ||
| 17 | </ItemGroup> | ||
| 18 | |||
| 19 | <ItemGroup> | ||
| 20 | <ProjectReference Include="..\wixlib\complus.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " /> | ||
| 21 | </ItemGroup> | ||
| 22 | |||
| 23 | <ItemGroup> | ||
| 24 | <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" /> | ||
| 25 | <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" /> | ||
| 26 | </ItemGroup> | ||
| 27 | |||
| 28 | <ItemGroup> | ||
| 29 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" /> | ||
| 30 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> | ||
| 31 | </ItemGroup> | ||
| 32 | </Project> | ||
diff --git a/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.nuspec b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.nuspec new file mode 100644 index 00000000..3197250b --- /dev/null +++ b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.nuspec | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <?xml version="1.0"?> | ||
| 2 | <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
| 3 | <metadata minClientVersion="4.0"> | ||
| 4 | <id>$id$</id> | ||
| 5 | <version>$version$</version> | ||
| 6 | <title>$title$</title> | ||
| 7 | <description>$description$</description> | ||
| 8 | <authors>$authors$</authors> | ||
| 9 | <license type="expression">MS-RL</license> | ||
| 10 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
| 11 | <copyright>$copyright$</copyright> | ||
| 12 | <projectUrl>$projectUrl$</projectUrl> | ||
| 13 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | ||
| 14 | </metadata> | ||
| 15 | |||
| 16 | <files> | ||
| 17 | <file src="$projectFolder$$id$.targets" target="build" /> | ||
| 18 | |||
| 19 | <file src="netstandard2.0\$id$.dll" target="tools" /> | ||
| 20 | |||
| 21 | <file src="x86\*.pdb" target="pdbs\x86" /> | ||
| 22 | <file src="x64\*.pdb" target="pdbs\x64" /> | ||
| 23 | </files> | ||
| 24 | </package> | ||
diff --git a/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.targets b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.targets new file mode 100644 index 00000000..8115b715 --- /dev/null +++ b/src/ext/ComPlus/wixext/WixToolset.ComPlus.wixext.targets | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- 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. --> | ||
| 3 | |||
| 4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
| 5 | <PropertyGroup> | ||
| 6 | <WixToolsetComPlusWixextPath Condition=" '$(WixToolsetComPlusWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.ComPlus.wixext.dll</WixToolsetComPlusWixextPath> | ||
| 7 | </PropertyGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <WixExtension Include="$(WixToolsetComPlusWixextPath)" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> | ||
