Exemplo n.º 1
0
        /// <summary>
        /// Creates a list of ListViewItems (Excluding a 'description' qualifier
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static List<ListViewItem> ToList(CimQualifierList list)
        {
            List<ListViewItem> newList = new List<ListViewItem>();

            foreach (CimQualifier qual in list)
            {
                if (qual.Name != "description")
                {
                    newList.Add(ToList(qual));
                }
            }
            return newList;
        }
Exemplo n.º 2
0
        public static TreeNode CimToNode(CimQualifierList list)
        {
            TreeNode root = new TreeNode("Qualifiers");
            foreach (CimQualifier qual in list)
            {
                root.Nodes.Add(CimToNode(qual));

            }
            return root;
        }
Exemplo n.º 3
0
        public void WriteCimQualifierList(CimQualifierList qualifierList)
        {
            #region Actual XML Request
            /*
            [...]
            <QUALIFIER NAME="Deprecated" TYPE="string" TOSUBCLASS="false" >
                <VALUE.ARRAY>
                    <VALUE>CIM_FileShare</VALUE>
                </VALUE.ARRAY>
            </QUALIFIER>
            <QUALIFIER NAME="Version" TYPE="string" TOSUBCLASS="false" TRANSLATABLE="true" >
                <VALUE>2.6.0</VALUE>
            </QUALIFIER>
            [...]
            */
            #endregion
            if (qualifierList == null)
                return;

            //Changing to for loop for MONO
            for (int i = 0; i < qualifierList.Count; ++i)
            {
                WriteCimQualifier(qualifierList[i]);
            }
        }