/// <summary> /// <para>From DMTF Spec:</para>This operation is used to enumerate instances of a CIM Class (this includes instances in the class and any subclasses in accordance with the polymorphic nature of CIM objects) in the target Namespace. /// </summary> /// <param name="defaultNamespace"></param> /// <returns>The CimXml request as a string.</returns> public static void EnumerateInstances(CimXmlWriter cxw, EnumerateInstancesOpSettings settings, CimName defaultNamespace) { #region Actual XML Request /* <IMETHODCALL NAME="EnumerateInstances"> <LOCALNAMESPACEPATH> <NAMESPACE NAME="smash"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="IncludeClassOrigin"> <VALUE>TRUE</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="IncludeQualifiers"> <VALUE>TRUE</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="PropertyList"> <VALUE.ARRAY> <VALUE>Caption</VALUE> <VALUE>InstanceID</VALUE> <VALUE>ElementName</VALUE> </VALUE.ARRAY> </IPARAMVALUE> <IPARAMVALUE NAME="LocalOnly"> <VALUE>FALSE</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="ClassName"> <CLASSNAME NAME="CIM_Component"/> </IPARAMVALUE> <IPARAMVALUE NAME="DeepInheritance"> <VALUE>TRUE</VALUE> </IPARAMVALUE> </IMETHODCALL> */ #endregion // Set the Method Name cxw.WriteIMethodCallStartElement("EnumerateInstances"); // Set the namespace cxw.WriteCimNamespace(defaultNamespace); // Set the OpSettings cxw.WriteIncludeClassOrigin(settings.IncludeClassOrigin); cxw.WriteClassNameParam(settings.ClassName); cxw.WriteIncludeQualifiers(settings.IncludeQualifiers); cxw.WriteDeepInheritance(settings.DeepInheritance); cxw.WriteLocalOnly(settings.LocalOnly); cxw.WritePropertyList(settings.PropertyList); //</IMETHODCALL> cxw.WriteEndElement(); }
/// <summary> /// <para>From DMTF Spec:</para>This operation is used to enumerate the names of subclasses of a CIM Class in the target Namespace. /// </summary> /// <param name="defaultNamespace"></param> /// <returns>The CimXml request as a string.</returns> public static void EnumerateClassNames(CimXmlWriter cxw, EnumerateClassNamesOpSettings settings, CimName defaultNamespace) { #region Actual XML Request /* <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="1001" PROTOCOLVERSION="1.0"> <SIMPLEREQ> <IMETHODCALL NAME="EnumerateClassNames"> <LOCALNAMESPACEPATH> <NAMESPACE NAME="smash"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="ClassName"> <CLASSNAME NAME="CIM_Component"/> </IPARAMVALUE> <IPARAMVALUE NAME="DeepInheritance"> <VALUE>TRUE</VALUE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> */ #endregion // Set the Method Name cxw.WriteIMethodCallStartElement("EnumerateClassNames"); // Set the namespace cxw.WriteCimNamespace(defaultNamespace); // Set the OpSettings if (settings.ClassName.IsSet) { cxw.WriteClassNameParam(settings.ClassName); } cxw.WriteDeepInheritance(settings.DeepInheritance); //</IMETHODCALL> cxw.WriteEndElement(); }