Sunday, July 3, 2016

Policy Plus - Object-orient all the things

Today I filled out the rest of Policy Plus's AdmxBundle.BuildStructures method. It now compiles all the raw ADMX structures into object-oriented classes with hierarchies and relationships. That includes categories, products, policies, and supported-on definitions.

While testing it, I discovered that a Windows ADMX file - PreviousVersions.admx - tries to reference a product from an ADMX file it hasn't imported, so I had to add some handling of that case to the ResolveRef function. If the source ADMX doesn't import a namespace it references, Policy Plus doesn't bother expanding the ref, which will probably always cause the target to not be found, so the supported-on entry that tried to refer to it will just not be added to the support definition.

Other than that, it worked perfectly. I can use Visual Studio's object inspector to look through the ADMX bundle to see the tree of categories and policies.


No comments:

Post a Comment