PropertySources Qualifier
Every property in a view class must have a string array qualifier called PropertySources. The PropertySources qualifier contains the name of the source class property or properties from which this view class property gets data. The order of the values in this array correspond to the order of the source classes defined for the ViewSources qualifier. The following example shows how to define a property for a union view class that is the union of the Win32_LogicalDisk class from two different computers:
[PropertySources{"DeviceID", "DeviceID"},key] String Devname;
The first DeviceID property corresponds to the DeviceID property from the class in the first source query. The second DeviceID property is the DeviceID property from the class in the second source query.
When defining properties for join view classes, you must define a separate view property for each of the source class properties unless the source class properties are the basis of the join view class. The following example creates properties in a join view class on similar properties from the Win32_Printer source class and the Win32_PrinterConfiguration source class:
[PropertySources{"VerticalResolution", ""}] Uint32 Vres;
[PropertySources{"", "YResolution"}] Uint32 Yres;
If the two source classes are being joined by a common property, you can only define a single view class property because the value of both source class properties is always the same. The following example shows how to join the Win32_Printer class and the Win32_PrinterConfiguration by a common property value:
[PropertySources{"DeviceId", "DeviceName "}] String Name;
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |