public EnumerateClassNamesOpSettings(CimName className)
        {
            ReqType = RequestType.EnumerateClassNames;

            ClassName = className;
            DeepInheritance = false;
        }
        public InvokeMethodOpSettings(ICimObjectName objectName, CimName methodName, CimParameterValueList parameterList)
        {
            ReqType = RequestType.InvokeMethod;

            ObjectName = objectName;
            MethodName = methodName;
            ParameterList = parameterList;
        }
        public GetClassOpSettings(CimName className)
        {
            ReqType = RequestType.GetClass;

            ClassName = className;
            LocalOnly = true;
            IncludeQualifiers = true;
            IncludeClassOrigin = true;
            PropertyList = null;
        }
        public EnumerateInstancesOpSettings(CimName className)
        {
            ReqType = RequestType.EnumerateInstances;

            ClassName = className;
            DeepInheritance = true;
            LocalOnly = true;
            IncludeQualifiers = false;
            IncludeClassOrigin = false;
            PropertyList = null;
        }
Exemple #5
0
 public CimInstanceList EnumerateInstances(CimName className)
 {
     return EnumerateInstances(new EnumerateInstancesOpSettings(className));
 }
 /// <summary>
 /// Creates a new CimPropertyReference with the given name
 /// </summary>
 /// <param name="name"></param>
 public CimPropertyReference(CimName name)
     : base(name, CimType.REFERENCE)
 {
 }
 public AssociatorNamesWithClassNameOpSettings(CimName className)
     : base()
 {
     ClassName = className;
 }
        public static List<ListViewItem> ToList(CimPropertyList list, CimName className, 
                                                bool AllowEditProperties, bool AllowEditKeyProperties)
        {
            System.Drawing.Color localColor = System.Drawing.Color.MediumSlateBlue;

            List<ListViewItem> newList = new List<ListViewItem>();
            foreach (CimProperty property in list)
            {
                ListViewItem item;

                string classOrigin = property.ClassOrigin.ToString();

                if (property.IsKeyProperty)
                    item = new ListViewItem(new string[] { property.Name.ToString(), "Key Property", property.Value, classOrigin }, (int)ImageUtils.ImageIndex.KeyProperty);
                else
                    item = new ListViewItem(new string[] { property.Name.ToString(), "Property", property.Value, classOrigin }, (int)ImageUtils.ImageIndex.Property);

                if ((className != null) && (className == property.ClassOrigin))
                {
                    // It's a local property
                    item.SubItems[3].Text = "( Local )";
                    item.ForeColor = localColor;
                }

                newList.Add(item);
            }
            return newList;
        }
        public static List<ListViewItem> ToList(CimMethodList list, CimName className)
        {
            System.Drawing.Color localColor = System.Drawing.Color.MediumSlateBlue;

            List<ListViewItem> newList = new List<ListViewItem>();
            foreach (CimMethod method in list)
            {
                ListViewItem item = new ListViewItem(new string[] { method.Name.ToString(), "Method", "", method.ClassOrigin.ToString() }, (int)ImageUtils.ImageIndex.Method);

                if ((className != null) && (className == method.ClassOrigin))
                {
                    // It's a local property
                    item.SubItems[3].Text = "( Local )";
                    item.ForeColor = localColor;
                }

                newList.Add(item);
            }
            return newList;
        }
 public AssociatorsWithClassNameOpSettings(CimName className)
 {
     ClassName = className;
 }
 /// <summary>
 /// Creates a new CimPropertyArray with the given name and type
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 public CimPropertyArray(CimName name, CimType type)
     : base(name, type)
 {
 }
Exemple #12
0
 public CimMethod(CimName name)
 {
     Name = name;
 }
 //public CimQualifierDeclaration(CimType type)
 //{
 //    _type = type;
 //}
 public CimQualifierDeclaration(CimType type, CimName name)
 {
     _type = type;
     Name = name;
 }
Exemple #14
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="className"></param>
 /// <returns></returns>
 public CimClass GetClass(CimName className)
 {
     return GetClass(new GetClassOpSettings(className));
 }
Exemple #15
0
        /// <summary>
        /// Gets the base class of the class
        /// </summary>
        /// <param name="className"></param>
        /// <returns>Returns the name of the class</returns>
        public CimName GetBaseKeyClassName(CimName className)
        {
            GetClassOpSettings gcop = new GetClassOpSettings(className);
            gcop.LocalOnly = false;

            CimClass curClass = this.GetClass(gcop);

            CimClass startClass = curClass;
            CimName lastClassName = null;   // default value if className doesn't have a BKC

            while (curClass.HasKeyProperty == true)
            {
                lastClassName = curClass.ClassName;

                if (curClass.SuperClass != string.Empty)
                {
                    gcop.ClassName = curClass.SuperClass;

                    curClass = this.GetClass(gcop);
                }
                else
                    break;
            }

            return lastClassName;
        }
        //public ReferenceNamesWithClassNameOpSettings(ICimObjectName objectName)
        public ReferenceNamesWithClassNameOpSettings(CimName className)
        {
            //ReqType = RequestType.ReferenceNames;

            ClassName = className;
            //ResultClass = null;
            //Role = null;
        }
 /// <summary>
 /// Creates a CimClassNamePath with a class name
 /// </summary>
 /// <param name="className"></param>
 public CimClassNamePath(CimName className)
 {
     ClassName = className;
 }
Exemple #18
0
 public CimMethod(CimName name, CimType type)
     : this(name)
 {
     Type = type;
 }
 public EnumerateClassesOpSettings(CimName className)
     : this()
 {
     ClassName = className;
 }
        public EnumerateInstanceNamesOpSettings(CimName className)
        {
            ReqType = RequestType.EnumerateInstanceNames;

            ClassName = className;
        }
Exemple #21
0
 public CimTreeNode(CimName name)
 {
     Name = name;
 }
Exemple #22
0
 /// <summary>
 /// Creates a new property with the given name and type
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 public CimProperty(CimName name, CimType type)
 {
     Name = name;
     Type = type;
 }
Exemple #23
0
 public static List<ListViewItem> ToList(CimPropertyList list, CimName className)
 {
     return ToList(list, className, false, false);
 }
Exemple #24
0
 public CimProperty(CimName name, CimType type,string value)
 {
     Name = name;
     Type = type;
     Value = value;
 }
Exemple #25
0
        private void ctxCreateDerivedClass_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("The 'Create Derived Class' wizard is not implemented yet");
            CimName baseClassName = new CimName(treeView1.SelectedNode.Text);
            string className = "newClass";
            CimClass newClass = new CimClass(className, baseClassName);
            mainWbemClient.CreateClass(newClass);

            RefreshTree(className);
        }
Exemple #26
0
        private void cxtDeleteClass_Click(object sender, EventArgs e)
        {
            TreeNode parent = treeView1.SelectedNode.Parent;
            CimName className = new CimName(treeView1.SelectedNode.Text);
            mainWbemClient.DeleteClass(className);

            RefreshTree(parent.Text);
        }
 public ReferencesWithClassNameOpSettings(CimName className)
 {
     ClassName = className;
 }
Exemple #28
0
        private string FindBaseKeyClass(CimName className)
        {
            // Once we have a cache in WbemClient for the GetBaseKeyClassName call, we should be able
            // to get rid of this method all together and just start using the call directly
            // IE this method is here to provide a cheap and easy cache while we don't have one in the DLL

            // Check to see if I've found this base key class before.
            if (baseKeyClassMap.ContainsKey(className))
            {
                return baseKeyClassMap[className].ToString();
            }

            CimName baseKeyClassName = mainWbemClient.GetBaseKeyClassName(className);

            if (baseKeyClassName == null)
                return string.Empty;

            baseKeyClassMap.Add(className, baseKeyClassName);
            return baseKeyClassName.ToString();
        }
Exemple #29
0
 /// <summary>
 /// Creates a new CIMParameter with the given name and type
 /// </summary>
 /// <param name="type"></param>
 /// <param name="name"></param>
 public CimParameter(CimType type, CimName name)
 {
     _type = type;
     _name = name;
 }
Exemple #30
0
 public void EnumerateInstances(CimName className, CimDataTypeHandler callBack)
 {
     EnumerateInstances(new EnumerateInstancesOpSettings(className), callBack);
 }