diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index cc4f0e43b9b9..dc82cc9785c0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -59,7 +59,7 @@ repos:
- id: mixed-line-ending
exclude: \.(cs|xml)$
- id: trailing-whitespace
- files: \.(bat|css|gitignore|header|in|install|java|md|properties|py|rb|sh|sql|txt|vue|xml|xsl|yaml|yml)$
+ files: \.(cs|bat|css|gitignore|header|in|install|java|md|properties|py|rb|sh|sql|txt|vue|xml|xsl|yaml|yml)$
args: [--markdown-linebreak-ext=md]
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
- repo: https://github.com/codespell-project/codespell
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.Designer.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.Designer.cs
index 4bf424fa4b93..4b4d8bd121c1 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.Designer.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.Designer.cs
@@ -18,7 +18,7 @@ namespace CloudStack.Plugin.AgentShell
{
partial class AgentService
{
- ///
+ ///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
@@ -38,8 +38,8 @@ protected override void Dispose(bool disposing)
#region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
+ ///
+ /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.cs
index 94b640edd1b6..e2fecd52e47e 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentService.cs
@@ -67,7 +67,7 @@ public AgentService()
public static void ConfigServerResource()
{
// For simplicity, ServerResource config and settings file are tightly coupled.
- // An alternative is to pass a dictionary to the server resource and let it find
+ // An alternative is to pass a dictionary to the server resource and let it find
// required settings. In contrast, the approach below is strongly typed and makes
// use of VisualStudio settings designer. The designer allows us to avoid
// accessing config using their key strings.
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentSettings.Designer.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentSettings.Designer.cs
index fc3b69af3e8f..5e89a18fb2de 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentSettings.Designer.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/AgentSettings.Designer.cs
@@ -16,20 +16,20 @@
// under the License.
namespace CloudStack.Plugin.AgentShell {
-
-
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
public sealed partial class AgentSettings : global::System.Configuration.ApplicationSettingsBase {
-
+
private static AgentSettings defaultInstance = ((AgentSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new AgentSettings())));
-
+
public static AgentSettings Default {
get {
return defaultInstance;
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("8")]
@@ -38,7 +38,7 @@ public int cpus {
return ((int)(this["cpus"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Routing")]
@@ -47,7 +47,7 @@ public string type {
return ((string)(this["type"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5fe2bad3-d785-394e-9949-89786b8a63d2")]
@@ -56,7 +56,7 @@ public string type {
return ((global::System.Guid)(this["local_storage_uuid"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("hvm")]
@@ -65,7 +65,7 @@ public string capabilities {
return ((string)(this["capabilities"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2130")]
@@ -74,7 +74,7 @@ public int Settingcpuspeed {
return ((int)(this["Settingcpuspeed"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("8250")]
@@ -83,7 +83,7 @@ public int port {
return ((int)(this["port"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("34359738368")]
@@ -92,7 +92,7 @@ public long memory {
return ((long)(this["memory"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("camldonall01.citrite.net")]
@@ -101,7 +101,7 @@ public string host {
return ((string)(this["host"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
@@ -110,7 +110,7 @@ public int pod {
return ((int)(this["pod"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10.1.1.1")]
@@ -119,7 +119,7 @@ public string gateway_ip_address {
return ((string)(this["gateway_ip_address"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Guid guid {
@@ -127,7 +127,7 @@ public string gateway_ip_address {
return ((global::System.Guid)(this["guid"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2")]
@@ -136,7 +136,7 @@ public int cluster {
return ((int)(this["cluster"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
@@ -145,7 +145,7 @@ public int zone {
return ((int)(this["zone"]));
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("c:\\Secondary")]
@@ -157,7 +157,7 @@ public string local_secondary_storage_path {
this["local_secondary_storage_path"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("E:\\Disks\\Disks")]
@@ -169,7 +169,7 @@ public string local_storage_path {
this["local_storage_path"] = value;
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5")]
@@ -178,7 +178,7 @@ public int workers {
return ((int)(this["workers"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("255.255.240.0")]
@@ -187,7 +187,7 @@ public string private_ip_netmask {
return ((string)(this["private_ip_netmask"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("4294967296")]
@@ -196,7 +196,7 @@ public long RootDeviceReservedSpaceBytes {
return ((long)(this["RootDeviceReservedSpaceBytes"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("../../../../../")]
@@ -205,7 +205,7 @@ public string hyperv_plugin_root {
return ((string)(this["hyperv_plugin_root"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("e:\\")]
@@ -214,7 +214,7 @@ public string RootDeviceName {
return ((string)(this["RootDeviceName"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("101F742C6B88")]
@@ -247,7 +247,7 @@ public string testLocalStorePath {
this["testLocalStorePath"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("testS3Bucket")]
@@ -259,7 +259,7 @@ public string testS3Bucket {
this["testS3Bucket"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("testS3Endpoint")]
@@ -271,7 +271,7 @@ public string testS3Endpoint {
this["testS3Endpoint"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("testS3AccessKey")]
@@ -283,7 +283,7 @@ public string testS3AccessKey {
this["testS3AccessKey"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("testS3SecretKey")]
@@ -295,7 +295,7 @@ public string testS3SecretKey {
this["testS3SecretKey"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("206-2-73592258-559a-3b38-8f66-b667aab143eb")]
@@ -307,7 +307,7 @@ public string testS3TemplateName {
this["testS3TemplateName"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5fe2bad3-d785-394e-9949-89786b8a63d2")]
@@ -319,7 +319,7 @@ public string testLocalStoreUUID {
this["testLocalStoreUUID"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("acton-systemvm-02062012.vhd.bz2")]
@@ -331,7 +331,7 @@ public string testSystemVMTemplateName {
this["testSystemVMTemplateName"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("acton-systemvm-02062012")]
@@ -343,7 +343,7 @@ public string testSystemVMTemplateNameNoExt {
this["testSystemVMTemplateNameNoExt"] = value;
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2048")]
@@ -352,7 +352,7 @@ public ulong dom0MinMemory {
return ((ulong)(this["dom0MinMemory"]));
}
}
-
+
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10.1.1.1")]
@@ -361,7 +361,7 @@ public string private_ip_address {
return ((string)(this["private_ip_address"]));
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("cifs://10.1.1.1/secondary?user\\u003dadministrator\\u0026password\\u003d1pass%40w" +
@@ -374,7 +374,7 @@ public string testCifsUrl {
this["testCifsUrl"] = value;
}
}
-
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("template/tmpl/2/201/61d5316a-3cc4-30cf-a557-78691ff5c143.vhd")]
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/ProjectInstaller.Designer.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/ProjectInstaller.Designer.cs
index 2c6ffe24462a..3668a5927329 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/ProjectInstaller.Designer.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/ProjectInstaller.Designer.cs
@@ -23,7 +23,7 @@ partial class ProjectInstaller
///
private System.ComponentModel.IContainer components = null;
- ///
+ ///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/Properties/AssemblyInfo.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/Properties/AssemblyInfo.cs
index bd188bb0ef2b..1216f9b1fcb5 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/Properties/AssemblyInfo.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/Properties/AssemblyInfo.cs
@@ -19,7 +19,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AgentShell")]
@@ -31,8 +31,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -42,11 +42,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index 306bc96f8c9a..2e3de19939d3 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -26,7 +26,7 @@
// C# versions of certain CloudStack types to simplify JSON serialisation.
// Limit to the number of types, because they are written and maintained manually.
// JsonProperty used to identify property name when serialised, which allows
-// later adoption of C# naming conventions if requried.
+// later adoption of C# naming conventions if requried.
namespace HypervResource
{
public class PrimaryDataStoreTO
@@ -474,15 +474,15 @@ public enum StoragePoolType
///
Filesystem,
///
- /// NFS or CIFS
+ /// NFS or CIFS
///
NetworkFilesystem,
///
- /// shared LUN, with a clusterfs overlay
+ /// shared LUN, with a clusterfs overlay
///
IscsiLUN,
///
- /// for e.g., ZFS Comstar
+ /// for e.g., ZFS Comstar
///
Iscsi,
///
@@ -494,31 +494,31 @@ public enum StoragePoolType
///
LVM,
///
- ///
+ ///
///
CLVM,
///
- ///
+ ///
///
RBD,
///
- ///
+ ///
///
SharedMountPoint,
///
- /// VMware VMFS storage
+ /// VMware VMFS storage
///
VMFS,
///
- /// for XenServer, Storage Pool is set up by customers.
+ /// for XenServer, Storage Pool is set up by customers.
///
PreSetup,
///
- /// XenServer local EXT SR
+ /// XenServer local EXT SR
///
EXT,
///
- ///
+ ///
///
OCFS2,
///
@@ -662,7 +662,7 @@ public NicDetails(String macaddress, int vlanid, int enabledState)
}
///
- /// Fully qualified named for a number of types used in CloudStack. Used to specify the intended type for JSON serialised objects.
+ /// Fully qualified named for a number of types used in CloudStack. Used to specify the intended type for JSON serialised objects.
///
public class CloudStackTypes
{
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index 59397e8fba8e..7e31ced3e389 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -129,7 +129,7 @@ public List getAllPrimaryStorages()
///
///
/// POST takes dynamic to allow it to receive JSON without concern for what is the underlying object.
- /// E.g. http://stackoverflow.com/questions/14071715/passing-dynamic-json-object-to-web-api-newtonsoft-example
+ /// E.g. http://stackoverflow.com/questions/14071715/passing-dynamic-json-object-to-web-api-newtonsoft-example
/// and http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object
/// Use ActionName attribute to allow multiple POST URLs, one for each supported command
/// E.g. http://stackoverflow.com/a/12703423/939250
@@ -141,7 +141,7 @@ public List getAllPrimaryStorages()
/// Exceptions handled on command by command basis rather than globally to allow details of the command
/// to be reflected in the response. Default error handling is in the catch for Exception, but
/// other exception types may be caught where the feedback would be different.
- /// NB: global alternatives discussed at
+ /// NB: global alternatives discussed at
/// http://weblogs.asp.net/fredriknormen/archive/2012/06/11/asp-net-web-api-exception-handling.aspx
///
///
@@ -174,7 +174,7 @@ public string Get()
}
///
- /// NOP - placeholder for future setup, e.g. delete existing VMs or Network ports
+ /// NOP - placeholder for future setup, e.g. delete existing VMs or Network ports
/// POST api/HypervResource/SetupCommand
///
///
@@ -486,7 +486,7 @@ public JContainer DeleteCommand([FromBody]dynamic cmd)
}
}
-
+
private static JArray ReturnCloudStackTypedJArray(object ansContent, string ansType)
{
JObject ansObj = Utils.CreateCloudStackObject(ansType, ansContent);
@@ -705,7 +705,7 @@ private static bool ValidStoragePool(string poolTypeStr, string poolLocalPath, s
/// +-System.UnauthorizedAccessException
/// +-System.IO.IOException
/// +-System.IO.PathTooLongException
- ///
+ ///
/// Exceptions related to HTTP URIs
/// System.SystemException
/// +-System.InvalidOperationException
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/Properties/AssemblyInfo.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/Properties/AssemblyInfo.cs
index 7bbc9b55adb3..6a05afa8f7fd 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/Properties/AssemblyInfo.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/Properties/AssemblyInfo.cs
@@ -19,7 +19,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HypervResource")]
@@ -31,8 +31,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -42,11 +42,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
index d385a8e67abb..6f0327845a03 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -111,7 +111,7 @@ public ComputerSystem AddUserData(ComputerSystem vm, string userData)
return vm;
}
-
+
///
/// Returns ComputerSystem lacking any NICs and VOLUMEs
///
@@ -164,7 +164,7 @@ public SyntheticEthernetPortSettingData CreateNICforVm(ComputerSystem vm, string
// Obtain controller for Hyper-V networking subsystem
var vmNetMgmtSvc = GetVirtualSwitchManagementService();
- // Create NIC resource by cloning the default NIC
+ // Create NIC resource by cloning the default NIC
var synthNICsSettings = SyntheticEthernetPortSettingData.GetInstances(vmNetMgmtSvc.Scope, "InstanceID LIKE \"%Default\"");
// Assert
@@ -217,7 +217,7 @@ public SyntheticEthernetPortSettingData CreateNICforVm(ComputerSystem vm, string
public const string HARDDISK_DISK = "Microsoft:Hyper-V:Virtual Hard Disk"; // For IDE_HARDDISK_DRIVE
///
- /// Create new VM. By default we start it.
+ /// Create new VM. By default we start it.
///
public ComputerSystem DeployVirtualMachine(dynamic jsonObj, string systemVmIso)
{
@@ -351,9 +351,9 @@ public ComputerSystem DeployVirtualMachine(dynamic jsonObj, string systemVmIso)
break;
case "DATADISK":
break;
- default:
+ default:
// TODO: double check exception type
- errMsg = string.Format("Unknown disk type {0} for disk {1}, vm named {2}",
+ errMsg = string.Format("Unknown disk type {0} for disk {1}, vm named {2}",
string.IsNullOrEmpty(driveType) ? "NULL" : driveType,
string.IsNullOrEmpty(diskName) ? "NULL" : diskName, vmName);
var ex = new WmiException(errMsg);
@@ -452,9 +452,9 @@ public ComputerSystem DeployVirtualMachine(dynamic jsonObj, string systemVmIso)
SetBandWidthLimit((ulong)networkRateMbps, portSettings);
}
- logger.DebugFormat("Created adapter {0} on port {1}, {2}",
+ logger.DebugFormat("Created adapter {0} on port {1}, {2}",
newAdapter.Path, portSettings.Path, (vlan == null ? "No VLAN" : "VLAN " + vlan));
- // logger.DebugFormat("Created adapter {0} on port {1}, {2}",
+ // logger.DebugFormat("Created adapter {0} on port {1}, {2}",
// newAdapter.Path, portSettings.Path, (vlan == null ? "No VLAN" : "VLAN " + vlan));
}
}
@@ -468,7 +468,7 @@ public ComputerSystem DeployVirtualMachine(dynamic jsonObj, string systemVmIso)
var vm = GetComputerSystem(vmName);
if (bootArgs != null && !String.IsNullOrEmpty((string)bootArgs))
{
-
+
String bootargs = bootArgs;
AddUserData(vm, bootargs);
}
@@ -576,7 +576,7 @@ private EthernetPortAllocationSettingData AttachNicToPort(ComputerSystem newVm,
}
/// this method is to add a dvd drive and attach the systemvm iso.
- ///
+ ///
public void patchSystemVmIso(String vmName, String systemVmIso)
{
ComputerSystem vmObject = GetComputerSystem(vmName);
@@ -611,7 +611,7 @@ public void AttachDisk(string vmName, string diskPath, string addressOnControlle
/// IDE_HARDDISK_DRIVE or IDE_ISO_DRIVE
public ManagementPath AddDiskDriveToIdeController(ComputerSystem vm, string vhdfile, string cntrllerAddr, string driveResourceType)
{
- logger.DebugFormat("Creating DISK for VM {0} (GUID {1}) by attaching {2}",
+ logger.DebugFormat("Creating DISK for VM {0} (GUID {1}) by attaching {2}",
vm.ElementName,
vm.Name,
vhdfile);
@@ -622,13 +622,13 @@ public ManagementPath AddDiskDriveToIdeController(ComputerSystem vm, string vhdf
case HARDDISK_DRIVE:
diskResourceSubType = HARDDISK_DISK;
break;
- case ISO_DRIVE:
+ case ISO_DRIVE:
diskResourceSubType = ISO_DISK;
break;
default:
var errMsg = string.Format(
"Unrecognised disk drive type {0} for VM {1} (GUID {2})",
- string.IsNullOrEmpty(driveResourceType) ? "NULL": driveResourceType,
+ string.IsNullOrEmpty(driveResourceType) ? "NULL": driveResourceType,
vm.ElementName,
vm.Name);
var ex = new WmiException(errMsg);
@@ -886,7 +886,7 @@ private void InsertDiskImage(ComputerSystem vm, string diskImagePath, string dis
}
///
- /// Create Msvm_StorageAllocationSettingData corresponding to the ISO image, and
+ /// Create Msvm_StorageAllocationSettingData corresponding to the ISO image, and
/// associate this with the VM's DVD drive.
///
private void AttachIso(ComputerSystem vm, string isoPath)
@@ -1191,7 +1191,7 @@ public void DestroyVm(dynamic jsonObj)
string vmToDestroy = jsonObj.vmName;
DestroyVm(vmToDestroy);
}
-
+
///
/// Remove all VMs and all SwitchPorts with the displayName. VHD gets deleted elsewhere.
///
@@ -1461,7 +1461,7 @@ private static StorageAllocationSettingData CloneStorageAllocationSetting(string
///
/// Path that uniquely identifies the resource.
/// VM to which the disk image will be attached.
- // Add new
+ // Add new
private void RemoveNetworkResource(ManagementPath resourcePath)
{
var virtSwitchMgmtSvc = GetVirtualSwitchManagementService();
@@ -1523,9 +1523,9 @@ private void RemoveStorageResource(ManagementPath resourcePath, ComputerSystem v
public void SetState(ComputerSystem vm, ushort requiredState)
{
logger.InfoFormat(
- "Changing state of {0} (GUID {1}) to {2}",
- vm.ElementName,
- vm.Name,
+ "Changing state of {0} (GUID {1}) to {2}",
+ vm.ElementName,
+ vm.Name,
RequiredState.ToString(requiredState));
ManagementPath jobPath;
@@ -1555,9 +1555,9 @@ public void SetState(ComputerSystem vm, ushort requiredState)
}
logger.InfoFormat(
- "Successfully changed vm state of {0} (GUID {1} to requested state {2}",
- vm.ElementName,
- vm.Name,
+ "Successfully changed vm state of {0} (GUID {1} to requested state {2}",
+ vm.ElementName,
+ vm.Name,
requiredState);
}
@@ -1589,9 +1589,9 @@ public void DeleteSwitchPort(string elementName)
public SyntheticEthernetPortSettingData GetSyntheticEthernetPortSettings(EthernetSwitchPort port)
{
- // An ASSOCIATOR object provides the cross reference from the EthernetSwitchPort and the
+ // An ASSOCIATOR object provides the cross reference from the EthernetSwitchPort and the
// SyntheticEthernetPortSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vm.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(port.Path.Path, SyntheticEthernetPortSettingData.CreatedClassName);
@@ -1620,7 +1620,7 @@ public SyntheticEthernetPortSettingData GetSyntheticEthernetPortSettings(Etherne
/// Msvm_StorageAllocationSettings with HostResource configured with image
/// file and Parent set to a controller associated with the ComputerSystem
/// VM to which the disk image will be attached.
- // Add new
+ // Add new
private ManagementPath[] AddStorageResource(string[] storageSettings, ComputerSystem vm)
{
return AddVirtualResource(storageSettings, vm);
@@ -1697,7 +1697,7 @@ private ManagementPath SetPortVlan(string vlan, EthernetPortAllocationSettingDat
var vmVirtMgmtSvc = GetVirtualisationSystemManagementService();
EthernetSwitchPortVlanSettingData.GetInstances();
- // Create NIC resource by cloning the default NIC
+ // Create NIC resource by cloning the default NIC
var vlanSettings = EthernetSwitchPortVlanSettingData.GetInstances(vmVirtMgmtSvc.Scope, "InstanceID LIKE \"%Default\"");
// Assert
@@ -1783,7 +1783,7 @@ private void SetBandWidthLimit(ulong limit, EthernetPortAllocationSettingData po
///
/// With V1 API, external ethernet port was attached to the land endpoint, which was attached to the switch.
/// e.g. Msvm_ExternalEthernetPort -> SwitchLANEndpoint -> SwitchPort -> VirtualSwitch
- ///
+ ///
/// With V2 API, there are two kinds of lan endpoint: one on the computer system and one on the switch
/// e.g. Msvm_ExternalEthernetPort -> LANEndpoint -> LANEdnpoint -> EthernetSwitchPort -> VirtualEthernetSwitch
///
@@ -1800,7 +1800,7 @@ public static VirtualEthernetSwitch GetExternalVirtSwitch(String vSwitchName)
logger.Error(errMsg, ex);
throw ex;
}
- foreach(ExternalEthernetPort externNIC in externNICs.OfType()) {
+ foreach(ExternalEthernetPort externNIC in externNICs.OfType()) {
// A sequence of ASSOCIATOR objects need to be traversed to get from external NIC the vswitch.
// We use ManagementObjectSearcher objects to execute this sequence of questions
// NB: default scope of ManagementObjectSearcher is '\\.\root\cimv2', which does not contain
@@ -1822,7 +1822,7 @@ public static VirtualEthernetSwitch GetExternalVirtSwitch(String vSwitchName)
var switchEndpointQuery = new RelatedObjectQuery(adapterEndPoint.Path.Path, LANEndpoint.CreatedClassName);
var switchEndpointSearch = new ManagementObjectSearcher(externNIC.Scope, switchEndpointQuery);
var switchEndpointCollection = new LANEndpoint.LANEndpointCollection(switchEndpointSearch.Get());
-
+
// assert
if (endpointCollection.Count < 1)
{
@@ -1831,12 +1831,12 @@ public static VirtualEthernetSwitch GetExternalVirtSwitch(String vSwitchName)
logger.Error(errMsg, ex);
throw ex;
}
-
+
LANEndpoint switchEndPoint = switchEndpointCollection.OfType().First();
var switchPortQuery = new RelatedObjectQuery(switchEndPoint.Path.Path, EthernetSwitchPort.CreatedClassName);
var switchPortSearch = new ManagementObjectSearcher(switchEndPoint.Scope, switchPortQuery);
var switchPortCollection = new EthernetSwitchPort.EthernetSwitchPortCollection(switchPortSearch.Get());
-
+
// assert
if (switchPortCollection.Count < 1 )
{
@@ -1845,7 +1845,7 @@ public static VirtualEthernetSwitch GetExternalVirtSwitch(String vSwitchName)
logger.Error(errMsg, ex);
throw ex;
}
-
+
EthernetSwitchPort switchPort = switchPortCollection.OfType().First();
var vSwitchQuery = new RelatedObjectQuery(switchPort.Path.Path, VirtualEthernetSwitch.CreatedClassName);
var vSwitchSearch = new ManagementObjectSearcher(externNIC.Scope, vSwitchQuery);
@@ -2001,7 +2001,7 @@ public Boolean TagVm(ComputerSystem vm)
private static ComputerSystem CreateDefaultVm(VirtualSystemManagementService vmMgmtSvc, string name)
{
- // Tweak default settings by basing new VM on default global setting object
+ // Tweak default settings by basing new VM on default global setting object
// with designed display name.
UInt16 startupAction = 2; // Do nothing.
UInt16 stopAction = 4; // Shutdown.
@@ -2142,7 +2142,7 @@ public VirtualSystemManagementService GetVirtualisationSystemManagementService()
{
// VirtualSystemManagementService is a singleton, most anonymous way of lookup is by asking for the set
// of local instances, which should be size 1.
-
+
var virtSysMgmtSvcCollection = VirtualSystemManagementService.GetInstances();
foreach (VirtualSystemManagementService item in virtSysMgmtSvcCollection)
{
@@ -2192,8 +2192,8 @@ private static void JobCompleted(ManagementPath jobPath)
if (jobObj.JobState != JobState.Completed)
{
var errMsg = string.Format(
- "Hyper-V Job failed, Error Code:{0}, Description: {1}",
- jobObj.ErrorCode,
+ "Hyper-V Job failed, Error Code:{0}, Description: {1}",
+ jobObj.ErrorCode,
jobObj.ErrorDescription);
var ex = new WmiException(errMsg);
logger.Error(errMsg, ex);
@@ -2269,18 +2269,18 @@ public void GetProcessorResources(out uint sockets, out uint cores, out uint mhz
sockets++;
}
}
-
+
public void GetProcessorUsageInfo(out double cpuUtilization)
{
- PerfFormattedData_Counters_ProcessorInformation.PerfFormattedData_Counters_ProcessorInformationCollection coll =
+ PerfFormattedData_Counters_ProcessorInformation.PerfFormattedData_Counters_ProcessorInformationCollection coll =
PerfFormattedData_Counters_ProcessorInformation.GetInstances("Name=\"_Total\"");
cpuUtilization = 100;
// Use the first one
foreach (PerfFormattedData_Counters_ProcessorInformation procInfo in coll)
{
- // Idle during a given internal
+ // Idle during a given internal
// See http://library.wmifun.net/cimv2/win32_perfformatteddata_counters_processorinformation.html
- cpuUtilization = 100.0 - (double)procInfo.PercentIdleTime;
+ cpuUtilization = 100.0 - (double)procInfo.PercentIdleTime;
}
}
@@ -2308,7 +2308,7 @@ public string GetDefaultVirtualDiskFolder()
logger.Error(errMsg);
return null;
}
-
+
return defaultVirtualHardDiskPath;
}
@@ -2376,9 +2376,9 @@ public List GetVmElementNames()
public ProcessorSettingData GetProcSettings(VirtualSystemSettingData vmSettings)
{
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// ProcessorSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vmSettings.Path.Path, ProcessorSettingData.CreatedClassName);
@@ -2401,9 +2401,9 @@ public ProcessorSettingData GetProcSettings(VirtualSystemSettingData vmSettings)
public MemorySettingData GetMemSettings(VirtualSystemSettingData vmSettings)
{
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// MemorySettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vmSettings.Path.Path, MemorySettingData.CreatedClassName);
@@ -2431,7 +2431,7 @@ public ResourceAllocationSettingData GetDvdDriveSettings(VirtualSystemSettingDat
foreach (ResourceAllocationSettingData wmiObj in wmiObjCollection)
{
- // DVD drive is '16', see http://msdn.microsoft.com/en-us/library/hh850200(v=vs.85).aspx
+ // DVD drive is '16', see http://msdn.microsoft.com/en-us/library/hh850200(v=vs.85).aspx
if (wmiObj.ResourceType == 16)
{
return wmiObj;
@@ -2459,8 +2459,8 @@ public ResourceAllocationSettingData GetIDEControllerSettings(VirtualSystemSetti
}
var errMsg = string.Format(
- "Cannot find the Microsoft Emulated IDE Controlle at address {0} in VirtualSystemSettingData {1}",
- cntrllerAddr,
+ "Cannot find the Microsoft Emulated IDE Controlle at address {0} in VirtualSystemSettingData {1}",
+ cntrllerAddr,
vmSettings.Path.Path);
var ex = new WmiException(errMsg);
logger.Error(errMsg, ex);
@@ -2488,8 +2488,8 @@ public ResourceAllocationSettingData GetScsiControllerSettings(VirtualSystemSett
}
///
- /// VM resources, typically hardware a described by a generic MSVM_ResourceAllocationSettingData object. The hardware type being
- /// described is identified in two ways: in general terms using an enum in the ResourceType field, and in terms of the implementation
+ /// VM resources, typically hardware a described by a generic MSVM_ResourceAllocationSettingData object. The hardware type being
+ /// described is identified in two ways: in general terms using an enum in the ResourceType field, and in terms of the implementation
/// using text in the ResourceSubType field.
/// See http://msdn.microsoft.com/en-us/library/cc136877%28v=vs.85%29.aspx
///
@@ -2497,9 +2497,9 @@ public ResourceAllocationSettingData GetScsiControllerSettings(VirtualSystemSett
///
public ResourceAllocationSettingData.ResourceAllocationSettingDataCollection GetResourceAllocationSettings(VirtualSystemSettingData vmSettings)
{
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// ResourceAllocationSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vmSettings.Path.Path, ResourceAllocationSettingData.CreatedClassName);
@@ -2525,9 +2525,9 @@ public EthernetPortAllocationSettingData[] GetEthernetConnections(ComputerSystem
// ComputerSystem -> VirtualSystemSettingData -> EthernetPortAllocationSettingData
VirtualSystemSettingData vmSettings = GetVmSettings(vm);
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// EthernetPortAllocationSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vmSettings.Path.Path, EthernetPortAllocationSettingData.CreatedClassName);
@@ -2568,9 +2568,9 @@ public StorageAllocationSettingData[] GetStorageSettings(ComputerSystem vm)
public EthernetSwitchPortVlanSettingData GetVlanSettings(EthernetPortAllocationSettingData ethernetConnection)
{
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// EthernetPortAllocationSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(ethernetConnection.Path.Path, EthernetSwitchPortVlanSettingData.CreatedClassName);
@@ -2596,14 +2596,14 @@ public EthernetSwitchPortVlanSettingData GetVlanSettings(EthernetPortAllocationS
return wmiObjCollection.OfType().First();
}
-
+
public SyntheticEthernetPortSettingData[] GetEthernetPortSettings(ComputerSystem vm)
{
- // An ASSOCIATOR object provides the cross reference from the ComputerSettings and the
+ // An ASSOCIATOR object provides the cross reference from the ComputerSettings and the
// SyntheticEthernetPortSettingData, via the VirtualSystemSettingData.
// However, generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
//
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vm.path, resultclassName);
//
@@ -2640,9 +2640,9 @@ public string GetDefaultDataRoot()
public VirtualSystemSettingData GetVmSettings(ComputerSystem vm)
{
- // An ASSOCIATOR object provides the cross reference from the ComputerSettings and the
+ // An ASSOCIATOR object provides the cross reference from the ComputerSettings and the
// VirtualSystemSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vm.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vm.Path.Path, VirtualSystemSettingData.CreatedClassName);
@@ -2671,9 +2671,9 @@ public VirtualSystemSettingData GetVmSettings(ComputerSystem vm)
public KvpExchangeComponentSettingData GetKvpSettings(VirtualSystemSettingData vmSettings)
{
- // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
+ // An ASSOCIATOR object provides the cross reference from the VirtualSystemSettingData and the
// KvpExchangeComponentSettingData, but generated wrappers do not expose a ASSOCIATOR OF query as a method.
- // Instead, we use the System.Management to code the equivalant of
+ // Instead, we use the System.Management to code the equivalant of
// string query = string.Format( "ASSOCIATORS OF {{{0}}} WHERE ResultClass = {1}", vmSettings.path, resultclassName);
//
var wmiObjQuery = new RelatedObjectQuery(vmSettings.Path.Path, KvpExchangeComponentSettingData.CreatedClassName);
@@ -2700,7 +2700,7 @@ public void GetSummaryInfo(Dictionary vmProcessorInfo, Lis
{
return;
}
- // Process info available from WMI,
+ // Process info available from WMI,
// See http://msdn.microsoft.com/en-us/library/hh850062(v=vs.85).aspx
uint[] requestedInfo = new uint[] { // TODO: correct?
0, // Name
@@ -2887,7 +2887,7 @@ public static string ToString(UInt16 value)
/// http://msdn.microsoft.com/en-us/library/hh850116(v=vs.85).aspx#methods
/// However, the CIM standard has additional possibilities based on the description
/// of EnabledState.
- /// The previous V1 API is described by
+ /// The previous V1 API is described by
/// http://msdn.microsoft.com/en-us/library/cc136822%28v=vs.85%29.aspx
///
public class EnabledState
@@ -2914,27 +2914,27 @@ public class EnabledState
public const UInt16 Suspended = 32769;
///
/// The VM is starting. This is a transitional state between 3 (Disabled)
- /// or 32769 (Suspended) and 2 (Enabled) initiated by a call to the
+ /// or 32769 (Suspended) and 2 (Enabled) initiated by a call to the
/// RequestStateChange method with a RequestedState parameter of 2 (Enabled).
///
public const UInt16 Starting = 32770;
///
- /// Starting with Windows Server 2008 R2 this value is not supported.
- /// If the VM is performing a snapshot operation, the element at index 1
- /// of the OperationalStatus property array will contain 32768 (Creating Snapshot),
+ /// Starting with Windows Server 2008 R2 this value is not supported.
+ /// If the VM is performing a snapshot operation, the element at index 1
+ /// of the OperationalStatus property array will contain 32768 (Creating Snapshot),
/// 32769 (Applying Snapshot), or 32770 (Deleting Snapshot).
///
public const UInt16 Snapshotting = 32771;
///
/// The VM is saving its state. This is a transitional state between 2 (Enabled)
- /// and 32769 (Suspended) initiated by a call to the RequestStateChange method
+ /// and 32769 (Suspended) initiated by a call to the RequestStateChange method
/// with a RequestedState parameter of 32769 (Suspended).
///
public const UInt16 Saving = 32773;
///
- /// The VM is turning off. This is a transitional state between 2 (Enabled)
- /// and 3 (Disabled) initiated by a call to the RequestStateChange method
- /// with a RequestedState parameter of 3 (Disabled) or a guest operating system
+ /// The VM is turning off. This is a transitional state between 2 (Enabled)
+ /// and 3 (Disabled) initiated by a call to the RequestStateChange method
+ /// with a RequestedState parameter of 3 (Disabled) or a guest operating system
/// initiated power off.
///
public const UInt16 Stopping = 32774;
@@ -2980,7 +2980,7 @@ public static string ToCloudStackState(UInt16 value)
case Saving: result = "Saving"; break;
case Stopping: result = "Stopping"; break;
case Pausing: result = "Unknown"; break;
- case Resuming: result = "Starting"; break;
+ case Resuming: result = "Starting"; break;
}
return result;
}
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceController1Test.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceController1Test.cs
index 91d41e63b9b0..91194a1424d9 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceController1Test.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceController1Test.cs
@@ -66,7 +66,7 @@ public class HypervResourceController1Test
///
/// Test WmiCalls to which incoming HTTP POST requests are dispatched.
- ///
+ ///
/// TODO: revise beyond first approximation
/// First approximation is a quick port of the existing Java tests for Hyper-V server resource.
/// A second approximation would use the AgentShell settings files directly.
@@ -117,10 +117,10 @@ public HypervResourceController1Test()
// Clean up old test files in local storage folder
FileInfo testVolWorks = new FileInfo(Path.Combine(testLocalStorePath, testSampleVolumeWorkingUUID));
- // Assert.True(testVolWorks.Exists, "Create a working virtual disk at " + testVolWorks.FullName);
-
+ // Assert.True(testVolWorks.Exists, "Create a working virtual disk at " + testVolWorks.FullName);
+
testSampleTemplateURLJSON = JsonConvert.SerializeObject(testSampleTemplateUUID);
- s_logger.Info("Created " + testSampleTemplateURLJSON + " in local storage.");
+ s_logger.Info("Created " + testSampleTemplateURLJSON + " in local storage.");
// Capture other JSON encoded paths
@@ -150,7 +150,7 @@ private String CreateTestDiskImageFromExistingImage(FileInfo srcFile,
return JsonConvert.SerializeObject(newFileInfo.FullName);
}
-
+
[Fact]
public void TestCreateCommand()
{
@@ -267,7 +267,7 @@ public void TestStartCommand()
Assert.NotNull(startAns[0][CloudStackTypes.StartAnswer]);
Assert.True((bool)startAns[0][CloudStackTypes.StartAnswer].result, "StartCommand did not succeed " + startAns[0][CloudStackTypes.StartAnswer].details);
- Assert.Null((string)startAns[0][CloudStackTypes.StartAnswer].details);
+ Assert.Null((string)startAns[0][CloudStackTypes.StartAnswer].details);
}
[Fact]
@@ -323,7 +323,7 @@ public static String getSampleVolumeObjectTO()
"\"volumeId\":10," +
// "\"vmName\":\"i-3-5-VM\"," + // TODO: do we have to fill in the vmName?
"\"accountId\":3,\"id\":10}" +
- "}"; // end of destTO
+ "}"; // end of destTO
return sampleVolumeObjectTO;
}
@@ -345,6 +345,6 @@ public static String getSampleStartCommand()
"\"broadcastUri\":\"vlan://261\",\"isolationUri\":\"vlan://261\",\"isSecurityGroupEnabled\":false}" +
"]},\"contextMap\":{},\"wait\":0}";
return sample;
- }
+ }
}
}
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceControllerTest.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceControllerTest.cs
index 7f03e151253f..f8761867b18e 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceControllerTest.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/HypervResourceControllerTest.cs
@@ -64,7 +64,7 @@ public class HypervResourceControllerTest
///
/// Test WmiCalls to which incoming HTTP POST requests are dispatched.
- ///
+ ///
/// TODO: revise beyond first approximation
/// First approximation is a quick port of the existing Java tests for Hyper-V server resource.
/// A second approximation would use the AgentShell settings files directly.
@@ -326,7 +326,7 @@ public static String getSampleVolumeObjectTO()
"\"volumeId\":10," +
// "\"vmName\":\"i-3-5-VM\"," + // TODO: do we have to fill in the vmName?
"\"accountId\":3,\"id\":10}" +
- "}"; // end of destTO
+ "}"; // end of destTO
return sampleVolumeObjectTO;
}
@@ -443,7 +443,7 @@ public void TestCopyCommand()
"\"vmName\":\"i-3-5-VM\"," +
"\"accountId\":3," +
"\"id\":10 }" +
- "}," + // end of destTO
+ "}," + // end of destTO
"\"wait\":0}"; // end of Copy Command
#endregion
//"name":"ROOT-8","size":140616708,"volumeId":8,"vmName":"s-8-VM","accountId":1,"id":8}},"contextMap":{},"wait":0}
@@ -562,7 +562,7 @@ public void TestCopyCommandBz2Img()
"\"vmName\":\"i-3-5-VM\"," +
"\"accountId\":1," +
"\"id\":10}" +
- "}," + // end of destTO
+ "}," + // end of destTO
"\"wait\":0}"; // end of Copy Command
#endregion
@@ -1117,7 +1117,7 @@ private static string TestStartCommand()
string strippedExpectedMac = expectedMac.Replace(":", string.Empty);
Assert.Equal(nicSettingsViaVm[0].Address.ToLower(), strippedExpectedMac.ToLower());
- // Assert switchport has correct VLAN
+ // Assert switchport has correct VLAN
var ethernetConnections = wmiCallsV2.GetEthernetConnections(vm);
var vlanSettings = wmiCallsV2.GetVlanSettings(ethernetConnections[0]);
string isolationUri = (string)jsonStartCmd.vm.nics[0].isolationUri;
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/Properties/AssemblyInfo.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/Properties/AssemblyInfo.cs
index c8820467b3cd..1929739e8f5d 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/Properties/AssemblyInfo.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.Tests/Properties/AssemblyInfo.cs
@@ -19,7 +19,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ServerResource.Tests")]
@@ -31,8 +31,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -42,11 +42,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/Properties/AssemblyInfo.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/Properties/AssemblyInfo.cs
index 8d12d056411a..e3ec242149f4 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/Properties/AssemblyInfo.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/Properties/AssemblyInfo.cs
@@ -19,7 +19,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WmiWrappers")]
@@ -31,8 +31,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -42,11 +42,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_OperatingSystem.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_OperatingSystem.cs
index ce1e22ffe9c4..a29ede0f0a02 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_OperatingSystem.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_OperatingSystem.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,58 +32,58 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Win32_OperatingSystem
public class OperatingSystem0 : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\CIMV2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Win32_OperatingSystem";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public OperatingSystem0() {
this.InitializeObject(null, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), null);
}
-
+
public OperatingSystem0(System.Management.ManagementScope mgmtScope) {
this.InitializeObject(mgmtScope, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), null);
}
-
+
public OperatingSystem0(System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), getOptions);
}
-
+
public OperatingSystem0(System.Management.ManagementScope mgmtScope, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), getOptions);
}
-
+
public OperatingSystem0(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public OperatingSystem0(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public OperatingSystem0(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -95,7 +95,7 @@ public OperatingSystem0(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public OperatingSystem0(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -108,7 +108,7 @@ public OperatingSystem0(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -117,7 +117,7 @@ public string OriginatingNamespace {
return "ROOT\\CIMV2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -126,7 +126,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -135,7 +135,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -144,7 +144,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -153,7 +153,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -172,7 +172,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -184,7 +184,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -205,7 +205,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -217,7 +217,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BootDevice property indicates the name of the disk drive from which the Win32" +
@@ -227,7 +227,7 @@ public string BootDevice {
return ((string)(curObj["BootDevice"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BuildNumber property indicates the build number of the operating system. It " +
@@ -238,7 +238,7 @@ public string BuildNumber {
return ((string)(curObj["BuildNumber"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BuildType property indicates the type of build used for the operating system." +
@@ -248,7 +248,7 @@ public string BuildType {
return ((string)(curObj["BuildType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Caption property is a short textual description (one-line string) of the obje" +
@@ -258,7 +258,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CodeSet property indicates the code page value used by the operating system. A code page contains a character table used by the operating system to translate strings for different languages. The American National Standards Institute (ANSI) lists values that represent defined code pages. If the operating system does not use an ANSI code page, this member will be set to 0. The CodeSet string can use up to six characters to define the code page value.
@@ -268,7 +268,7 @@ public string CodeSet {
return ((string)(curObj["CodeSet"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CountryCode property indicates the code for the country/regionused by the operating system. Values are based on international phone dialing prefixes (also referred to as IBM country/region codes). The CountryCode string can use up to six characters to define the country/region code value.
@@ -278,7 +278,7 @@ public string CountryCode {
return ((string)(curObj["CountryCode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CreationClassName indicates the name of the class or the subclass used in the cre" +
@@ -290,7 +290,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CSCreationClassName contains the scoping computer system\'s creation class name.")]
@@ -299,7 +299,7 @@ public string CSCreationClassName {
return ((string)(curObj["CSCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CSDVersion property contains a null-terminated string, that indicates the latest Service Pack installed on the computer system. If no Service Pack is installed, the string is NULL. For computer systems running Windows 95, this property contains a null-terminated string that provides arbitrary additional information about the operating system.
@@ -309,7 +309,7 @@ public string CSDVersion {
return ((string)(curObj["CSDVersion"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CSName contains the scoping computer system\'s name.")]
@@ -318,7 +318,7 @@ public string CSName {
return ((string)(curObj["CSName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCurrentTimeZoneNull {
@@ -331,7 +331,7 @@ public bool IsCurrentTimeZoneNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CurrentTimeZone indicates the number of minutes the operating system is offset fr" +
@@ -345,7 +345,7 @@ public short CurrentTimeZone {
return ((short)(curObj["CurrentTimeZone"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_32BitApplicationsNull {
@@ -358,7 +358,7 @@ public bool IsDataExecutionPrevention_32BitApplicationsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("If true, indicates that 32-bit applications are running with Data Execution Preve" +
@@ -372,7 +372,7 @@ public bool DataExecutionPrevention_32BitApplications {
return ((bool)(curObj["DataExecutionPrevention_32BitApplications"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_AvailableNull {
@@ -385,7 +385,7 @@ public bool IsDataExecutionPrevention_AvailableNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"If true, indicates that the hardware supports Windows Data Execution Prevention (DEP) technology. DEP ensures that all memory locations are marked with a non-executable attribute unless the memory location explicitly contains executable code. This can help mitigate certain types of buffer overrun security exploits. If DEP is available, 64-bit applications are automatically protected. To determine if DEP has been enabled for 32-bit applications and drivers, use the DataExecutionPrevention_ properties ")]
@@ -398,7 +398,7 @@ public bool DataExecutionPrevention_Available {
return ((bool)(curObj["DataExecutionPrevention_Available"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_DriversNull {
@@ -411,7 +411,7 @@ public bool IsDataExecutionPrevention_DriversNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("If true, indicates that drivers are running with Data Execution Prevention (DEP) " +
@@ -425,7 +425,7 @@ public bool DataExecutionPrevention_Drivers {
return ((bool)(curObj["DataExecutionPrevention_Drivers"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_SupportPolicyNull {
@@ -438,7 +438,7 @@ public bool IsDataExecutionPrevention_SupportPolicyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The DataExecutionPrevention_SupportPolicy indicates which one of four Data Execution Prevention (DEP) settings is applied. Each setting varies by the extent to which DEP is applied to 32-bit applications. Note that DEP is always applied to the Windows kernel. Always On (not available in the user interface) indicates that DEP is enabled for all 32-bit applications on the machine with no exceptions. OptOut indicates DEP is on by default for all 32-bit applications and that a user or administrator must explicitly remove support for a 32-bit application by adding to an exceptions list. OptIn indicates DEP is on for a limited number of binaries, the kernel, and all Windows services but it is off by default for all 32-bit applications; a user or administrator must explicitly choose the AlwaysOn (not available in the user interface) or OptOut setting before DEP can be applied to 32-bit applications. AlwaysOff (not available in the user interface) indicates DEP is turned off for all 32-bit applications on the machine. ")]
@@ -451,7 +451,7 @@ public DataExecutionPrevention_SupportPolicyValues DataExecutionPrevention_Suppo
return ((DataExecutionPrevention_SupportPolicyValues)(System.Convert.ToInt32(curObj["DataExecutionPrevention_SupportPolicy"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDebugNull {
@@ -464,7 +464,7 @@ public bool IsDebugNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Debug property indicates whether the operating system is a checked (debug) build. Checked builds provide error checking, argument verification, and system debugging code. Additional code in a checked binary generates a kernel debugger error message and breaks into the debugger. This helps immediately determine the cause and location of the error. Performance suffers in the checked build due to the additional code that is executed.
@@ -478,7 +478,7 @@ public bool Debug {
return ((bool)(curObj["Debug"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Description property provides a description of the Windows operating system. " +
@@ -490,13 +490,13 @@ public string Description {
}
set {
curObj["Description"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDistributedNull {
@@ -509,7 +509,7 @@ public bool IsDistributedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Boolean indicating whether the operating system is distributed across several com" +
@@ -523,7 +523,7 @@ public bool Distributed {
return ((bool)(curObj["Distributed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEncryptionLevelNull {
@@ -536,7 +536,7 @@ public bool IsEncryptionLevelNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The EncryptionLevel property specifies if the encryption level for secure transac" +
@@ -550,7 +550,7 @@ public EncryptionLevelValues EncryptionLevel {
return ((EncryptionLevelValues)(System.Convert.ToInt32(curObj["EncryptionLevel"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsForegroundApplicationBoostNull {
@@ -563,7 +563,7 @@ public bool IsForegroundApplicationBoostNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The ForegroundApplicationBoost property indicates the increase in priority given to the foreground application. On computer systems running Windows NT 4.0 and Windows 2000, application boost is implemented by giving an application more execution time slices (quantum lengths). A ForegroundApplicationBoost value of 0 indicates the system boosts the quantum length by 6; if 1, then 12; and if 2 then 18. On Windows NT 3.51 and earlier, application boost is implemented by increasing the scheduling priority. For these systems, the scheduling priority is increased by the value of this property. The default value is 2.")]
@@ -582,13 +582,13 @@ public ForegroundApplicationBoostValues ForegroundApplicationBoost {
else {
curObj["ForegroundApplicationBoost"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreePhysicalMemoryNull {
@@ -601,7 +601,7 @@ public bool IsFreePhysicalMemoryNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of kilobytes of physical memory currently unused and available")]
@@ -614,7 +614,7 @@ public ulong FreePhysicalMemory {
return ((ulong)(curObj["FreePhysicalMemory"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreeSpaceInPagingFilesNull {
@@ -627,7 +627,7 @@ public bool IsFreeSpaceInPagingFilesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The total number of KBytes that can be mapped into the OperatingSystem\'s paging f" +
@@ -642,7 +642,7 @@ public ulong FreeSpaceInPagingFiles {
return ((ulong)(curObj["FreeSpaceInPagingFiles"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreeVirtualMemoryNull {
@@ -655,7 +655,7 @@ public bool IsFreeVirtualMemoryNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of kilobytes of virtual memory currently unused and available. For example" +
@@ -671,7 +671,7 @@ public ulong FreeVirtualMemory {
return ((ulong)(curObj["FreeVirtualMemory"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -684,7 +684,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The InstallDate property is datetime value indicating when the object was install" +
@@ -700,7 +700,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLargeSystemCacheNull {
@@ -713,7 +713,7 @@ public bool IsLargeSystemCacheNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The LargeSystemCache property indicates whether to optimize memory for applicatio" +
@@ -727,7 +727,7 @@ public LargeSystemCacheValues LargeSystemCache {
return ((LargeSystemCacheValues)(System.Convert.ToInt32(curObj["LargeSystemCache"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastBootUpTimeNull {
@@ -740,7 +740,7 @@ public bool IsLastBootUpTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Time when the operating system was last booted")]
@@ -755,7 +755,7 @@ public System.DateTime LastBootUpTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLocalDateTimeNull {
@@ -768,7 +768,7 @@ public bool IsLocalDateTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Operating system\'s notion of the local date and time of day.")]
@@ -783,7 +783,7 @@ public System.DateTime LocalDateTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Locale property indicates the language identifier used by the operating system. A language identifier is a standard international numeric abbreviation for a country or region. Each language has a unique language identifier (LANGID), a 16-bit value that consists of a primary language identifier and a secondary language identifier.")]
@@ -792,7 +792,7 @@ public string Locale {
return ((string)(curObj["Locale"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Manufacturer property indicates the name of the operating system manufacturer" +
@@ -802,7 +802,7 @@ public string Manufacturer {
return ((string)(curObj["Manufacturer"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxNumberOfProcessesNull {
@@ -815,7 +815,7 @@ public bool IsMaxNumberOfProcessesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Maximum number of process contexts the operating system can support. If there is no fixed maximum, the value should be 0. On systems that have a fixed maximum, this object can help diagnose failures that occur when the maximum is reached. If unknown, enter -1.")]
@@ -828,7 +828,7 @@ public uint MaxNumberOfProcesses {
return ((uint)(curObj["MaxNumberOfProcesses"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxProcessMemorySizeNull {
@@ -841,7 +841,7 @@ public bool IsMaxProcessMemorySizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Maximum number of kilobytes of memory that can be allocated to a process. For operating systems with no virtual memory, this value is typically equal to the total amount of physical memory minus memory used by the BIOS and OS. For some operating systems, this value may be infinity - in which case, 0 should be entered. In other cases, this value could be a constant - for example, 2G or 4G.")]
@@ -854,7 +854,7 @@ public ulong MaxProcessMemorySize {
return ((ulong)(curObj["MaxProcessMemorySize"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The MUILanguages property indicates the MUI Languages installed in the system. \n " +
@@ -864,7 +864,7 @@ public string[] MUILanguages {
return ((string[])(curObj["MUILanguages"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Name of the operating system instance within a computer system.")]
@@ -873,7 +873,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfLicensedUsersNull {
@@ -886,7 +886,7 @@ public bool IsNumberOfLicensedUsersNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of user licenses for the operating system. If unlimited, enter 0. If unkno" +
@@ -900,7 +900,7 @@ public uint NumberOfLicensedUsers {
return ((uint)(curObj["NumberOfLicensedUsers"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfProcessesNull {
@@ -913,7 +913,7 @@ public bool IsNumberOfProcessesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of process contexts currently loaded or running on the operating system.")]
@@ -926,7 +926,7 @@ public uint NumberOfProcesses {
return ((uint)(curObj["NumberOfProcesses"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfUsersNull {
@@ -939,7 +939,7 @@ public bool IsNumberOfUsersNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of user sessions for which the operating system is currently storing state" +
@@ -953,7 +953,7 @@ public uint NumberOfUsers {
return ((uint)(curObj["NumberOfUsers"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingSystemSKUNull {
@@ -966,7 +966,7 @@ public bool IsOperatingSystemSKUNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OperatingSystemSKU property identifies the SKU of the operating system.")]
@@ -979,7 +979,7 @@ public uint OperatingSystemSKU {
return ((uint)(curObj["OperatingSystemSKU"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Organization property indicates the registered user\'s (of the operating syste" +
@@ -989,7 +989,7 @@ public string Organization {
return ((string)(curObj["Organization"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OSArchitecture property indicates the Architecture of the operating system.Ex" +
@@ -999,7 +999,7 @@ public string OSArchitecture {
return ((string)(curObj["OSArchitecture"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOSLanguageNull {
@@ -1012,7 +1012,7 @@ public bool IsOSLanguageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OSLanguage property indicates which language version of the operating system " +
@@ -1026,7 +1026,7 @@ public uint OSLanguage {
return ((uint)(curObj["OSLanguage"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOSProductSuiteNull {
@@ -1039,7 +1039,7 @@ public bool IsOSProductSuiteNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OSProductSuite property identifies installed and licensed system product addi" +
@@ -1053,7 +1053,7 @@ public OSProductSuiteValues OSProductSuite {
return ((OSProductSuiteValues)(System.Convert.ToInt32(curObj["OSProductSuite"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOSTypeNull {
@@ -1066,7 +1066,7 @@ public bool IsOSTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A integer indicating the type of operating system.")]
@@ -1079,7 +1079,7 @@ public OSTypeValues OSType {
return ((OSTypeValues)(System.Convert.ToInt32(curObj["OSType"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"A string describing the manufacturer and operating system type - used when the operating system property, OSType, is set to 1 (""Other""). The format of the string inserted in OtherTypeDescription should be similar in format to the Values strings defined for OSType. OtherTypeDescription should be set to NULL when OSType is any value other than 1.")]
@@ -1088,7 +1088,7 @@ public string OtherTypeDescription {
return ((string)(curObj["OtherTypeDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPAEEnabledNull {
@@ -1101,7 +1101,7 @@ public bool IsPAEEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1113,7 +1113,7 @@ public bool PAEEnabled {
return ((bool)(curObj["PAEEnabled"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The PlusProductID property contains the product identification number for the Win" +
@@ -1123,7 +1123,7 @@ public string PlusProductID {
return ((string)(curObj["PlusProductID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The PlusVersionNumber property contains the version number of the Windows Plus! o" +
@@ -1133,7 +1133,7 @@ public string PlusVersionNumber {
return ((string)(curObj["PlusVersionNumber"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPortableOperatingSystemNull {
@@ -1146,7 +1146,7 @@ public bool IsPortableOperatingSystemNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The PortableOperatingSystem property indicates if theOperating System is booting from a supported locally connected storagedevice.
@@ -1161,7 +1161,7 @@ public bool PortableOperatingSystem {
return ((bool)(curObj["PortableOperatingSystem"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryNull {
@@ -1174,7 +1174,7 @@ public bool IsPrimaryNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Primary property determines whether this is the primary operating system.\nVal" +
@@ -1189,7 +1189,7 @@ public bool Primary {
return ((bool)(curObj["Primary"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProductTypeNull {
@@ -1202,7 +1202,7 @@ public bool IsProductTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The ProductType property indicates additional information about the system. This " +
@@ -1217,7 +1217,7 @@ public ProductTypeValues ProductType {
return ((ProductTypeValues)(System.Convert.ToInt32(curObj["ProductType"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The RegisteredUser property indicates the name of the registered user of the oper" +
@@ -1227,7 +1227,7 @@ public string RegisteredUser {
return ((string)(curObj["RegisteredUser"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SerialNumber property indicates the operating system product serial identific" +
@@ -1237,7 +1237,7 @@ public string SerialNumber {
return ((string)(curObj["SerialNumber"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsServicePackMajorVersionNull {
@@ -1250,7 +1250,7 @@ public bool IsServicePackMajorVersionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The ServicePackMajorVersion property indicates the major version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMajorVersion is valid for computers running Windows 2000 and later (NULL otherwise).")]
@@ -1263,7 +1263,7 @@ public ushort ServicePackMajorVersion {
return ((ushort)(curObj["ServicePackMajorVersion"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsServicePackMinorVersionNull {
@@ -1276,7 +1276,7 @@ public bool IsServicePackMinorVersionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The ServicePackMinorVersion property indicates the minor version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMinorVersion is valid for computers running Windows 2000 and later (NULL otherwise).")]
@@ -1289,7 +1289,7 @@ public ushort ServicePackMinorVersion {
return ((ushort)(curObj["ServicePackMinorVersion"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSizeStoredInPagingFilesNull {
@@ -1302,7 +1302,7 @@ public bool IsSizeStoredInPagingFilesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The total number of kilobytes that can be stored in the operating system\'s paging" +
@@ -1317,7 +1317,7 @@ public ulong SizeStoredInPagingFiles {
return ((ulong)(curObj["SizeStoredInPagingFiles"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are ""OK"", ""Degraded"" and ""Pred Fail"". ""Pred Fail"" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are ""Error"", ""Starting"", ""Stopping"" and ""Service"". The latter, ""Service"", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither ""OK"" nor in one of the other states.")]
@@ -1326,7 +1326,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSuiteMaskNull {
@@ -1339,20 +1339,20 @@ public bool IsSuiteMaskNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [Description(@"The SuiteMask property indicates a set of bit flags that identify the product suites available on the system. This member can be a combination of the following values:
-0 - Windows Server 2003, Small Business Edition
-1 - Windows Server 2003, Enterprise Edition
-2 - Windows Server 2003, Backoffice Edition
-3 - Windows Server 2003, Communications Edition
-4 - Microsoft Terminal Services
-5 - Windows Server 2003, Small Business Edition Restricted
-6 - Windows XP Embedded
-7 - Windows Server 2003, Datacenter Edition
-8 - Single User
-9 - Windows XP Home Edition
+ [Description(@"The SuiteMask property indicates a set of bit flags that identify the product suites available on the system. This member can be a combination of the following values:
+0 - Windows Server 2003, Small Business Edition
+1 - Windows Server 2003, Enterprise Edition
+2 - Windows Server 2003, Backoffice Edition
+3 - Windows Server 2003, Communications Edition
+4 - Microsoft Terminal Services
+5 - Windows Server 2003, Small Business Edition Restricted
+6 - Windows XP Embedded
+7 - Windows Server 2003, Datacenter Edition
+8 - Single User
+9 - Windows XP Home Edition
10 - Windows Server 2003, Web Edition")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public SuiteMaskValues SuiteMask {
@@ -1363,7 +1363,7 @@ public SuiteMaskValues SuiteMask {
return ((SuiteMaskValues)(System.Convert.ToInt32(curObj["SuiteMask"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SystemDevice property indicates the physical disk partition the operating sys" +
@@ -1373,7 +1373,7 @@ public string SystemDevice {
return ((string)(curObj["SystemDevice"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SystemDirectory property indicates the system directory of the operating syst" +
@@ -1383,7 +1383,7 @@ public string SystemDirectory {
return ((string)(curObj["SystemDirectory"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SystemDrive property contains the letter of the disk drive that the operating" +
@@ -1393,7 +1393,7 @@ public string SystemDrive {
return ((string)(curObj["SystemDrive"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalSwapSpaceSizeNull {
@@ -1406,7 +1406,7 @@ public bool IsTotalSwapSpaceSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Total swap space in kilobytes. This value may be NULL (unspecified) if swap space is not distinguished from page files. However, some operating systems distinguish these concepts. For example, in UNIX, whole processes can be 'swapped out' when the free page list falls and remains below a specified amount.")]
@@ -1419,7 +1419,7 @@ public ulong TotalSwapSpaceSize {
return ((ulong)(curObj["TotalSwapSpaceSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalVirtualMemorySizeNull {
@@ -1432,7 +1432,7 @@ public bool IsTotalVirtualMemorySizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of kilobytes of virtual memory. For example, this may be calculated by add" +
@@ -1448,7 +1448,7 @@ public ulong TotalVirtualMemorySize {
return ((ulong)(curObj["TotalVirtualMemorySize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalVisibleMemorySizeNull {
@@ -1461,7 +1461,7 @@ public bool IsTotalVisibleMemorySizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The total amount of physical memory (in Kbytes) available to the OperatingSystem." +
@@ -1476,7 +1476,7 @@ public ulong TotalVisibleMemorySize {
return ((ulong)(curObj["TotalVisibleMemorySize"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Version property indicates the version number of the operating system.\nExampl" +
@@ -1486,7 +1486,7 @@ public string Version {
return ((string)(curObj["Version"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The WindowsDirectory property indicates the Windows directory of the operating sy" +
@@ -1496,9 +1496,9 @@ public string WindowsDirectory {
return ((string)(curObj["WindowsDirectory"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1506,9 +1506,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1525,107 +1525,107 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCurrentTimeZone() {
if ((this.IsCurrentTimeZoneNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDataExecutionPrevention_32BitApplications() {
if ((this.IsDataExecutionPrevention_32BitApplicationsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDataExecutionPrevention_Available() {
if ((this.IsDataExecutionPrevention_AvailableNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDataExecutionPrevention_Drivers() {
if ((this.IsDataExecutionPrevention_DriversNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDataExecutionPrevention_SupportPolicy() {
if ((this.IsDataExecutionPrevention_SupportPolicyNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDebug() {
if ((this.IsDebugNull == false)) {
return true;
}
return false;
}
-
+
private void ResetDescription() {
curObj["Description"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeDistributed() {
if ((this.IsDistributedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEncryptionLevel() {
if ((this.IsEncryptionLevelNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeForegroundApplicationBoost() {
if ((this.IsForegroundApplicationBoostNull == false)) {
return true;
}
return false;
}
-
+
private void ResetForegroundApplicationBoost() {
curObj["ForegroundApplicationBoost"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeFreePhysicalMemory() {
if ((this.IsFreePhysicalMemoryNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFreeSpaceInPagingFiles() {
if ((this.IsFreeSpaceInPagingFilesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFreeVirtualMemory() {
if ((this.IsFreeVirtualMemoryNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1677,13 +1677,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1711,7 +1711,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1738,8 +1738,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1749,198 +1749,198 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLargeSystemCache() {
if ((this.IsLargeSystemCacheNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastBootUpTime() {
if ((this.IsLastBootUpTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLocalDateTime() {
if ((this.IsLocalDateTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxNumberOfProcesses() {
if ((this.IsMaxNumberOfProcessesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxProcessMemorySize() {
if ((this.IsMaxProcessMemorySizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfLicensedUsers() {
if ((this.IsNumberOfLicensedUsersNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfProcesses() {
if ((this.IsNumberOfProcessesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfUsers() {
if ((this.IsNumberOfUsersNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingSystemSKU() {
if ((this.IsOperatingSystemSKUNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOSLanguage() {
if ((this.IsOSLanguageNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOSProductSuite() {
if ((this.IsOSProductSuiteNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOSType() {
if ((this.IsOSTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePAEEnabled() {
if ((this.IsPAEEnabledNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePortableOperatingSystem() {
if ((this.IsPortableOperatingSystemNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimary() {
if ((this.IsPrimaryNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProductType() {
if ((this.IsProductTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeServicePackMajorVersion() {
if ((this.IsServicePackMajorVersionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeServicePackMinorVersion() {
if ((this.IsServicePackMinorVersionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSizeStoredInPagingFiles() {
if ((this.IsSizeStoredInPagingFilesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSuiteMask() {
if ((this.IsSuiteMaskNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalSwapSpaceSize() {
if ((this.IsTotalSwapSpaceSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalVirtualMemorySize() {
if ((this.IsTotalVirtualMemorySizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalVisibleMemorySize() {
if ((this.IsTotalVisibleMemorySizeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath() {
return "ROOT\\CIMV2:Win32_OperatingSystem=@";
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1952,7 +1952,7 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
[Browsable(true)]
public static OperatingSystem0 CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1967,12 +1967,12 @@ public static OperatingSystem0 CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new OperatingSystem0(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint Reboot() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1986,7 +1986,7 @@ public uint Reboot() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetDateTime(System.DateTime LocalDateTime) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -2002,7 +2002,7 @@ public uint SetDateTime(System.DateTime LocalDateTime) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Shutdown() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -2016,7 +2016,7 @@ public uint Shutdown() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Win32Shutdown(int Flags, int Reserved) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -2033,7 +2033,7 @@ public uint Win32Shutdown(int Flags, int Reserved) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Win32ShutdownTracker(string Comment, int Flags, uint ReasonCode, uint Timeout) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -2052,395 +2052,395 @@ public uint Win32ShutdownTracker(string Comment, int Flags, uint ReasonCode, uin
return System.Convert.ToUInt32(0);
}
}
-
+
public enum DataExecutionPrevention_SupportPolicyValues {
-
+
Always_Off = 0,
-
+
Always_On = 1,
-
+
Opt_In = 2,
-
+
Opt_Out = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum EncryptionLevelValues {
-
+
Val_40_bit = 0,
-
+
Val_128_bit = 1,
-
+
N_bit = 2,
-
+
NULL_ENUM_VALUE = 3,
}
-
+
public enum ForegroundApplicationBoostValues {
-
+
None = 0,
-
+
Minimum = 1,
-
+
Maximum = 2,
-
+
NULL_ENUM_VALUE = 3,
}
-
+
public enum LargeSystemCacheValues {
-
+
Optimize_for_Applications = 0,
-
+
Optimize_for_System_Performance = 1,
-
+
NULL_ENUM_VALUE = 2,
}
-
+
public enum OSProductSuiteValues {
-
+
Small_Business = 1,
-
+
Enterprise = 2,
-
+
BackOffice = 4,
-
+
Communication_Server = 8,
-
+
Terminal_Server = 16,
-
+
Small_Business_Restricted_ = 32,
-
+
Embedded_NT = 64,
-
+
Data_Center = 128,
-
+
NULL_ENUM_VALUE = 256,
}
-
+
public enum OSTypeValues {
-
+
Unknown0 = 0,
-
+
Other0 = 1,
-
+
MACOS = 2,
-
+
ATTUNIX = 3,
-
+
DGUX = 4,
-
+
DECNT = 5,
-
+
Digital_Unix = 6,
-
+
OpenVMS = 7,
-
+
HPUX = 8,
-
+
AIX = 9,
-
+
MVS = 10,
-
+
OS400 = 11,
-
+
OS_2 = 12,
-
+
JavaVM = 13,
-
+
MSDOS = 14,
-
+
WIN3x = 15,
-
+
WIN95 = 16,
-
+
WIN98 = 17,
-
+
WINNT = 18,
-
+
WINCE = 19,
-
+
NCR3000 = 20,
-
+
NetWare = 21,
-
+
OSF = 22,
-
+
DC_OS = 23,
-
+
Reliant_UNIX = 24,
-
+
SCO_UnixWare = 25,
-
+
SCO_OpenServer = 26,
-
+
Sequent = 27,
-
+
IRIX = 28,
-
+
Solaris = 29,
-
+
SunOS = 30,
-
+
U6000 = 31,
-
+
ASERIES = 32,
-
+
TandemNSK = 33,
-
+
TandemNT = 34,
-
+
BS2000 = 35,
-
+
LINUX = 36,
-
+
Lynx = 37,
-
+
XENIX = 38,
-
+
VM_ESA = 39,
-
+
Interactive_UNIX = 40,
-
+
BSDUNIX = 41,
-
+
FreeBSD = 42,
-
+
NetBSD = 43,
-
+
GNU_Hurd = 44,
-
+
OS9 = 45,
-
+
MACH_Kernel = 46,
-
+
Inferno = 47,
-
+
QNX = 48,
-
+
EPOC = 49,
-
+
IxWorks = 50,
-
+
VxWorks = 51,
-
+
MiNT = 52,
-
+
BeOS = 53,
-
+
HP_MPE = 54,
-
+
NextStep = 55,
-
+
PalmPilot = 56,
-
+
Rhapsody = 57,
-
+
Windows_2000 = 58,
-
+
Dedicated = 59,
-
+
OS_390 = 60,
-
+
VSE = 61,
-
+
TPF = 62,
-
+
NULL_ENUM_VALUE = 63,
}
-
+
public enum ProductTypeValues {
-
+
Work_Station = 1,
-
+
Domain_Controller = 2,
-
+
Server = 3,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum SuiteMaskValues {
-
+
Windows_Server_2003_Small_Business_Edition = 0,
-
+
Windows_Server_2003_Enterprise_Edition = 1,
-
+
Windows_Server_2003_Backoffice_Edition = 2,
-
+
Windows_Server_2003_Communications_Edition = 3,
-
+
Microsoft_Terminal_Services = 4,
-
+
Windows_Server_2003_Small_Business_Edition_Restricted = 5,
-
+
Windows_XP_Embedded = 6,
-
+
Windows_Server_2003_Datacenter_Edition = 7,
-
+
Single_User = 8,
-
+
Windows_XP_Home_Edition = 9,
-
+
Windows_Server_2003_Web_Edition = 10,
-
+
NULL_ENUM_VALUE = 20,
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_Processor.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_Processor.cs
index 09ef22b4288a..48e7ecec50a4 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_Processor.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.CIMV2.Win32_Processor.cs
@@ -24,8 +24,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -33,62 +33,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Win32_Processor
public class Processor : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\CIMV2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Win32_Processor";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public Processor() {
this.InitializeObject(null, null, null);
}
-
+
public Processor(string keyDeviceID) {
this.InitializeObject(null, new System.Management.ManagementPath(Processor.ConstructPath(keyDeviceID)), null);
}
-
+
public Processor(System.Management.ManagementScope mgmtScope, string keyDeviceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(Processor.ConstructPath(keyDeviceID)), null);
}
-
+
public Processor(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public Processor(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public Processor(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public Processor(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public Processor(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -100,7 +100,7 @@ public Processor(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public Processor(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -113,7 +113,7 @@ public Processor(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -122,7 +122,7 @@ public string OriginatingNamespace {
return "ROOT\\CIMV2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -131,7 +131,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -140,7 +140,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -149,7 +149,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -158,7 +158,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -177,7 +177,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -189,7 +189,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -210,7 +210,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -222,7 +222,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAddressWidthNull {
@@ -235,7 +235,7 @@ public bool IsAddressWidthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor address width in bits.")]
@@ -248,7 +248,7 @@ public ushort AddressWidth {
return ((ushort)(curObj["AddressWidth"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsArchitectureNull {
@@ -261,7 +261,7 @@ public bool IsArchitectureNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Architecture property specifies the processor architecture used by this platf" +
@@ -276,7 +276,7 @@ public ArchitectureValues Architecture {
return ((ArchitectureValues)(System.Convert.ToInt32(curObj["Architecture"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailabilityNull {
@@ -289,7 +289,7 @@ public bool IsAvailabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The availability and status of the device. For example, the Availability property indicates that the device is running and has full power (value=3), or is in a warning (4), test (5), degraded (10) or power save state (values 13-15 and 17). Regarding the power saving states, these are defined as follows: Value 13 (""Power Save - Unknown"") indicates that the device is known to be in a power save mode, but its exact status in this mode is unknown; 14 (""Power Save - Low Power Mode"") indicates that the device is in a power save state but still functioning, and may exhibit degraded performance; 15 (""Power Save - Standby"") describes that the device is not functioning but could be brought to full power 'quickly'; and value 17 (""Power Save - Warning"") indicates that the device is in a warning state, though also in a power save mode.")]
@@ -302,7 +302,7 @@ public AvailabilityValues Availability {
return ((AvailabilityValues)(System.Convert.ToInt32(curObj["Availability"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Caption property is a short textual description (one-line string) of the obje" +
@@ -312,7 +312,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConfigManagerErrorCodeNull {
@@ -325,7 +325,7 @@ public bool IsConfigManagerErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates the Win32 Configuration Manager error code. The following values may b" +
@@ -367,7 +367,7 @@ public ConfigManagerErrorCodeValues ConfigManagerErrorCode {
return ((ConfigManagerErrorCodeValues)(System.Convert.ToInt32(curObj["ConfigManagerErrorCode"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConfigManagerUserConfigNull {
@@ -380,7 +380,7 @@ public bool IsConfigManagerUserConfigNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the device is using a user-defined configuration.")]
@@ -393,7 +393,7 @@ public bool ConfigManagerUserConfig {
return ((bool)(curObj["ConfigManagerUserConfig"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCpuStatusNull {
@@ -406,7 +406,7 @@ public bool IsCpuStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The CpuStatus property specifies the current status of the processor. Changes in " +
@@ -420,7 +420,7 @@ public CpuStatusValues CpuStatus {
return ((CpuStatusValues)(System.Convert.ToInt32(curObj["CpuStatus"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CreationClassName indicates the name of the class or the subclass used in the cre" +
@@ -432,7 +432,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCurrentClockSpeedNull {
@@ -445,7 +445,7 @@ public bool IsCurrentClockSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current speed (in MHz) of this processor.")]
@@ -458,7 +458,7 @@ public uint CurrentClockSpeed {
return ((uint)(curObj["CurrentClockSpeed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCurrentVoltageNull {
@@ -471,7 +471,7 @@ public bool IsCurrentVoltageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CurrentVoltage specifies the voltage of the processor. bits 0-6 of the field contain the processor's current voltage times 10. This value is only set when SMBIOS designates a voltage value. For specific values, see VoltageCaps.
@@ -485,7 +485,7 @@ public ushort CurrentVoltage {
return ((ushort)(curObj["CurrentVoltage"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataWidthNull {
@@ -498,7 +498,7 @@ public bool IsDataWidthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor data width in bits.")]
@@ -511,7 +511,7 @@ public ushort DataWidth {
return ((ushort)(curObj["DataWidth"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Description property provides a textual description of the object. ")]
@@ -520,7 +520,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The DeviceID property contains a string uniquely identifying the processor with o" +
@@ -530,7 +530,7 @@ public string DeviceID {
return ((string)(curObj["DeviceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorClearedNull {
@@ -543,7 +543,7 @@ public bool IsErrorClearedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("ErrorCleared is a boolean property indicating that the error reported in LastErro" +
@@ -557,7 +557,7 @@ public bool ErrorCleared {
return ((bool)(curObj["ErrorCleared"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("ErrorDescription is a free-form string supplying more information about the error" +
@@ -568,7 +568,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsExtClockNull {
@@ -581,7 +581,7 @@ public bool IsExtClockNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The ExtClock property specifies the external clock frequency. If the frequency is" +
@@ -595,7 +595,7 @@ public uint ExtClock {
return ((uint)(curObj["ExtClock"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFamilyNull {
@@ -608,7 +608,7 @@ public bool IsFamilyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The processor family type. For example, values include \"Pentium(R) processor with" +
@@ -622,7 +622,7 @@ public FamilyValues Family {
return ((FamilyValues)(System.Convert.ToInt32(curObj["Family"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -635,7 +635,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The InstallDate property is datetime value indicating when the object was install" +
@@ -651,7 +651,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsL2CacheSizeNull {
@@ -664,7 +664,7 @@ public bool IsL2CacheSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The L2CacheSize property specifies the size of the processor\'s Level 2 cache. A L" +
@@ -679,7 +679,7 @@ public uint L2CacheSize {
return ((uint)(curObj["L2CacheSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsL2CacheSpeedNull {
@@ -692,7 +692,7 @@ public bool IsL2CacheSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The L2CacheSpeed property specifies the clockspeed of the processor\'s Level 2 cac" +
@@ -707,7 +707,7 @@ public uint L2CacheSpeed {
return ((uint)(curObj["L2CacheSpeed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsL3CacheSizeNull {
@@ -720,7 +720,7 @@ public bool IsL3CacheSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The L3CacheSize property specifies the size of the processor\'s Level 3 cache. A L" +
@@ -735,7 +735,7 @@ public uint L3CacheSize {
return ((uint)(curObj["L3CacheSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsL3CacheSpeedNull {
@@ -748,7 +748,7 @@ public bool IsL3CacheSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The L3CacheSpeed property specifies the clockspeed of the processor\'s Level 3 cac" +
@@ -763,7 +763,7 @@ public uint L3CacheSpeed {
return ((uint)(curObj["L3CacheSpeed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastErrorCodeNull {
@@ -776,7 +776,7 @@ public bool IsLastErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("LastErrorCode captures the last error code reported by the logical device.")]
@@ -789,7 +789,7 @@ public uint LastErrorCode {
return ((uint)(curObj["LastErrorCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLevelNull {
@@ -802,7 +802,7 @@ public bool IsLevelNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Level property further defines the processor type. The value depends on the " +
@@ -816,7 +816,7 @@ public ushort Level {
return ((ushort)(curObj["Level"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLoadPercentageNull {
@@ -829,7 +829,7 @@ public bool IsLoadPercentageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The LoadPercentage property specifies each processor\'s load capacity averaged ove" +
@@ -844,7 +844,7 @@ public ushort LoadPercentage {
return ((ushort)(curObj["LoadPercentage"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Manufacturer property specifies the name of the processor\'s manufacturer.\nExa" +
@@ -854,7 +854,7 @@ public string Manufacturer {
return ((string)(curObj["Manufacturer"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxClockSpeedNull {
@@ -867,7 +867,7 @@ public bool IsMaxClockSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum speed (in MHz) of this processor.")]
@@ -880,7 +880,7 @@ public uint MaxClockSpeed {
return ((uint)(curObj["MaxClockSpeed"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Name property defines the label by which the object is known. When subclassed" +
@@ -890,7 +890,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfCoresNull {
@@ -903,7 +903,7 @@ public bool IsNumberOfCoresNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The NumberOfCores property contains a Processor\'s total number of cores. e.g dual" +
@@ -917,7 +917,7 @@ public uint NumberOfCores {
return ((uint)(curObj["NumberOfCores"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfLogicalProcessorsNull {
@@ -930,7 +930,7 @@ public bool IsNumberOfLogicalProcessorsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The NumberOfLogicalProcessors property specifies the total number of logical proc" +
@@ -944,7 +944,7 @@ public uint NumberOfLogicalProcessors {
return ((uint)(curObj["NumberOfLogicalProcessors"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A string describing the processor family type - used when the family property is " +
@@ -955,7 +955,7 @@ public string OtherFamilyDescription {
return ((string)(curObj["OtherFamilyDescription"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates the Win32 Plug and Play device ID of the logical device. Example: *PNP" +
@@ -965,7 +965,7 @@ public string PNPDeviceID {
return ((string)(curObj["PNPDeviceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Indicates the specific power-related capabilities of the logical device. The array values, 0=""Unknown"", 1=""Not Supported"" and 2=""Disabled"" are self-explanatory. The value, 3=""Enabled"" indicates that the power management features are currently enabled but the exact feature set is unknown or the information is unavailable. ""Power Saving Modes Entered Automatically"" (4) describes that a device can change its power state based on usage or other criteria. ""Power State Settable"" (5) indicates that the SetPowerState method is supported. ""Power Cycling Supported"" (6) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 (""Power Cycle""). ""Timed Power On Supported"" (7) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 (""Power Cycle"") and the Time parameter set to a specific date and time, or interval, for power-on.")]
@@ -980,7 +980,7 @@ public PowerManagementCapabilitiesValues[] PowerManagementCapabilities {
return enumToRet;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerManagementSupportedNull {
@@ -993,7 +993,7 @@ public bool IsPowerManagementSupportedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Boolean indicating that the Device can be power managed - ie, put into a power save state. This boolean does not indicate that power management features are currently enabled, or if enabled, what features are supported. Refer to the PowerManagementCapabilities array for this information. If this boolean is false, the integer value 1, for the string, ""Not Supported"", should be the only entry in the PowerManagementCapabilities array.")]
@@ -1006,7 +1006,7 @@ public bool PowerManagementSupported {
return ((bool)(curObj["PowerManagementSupported"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The ProcessorId property contains processor-specific information that describes the processor's features. For x86 class CPUs, the field's format depends on the processor's support of the CPUID instruction. If the instruction is supported, the ProcessorId property contains two DWORD-formatted values. The first (offsets 08h-0Bh) is the EAX value returned by a CPUID instruction with input EAX set to 1. The second (offsets 0Ch-0Fh) is the EDX value returned by that instruction. Only the first two bytes of the ProcessorID property are significant (all others are set to 0) and contain (in WORD-format) the contents of the DX register at CPU reset.")]
@@ -1015,7 +1015,7 @@ public string ProcessorId {
return ((string)(curObj["ProcessorId"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProcessorTypeNull {
@@ -1028,7 +1028,7 @@ public bool IsProcessorTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The ProcessorType property specifies the processor\'s primary function.")]
@@ -1041,7 +1041,7 @@ public ProcessorTypeValues ProcessorType {
return ((ProcessorTypeValues)(System.Convert.ToInt32(curObj["ProcessorType"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRevisionNull {
@@ -1054,7 +1054,7 @@ public bool IsRevisionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Revision property specifies the system\'s architecture-dependent revision leve" +
@@ -1069,7 +1069,7 @@ public ushort Revision {
return ((ushort)(curObj["Revision"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A free form string describing the role of the processor - for example, \"Central P" +
@@ -1079,7 +1079,7 @@ public string Role {
return ((string)(curObj["Role"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSecondLevelAddressTranslationExtensionsNull {
@@ -1092,7 +1092,7 @@ public bool IsSecondLevelAddressTranslationExtensionsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SecondLevelAddressTranslationExtensions property determines whether the proce" +
@@ -1106,7 +1106,7 @@ public bool SecondLevelAddressTranslationExtensions {
return ((bool)(curObj["SecondLevelAddressTranslationExtensions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The SocketDesignation property contains the type of chip socket used on the circu" +
@@ -1116,7 +1116,7 @@ public string SocketDesignation {
return ((string)(curObj["SocketDesignation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are ""OK"", ""Degraded"" and ""Pred Fail"". ""Pred Fail"" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are ""Error"", ""Starting"", ""Stopping"" and ""Service"". The latter, ""Service"", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither ""OK"" nor in one of the other states.")]
@@ -1125,7 +1125,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStatusInfoNull {
@@ -1138,7 +1138,7 @@ public bool IsStatusInfoNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("StatusInfo is a string indicating whether the logical device is in an enabled (va" +
@@ -1154,7 +1154,7 @@ public StatusInfoValues StatusInfo {
return ((StatusInfoValues)(System.Convert.ToInt32(curObj["StatusInfo"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Stepping is a free-form string indicating the revision level of the processor wit" +
@@ -1164,7 +1164,7 @@ public string Stepping {
return ((string)(curObj["Stepping"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The scoping System\'s CreationClassName.")]
@@ -1173,7 +1173,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The scoping System\'s Name.")]
@@ -1182,7 +1182,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A globally unique identifier for the processor. This identifier may only be uniq" +
@@ -1192,7 +1192,7 @@ public string UniqueId {
return ((string)(curObj["UniqueId"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUpgradeMethodNull {
@@ -1205,7 +1205,7 @@ public bool IsUpgradeMethodNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CPU socket information including data on how this Processor can be upgraded (if u" +
@@ -1219,7 +1219,7 @@ public UpgradeMethodValues UpgradeMethod {
return ((UpgradeMethodValues)(System.Convert.ToInt32(curObj["UpgradeMethod"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Version property specifies an architecture-dependent processor revision numbe" +
@@ -1229,7 +1229,7 @@ public string Version {
return ((string)(curObj["Version"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualizationFirmwareEnabledNull {
@@ -1242,7 +1242,7 @@ public bool IsVirtualizationFirmwareEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The VirtualizationFirmwareEnabled property determines whether the Firmware has en" +
@@ -1256,7 +1256,7 @@ public bool VirtualizationFirmwareEnabled {
return ((bool)(curObj["VirtualizationFirmwareEnabled"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVMMonitorModeExtensionsNull {
@@ -1269,7 +1269,7 @@ public bool IsVMMonitorModeExtensionsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The VMMonitorModeExtensions property determines whether the processor supports In" +
@@ -1283,7 +1283,7 @@ public bool VMMonitorModeExtensions {
return ((bool)(curObj["VMMonitorModeExtensions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVoltageCapsNull {
@@ -1296,7 +1296,7 @@ public bool IsVoltageCapsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The VoltageCaps property specifies the voltage capabilities of the processor. Bits 0-3 of the field represent specific voltages that the processor socket can accept. All other bits should be set to zero. The socket is configurable if multiple bits are being set. For a range of voltages see CurrentVoltage. If the property is NULL, then the voltage capabilities are unknown.")]
@@ -1309,9 +1309,9 @@ public VoltageCapsValues VoltageCaps {
return ((VoltageCapsValues)(System.Convert.ToInt32(curObj["VoltageCaps"])));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1319,9 +1319,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1338,91 +1338,91 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAddressWidth() {
if ((this.IsAddressWidthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeArchitecture() {
if ((this.IsArchitectureNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAvailability() {
if ((this.IsAvailabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConfigManagerErrorCode() {
if ((this.IsConfigManagerErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConfigManagerUserConfig() {
if ((this.IsConfigManagerUserConfigNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCpuStatus() {
if ((this.IsCpuStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCurrentClockSpeed() {
if ((this.IsCurrentClockSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCurrentVoltage() {
if ((this.IsCurrentVoltageNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDataWidth() {
if ((this.IsDataWidthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCleared() {
if ((this.IsErrorClearedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeExtClock() {
if ((this.IsExtClockNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFamily() {
if ((this.IsFamilyNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1474,13 +1474,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1508,7 +1508,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1535,8 +1535,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1546,172 +1546,172 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeL2CacheSize() {
if ((this.IsL2CacheSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeL2CacheSpeed() {
if ((this.IsL2CacheSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeL3CacheSize() {
if ((this.IsL3CacheSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeL3CacheSpeed() {
if ((this.IsL3CacheSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastErrorCode() {
if ((this.IsLastErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLevel() {
if ((this.IsLevelNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLoadPercentage() {
if ((this.IsLoadPercentageNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxClockSpeed() {
if ((this.IsMaxClockSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfCores() {
if ((this.IsNumberOfCoresNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfLogicalProcessors() {
if ((this.IsNumberOfLogicalProcessorsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerManagementSupported() {
if ((this.IsPowerManagementSupportedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProcessorType() {
if ((this.IsProcessorTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRevision() {
if ((this.IsRevisionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSecondLevelAddressTranslationExtensions() {
if ((this.IsSecondLevelAddressTranslationExtensionsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStatusInfo() {
if ((this.IsStatusInfoNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUpgradeMethod() {
if ((this.IsUpgradeMethodNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualizationFirmwareEnabled() {
if ((this.IsVirtualizationFirmwareEnabledNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVMMonitorModeExtensions() {
if ((this.IsVMMonitorModeExtensionsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVoltageCaps() {
if ((this.IsVoltageCapsNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyDeviceID) {
string strPath = "ROOT\\CIMV2:Win32_Processor";
strPath = string.Concat(strPath, string.Concat(".DeviceID=", string.Concat("\"", string.Concat(keyDeviceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1723,24 +1723,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ProcessorCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ProcessorCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ProcessorCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ProcessorCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ProcessorCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1761,15 +1761,15 @@ public static ProcessorCollection GetInstances(System.Management.ManagementScope
}
return new ProcessorCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ProcessorCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ProcessorCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ProcessorCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1786,7 +1786,7 @@ public static ProcessorCollection GetInstances(System.Management.ManagementScope
ObjectSearcher.Options = enumOptions;
return new ProcessorCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static Processor CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1801,12 +1801,12 @@ public static Processor CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new Processor(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint Reset() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1817,7 +1817,7 @@ public uint Reset() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(ushort PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1831,514 +1831,514 @@ public uint SetPowerState(ushort PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
public enum ArchitectureValues {
-
+
X86 = 0,
-
+
MIPS = 1,
-
+
Alpha = 2,
-
+
PowerPC = 3,
-
+
Ia64 = 6,
-
+
X64 = 9,
-
+
NULL_ENUM_VALUE = 10,
}
-
+
public enum AvailabilityValues {
-
+
Other0 = 1,
-
+
Unknown0 = 2,
-
+
Running_Full_Power = 3,
-
+
Warning = 4,
-
+
In_Test = 5,
-
+
Not_Applicable = 6,
-
+
Power_Off = 7,
-
+
Off_Line = 8,
-
+
Off_Duty = 9,
-
+
Degraded = 10,
-
+
Not_Installed = 11,
-
+
Install_Error = 12,
-
+
Power_Save_Unknown = 13,
-
+
Power_Save_Low_Power_Mode = 14,
-
+
Power_Save_Standby = 15,
-
+
Power_Cycle = 16,
-
+
Power_Save_Warning = 17,
-
+
Paused = 18,
-
+
Not_Ready = 19,
-
+
Not_Configured = 20,
-
+
Quiesced = 21,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum ConfigManagerErrorCodeValues {
-
+
This_device_is_working_properly_ = 0,
-
+
This_device_is_not_configured_correctly_ = 1,
-
+
Windows_cannot_load_the_driver_for_this_device_ = 2,
-
+
The_driver_for_this_device_might_be_corrupted_or_your_system_may_be_running_low_on_memory_or_other_resources_ = 3,
-
+
This_device_is_not_working_properly_One_of_its_drivers_or_your_registry_might_be_corrupted_ = 4,
-
+
The_driver_for_this_device_needs_a_resource_that_Windows_cannot_manage_ = 5,
-
+
The_boot_configuration_for_this_device_conflicts_with_other_devices_ = 6,
-
+
Cannot_filter_ = 7,
-
+
The_driver_loader_for_the_device_is_missing_ = 8,
-
+
This_device_is_not_working_properly_because_the_controlling_firmware_is_reporting_the_resources_for_the_device_incorrectly_ = 9,
-
+
This_device_cannot_start_ = 10,
-
+
This_device_failed_ = 11,
-
+
This_device_cannot_find_enough_free_resources_that_it_can_use_ = 12,
-
+
Windows_cannot_verify_this_device_s_resources_ = 13,
-
+
This_device_cannot_work_properly_until_you_restart_your_computer_ = 14,
-
+
This_device_is_not_working_properly_because_there_is_probably_a_re_enumeration_problem_ = 15,
-
+
Windows_cannot_identify_all_the_resources_this_device_uses_ = 16,
-
+
This_device_is_asking_for_an_unknown_resource_type_ = 17,
-
+
Reinstall_the_drivers_for_this_device_ = 18,
-
+
Failure_using_the_VxD_loader_ = 19,
-
+
Your_registry_might_be_corrupted_ = 20,
-
+
System_failure_Try_changing_the_driver_for_this_device_If_that_does_not_work_see_your_hardware_documentation_Windows_is_removing_this_device_ = 21,
-
+
This_device_is_disabled_ = 22,
-
+
System_failure_Try_changing_the_driver_for_this_device_If_that_doesn_t_work_see_your_hardware_documentation_ = 23,
-
+
This_device_is_not_present_is_not_working_properly_or_does_not_have_all_its_drivers_installed_ = 24,
-
+
Windows_is_still_setting_up_this_device_ = 25,
-
+
Windows_is_still_setting_up_this_device_0 = 26,
-
+
This_device_does_not_have_valid_log_configuration_ = 27,
-
+
The_drivers_for_this_device_are_not_installed_ = 28,
-
+
This_device_is_disabled_because_the_firmware_of_the_device_did_not_give_it_the_required_resources_ = 29,
-
+
This_device_is_using_an_Interrupt_Request_IRQ_resource_that_another_device_is_using_ = 30,
-
+
This_device_is_not_working_properly_because_Windows_cannot_load_the_drivers_required_for_this_device_ = 31,
-
+
NULL_ENUM_VALUE = 32,
}
-
+
public enum CpuStatusValues {
-
+
Unknown0 = 0,
-
+
CPU_Enabled = 1,
-
+
CPU_Disabled_by_User_via_BIOS_Setup = 2,
-
+
CPU_Disabled_By_BIOS_POST_Error_ = 3,
-
+
CPU_is_Idle = 4,
-
+
Reserved = 5,
-
+
Reserved0 = 6,
-
+
Other0 = 7,
-
+
NULL_ENUM_VALUE = 8,
}
-
+
public enum FamilyValues {
-
+
Other0 = 1,
-
+
Unknown0 = 2,
-
+
Val_8086 = 3,
-
+
Val_80286 = 4,
-
+
Val_80386 = 5,
-
+
Val_80486 = 6,
-
+
Val_8087 = 7,
-
+
Val_80287 = 8,
-
+
Val_80387 = 9,
-
+
Val_80487 = 10,
-
+
Pentium_R_brand = 11,
-
+
Pentium_R_Pro = 12,
-
+
Pentium_R_II = 13,
-
+
Pentium_R_processor_with_MMX_TM_technology = 14,
-
+
Celeron_TM_ = 15,
-
+
Pentium_R_II_Xeon_TM_ = 16,
-
+
Pentium_R_III = 17,
-
+
M1_Family = 18,
-
+
M2_Family = 19,
-
+
K5_Family = 24,
-
+
K6_Family = 25,
-
+
K6_2 = 26,
-
+
K6_3 = 27,
-
+
AMD_Athlon_TM_Processor_Family = 28,
-
+
AMD_R_Duron_TM_Processor = 29,
-
+
AMD29000_Family = 30,
-
+
K6_2_ = 31,
-
+
Power_PC_Family = 32,
-
+
Power_PC_601 = 33,
-
+
Power_PC_603 = 34,
-
+
Power_PC_603_ = 35,
-
+
Power_PC_604 = 36,
-
+
Power_PC_620 = 37,
-
+
Power_PC_X704 = 38,
-
+
Power_PC_750 = 39,
-
+
Alpha_Family = 48,
-
+
Alpha_21064 = 49,
-
+
Alpha_21066 = 50,
-
+
Alpha_21164 = 51,
-
+
Alpha_21164PC = 52,
-
+
Alpha_21164a = 53,
-
+
Alpha_21264 = 54,
-
+
Alpha_21364 = 55,
-
+
MIPS_Family = 64,
-
+
MIPS_R4000 = 65,
-
+
MIPS_R4200 = 66,
-
+
MIPS_R4400 = 67,
-
+
MIPS_R4600 = 68,
-
+
MIPS_R10000 = 69,
-
+
SPARC_Family = 80,
-
+
SuperSPARC = 81,
-
+
MicroSPARC_II = 82,
-
+
MicroSPARC_IIep = 83,
-
+
UltraSPARC = 84,
-
+
UltraSPARC_II = 85,
-
+
UltraSPARC_IIi = 86,
-
+
UltraSPARC_III0 = 87,
-
+
UltraSPARC_IIIi = 88,
-
+
Val_68040 = 96,
-
+
Val_68xxx_Family = 97,
-
+
Val_68000 = 98,
-
+
Val_68010 = 99,
-
+
Val_68020 = 100,
-
+
Val_68030 = 101,
-
+
Hobbit_Family = 112,
-
+
Crusoe_TM_TM5000_Family = 120,
-
+
Crusoe_TM_TM3000_Family = 121,
-
+
Efficeon_TM_TM8000_Family = 122,
-
+
Weitek = 128,
-
+
Itanium_TM_Processor = 130,
-
+
AMD_Athlon_TM_64_Processor_Family = 131,
-
+
AMD_Opteron_TM_Family = 132,
-
+
PA_RISC_Family = 144,
-
+
PA_RISC_8500 = 145,
-
+
PA_RISC_8000 = 146,
-
+
PA_RISC_7300LC = 147,
-
+
PA_RISC_7200 = 148,
-
+
PA_RISC_7100LC = 149,
-
+
PA_RISC_7100 = 150,
-
+
V30_Family = 160,
-
+
Pentium_R_III_Xeon_TM_ = 176,
-
+
Pentium_R_III_Processor_with_Intel_R_SpeedStep_TM_Technology = 177,
-
+
Pentium_R_4 = 178,
-
+
Intel_R_Xeon_TM_ = 179,
-
+
AS400_Family = 180,
-
+
Intel_R_Xeon_TM_processor_MP = 181,
-
+
AMD_AthlonXP_TM_Family = 182,
-
+
AMD_AthlonMP_TM_Family = 183,
-
+
Intel_R_Itanium_R_2 = 184,
-
+
Intel_Pentium_M_Processor = 185,
-
+
K7 = 190,
-
+
IBM390_Family = 200,
-
+
G4 = 201,
-
+
G5 = 202,
-
+
G6 = 203,
-
+
Z_Architecture_base = 204,
-
+
I860 = 250,
-
+
I960 = 251,
-
+
SH_3 = 260,
-
+
SH_4 = 261,
-
+
ARM = 280,
-
+
StrongARM = 281,
-
+
Val_6x86 = 300,
-
+
MediaGX = 301,
-
+
MII = 302,
-
+
WinChip = 320,
-
+
DSP = 350,
-
+
Video_Processor = 500,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum PowerManagementCapabilitiesValues {
-
+
Unknown0 = 0,
-
+
Not_Supported = 1,
-
+
Disabled = 2,
-
+
Enabled = 3,
-
+
Power_Saving_Modes_Entered_Automatically = 4,
-
+
Power_State_Settable = 5,
-
+
Power_Cycling_Supported = 6,
-
+
Timed_Power_On_Supported = 7,
-
+
NULL_ENUM_VALUE = 8,
}
-
+
public enum ProcessorTypeValues {
-
+
Other0 = 1,
-
+
Unknown0 = 2,
-
+
Central_Processor = 3,
-
+
Math_Processor = 4,
-
+
DSP_Processor = 5,
-
+
Video_Processor = 6,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum StatusInfoValues {
-
+
Other0 = 1,
-
+
Unknown0 = 2,
-
+
Enabled = 3,
-
+
Disabled = 4,
-
+
Not_Applicable = 5,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum UpgradeMethodValues {
-
+
Other0 = 1,
-
+
Unknown0 = 2,
-
+
Daughter_Board = 3,
-
+
ZIF_Socket = 4,
-
+
Replacement_Piggy_Back = 5,
-
+
None = 6,
-
+
LIF_Socket = 7,
-
+
Slot_1 = 8,
-
+
Slot_2 = 9,
-
+
Val_370_Pin_Socket = 10,
-
+
Slot_A = 11,
-
+
Slot_M = 12,
-
+
Socket_423 = 13,
-
+
Socket_A_Socket_462_ = 14,
-
+
Socket_478 = 15,
-
+
Socket_754 = 16,
-
+
Socket_940 = 17,
-
+
Socket_939 = 18,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum VoltageCapsValues {
-
+
Val_5 = 1,
-
+
Val_3_3 = 2,
-
+
Val_2_9 = 4,
-
+
NULL_ENUM_VALUE = 8,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ProcessorCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ProcessorCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -2346,189 +2346,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new Processor(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ProcessorEnumerator(privColObj.GetEnumerator());
}
-
+
public class ProcessorEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ProcessorEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new Processor(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs
index 76057138f712..012b33bc67f8 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_ComputerSystem
public class ComputerSystem : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_ComputerSystem";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ComputerSystem() {
this.InitializeObject(null, null, null);
}
-
+
public ComputerSystem(string keyCreationClassName, string keyName) {
this.InitializeObject(null, new System.Management.ManagementPath(ComputerSystem.ConstructPath(keyCreationClassName, keyName)), null);
}
-
+
public ComputerSystem(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ComputerSystem.ConstructPath(keyCreationClassName, keyName)), null);
}
-
+
public ComputerSystem(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ComputerSystem(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ComputerSystem(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ComputerSystem(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ComputerSystem(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public ComputerSystem(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ComputerSystem(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public ComputerSystem(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -229,7 +229,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -237,7 +237,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -250,7 +250,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -262,7 +262,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -270,7 +270,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] Dedicated {
@@ -278,7 +278,7 @@ public ushort[] Dedicated {
return ((ushort[])(curObj["Dedicated"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -286,7 +286,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -299,7 +299,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -311,7 +311,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -319,7 +319,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -332,7 +332,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -344,7 +344,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -357,7 +357,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -369,7 +369,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFailedOverReplicationTypeNull {
@@ -382,7 +382,7 @@ public bool IsFailedOverReplicationTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Type of failover that was performed for the virtual machine.")]
@@ -395,7 +395,7 @@ public FailedOverReplicationTypeValues FailedOverReplicationType {
return ((FailedOverReplicationTypeValues)(System.Convert.ToInt32(curObj["FailedOverReplicationType"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -408,7 +408,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -420,7 +420,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -428,7 +428,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -441,7 +441,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -455,7 +455,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -463,7 +463,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastApplicationConsistentReplicationTimeNull {
@@ -476,7 +476,7 @@ public bool IsLastApplicationConsistentReplicationTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The time at which the last application consistent replication is received on reco" +
@@ -492,7 +492,7 @@ public System.DateTime LastApplicationConsistentReplicationTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastReplicationTimeNull {
@@ -505,7 +505,7 @@ public bool IsLastReplicationTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The time at which the last replication is received on recovery for the virtual ma" +
@@ -521,7 +521,7 @@ public System.DateTime LastReplicationTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastReplicationTypeNull {
@@ -534,7 +534,7 @@ public bool IsLastReplicationTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Type of the last replication that was received for the virtual machine.")]
@@ -547,7 +547,7 @@ public LastReplicationTypeValues LastReplicationType {
return ((LastReplicationTypeValues)(System.Convert.ToInt32(curObj["LastReplicationType"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastSuccessfulBackupTimeNull {
@@ -560,7 +560,7 @@ public bool IsLastSuccessfulBackupTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The time at which the last successful backup has completed for the virtual machin" +
@@ -576,7 +576,7 @@ public System.DateTime LastSuccessfulBackupTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -584,7 +584,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string NameFormat {
@@ -592,7 +592,7 @@ public string NameFormat {
return ((string)(curObj["NameFormat"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfNumaNodesNull {
@@ -605,7 +605,7 @@ public bool IsNumberOfNumaNodesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The number of non-uniform memory access (NUMA) nodes of the computer system. When Msvm_ComputerSystem represents the hosting computer system, this property contains the count of physical NUMA nodes. When Msvm_ComputerSystem represents a virtual computer system, this property contains the number of virtual NUMA nodes that are presented to the guest OS through the ACPI System Resource Affinity Table (SRAT).")]
@@ -618,7 +618,7 @@ public ushort NumberOfNumaNodes {
return ((ushort)(curObj["NumberOfNumaNodes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOnTimeInMillisecondsNull {
@@ -631,7 +631,7 @@ public bool IsOnTimeInMillisecondsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"For the virtual system, this property describes the total up time, in milliseconds, since the machine was last turned on, reset, or restored. This time excludes the time the virtual system was in the paused state. For the host system, this property is set to NULL.")]
@@ -644,7 +644,7 @@ public ulong OnTimeInMilliseconds {
return ((ulong)(curObj["OnTimeInMilliseconds"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -657,7 +657,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -669,7 +669,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -677,7 +677,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherDedicatedDescriptions {
@@ -685,7 +685,7 @@ public string[] OtherDedicatedDescriptions {
return ((string[])(curObj["OtherDedicatedDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -693,7 +693,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -701,7 +701,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -709,7 +709,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -717,7 +717,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -725,7 +725,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -738,7 +738,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -750,7 +750,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProcessIDNull {
@@ -763,7 +763,7 @@ public bool IsProcessIDNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The identifier of the process under which this virtual machine is running. This v" +
@@ -778,7 +778,7 @@ public uint ProcessID {
return ((uint)(curObj["ProcessID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationHealthNull {
@@ -791,7 +791,7 @@ public bool IsReplicationHealthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Replication health for the virtual machine.")]
@@ -804,7 +804,7 @@ public ReplicationHealthValues ReplicationHealth {
return ((ReplicationHealthValues)(System.Convert.ToInt32(curObj["ReplicationHealth"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationModeNull {
@@ -817,7 +817,7 @@ public bool IsReplicationModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Identifies replication type for the virtual machine.")]
@@ -830,7 +830,7 @@ public ReplicationModeValues ReplicationMode {
return ((ReplicationModeValues)(System.Convert.ToInt32(curObj["ReplicationMode"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationStateNull {
@@ -843,7 +843,7 @@ public bool IsReplicationStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Replication state for the virtual machine.")]
@@ -856,7 +856,7 @@ public ReplicationStateValues ReplicationState {
return ((ReplicationStateValues)(System.Convert.ToInt32(curObj["ReplicationState"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -869,7 +869,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -881,7 +881,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResetCapabilityNull {
@@ -894,7 +894,7 @@ public bool IsResetCapabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -906,7 +906,7 @@ public ushort ResetCapability {
return ((ushort)(curObj["ResetCapability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Roles {
@@ -914,7 +914,7 @@ public string[] Roles {
return ((string[])(curObj["Roles"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -922,7 +922,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -930,7 +930,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastConfigurationChangeNull {
@@ -943,7 +943,7 @@ public bool IsTimeOfLastConfigurationChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The date and time when the virtual machine configuration file was last modified. " +
@@ -961,7 +961,7 @@ public System.DateTime TimeOfLastConfigurationChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -974,7 +974,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -988,7 +988,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -1001,7 +1001,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1013,9 +1013,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1023,9 +1023,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1042,49 +1042,49 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFailedOverReplicationType() {
if ((this.IsFailedOverReplicationTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1136,13 +1136,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1170,7 +1170,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1197,8 +1197,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1208,159 +1208,159 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastApplicationConsistentReplicationTime() {
if ((this.IsLastApplicationConsistentReplicationTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastReplicationTime() {
if ((this.IsLastReplicationTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastReplicationType() {
if ((this.IsLastReplicationTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastSuccessfulBackupTime() {
if ((this.IsLastSuccessfulBackupTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfNumaNodes() {
if ((this.IsNumberOfNumaNodesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOnTimeInMilliseconds() {
if ((this.IsOnTimeInMillisecondsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProcessID() {
if ((this.IsProcessIDNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationHealth() {
if ((this.IsReplicationHealthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationMode() {
if ((this.IsReplicationModeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationState() {
if ((this.IsReplicationStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResetCapability() {
if ((this.IsResetCapabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastConfigurationChange() {
if ((this.IsTimeOfLastConfigurationChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ComputerSystem";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
strPath = string.Concat(strPath, string.Concat(",Name=", string.Concat("\"", string.Concat(keyName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1372,24 +1372,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ComputerSystemCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ComputerSystemCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ComputerSystemCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ComputerSystemCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ComputerSystemCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1410,15 +1410,15 @@ public static ComputerSystemCollection GetInstances(System.Management.Management
}
return new ComputerSystemCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ComputerSystemCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ComputerSystemCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ComputerSystemCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1435,7 +1435,7 @@ public static ComputerSystemCollection GetInstances(System.Management.Management
ObjectSearcher.Options = enumOptions;
return new ComputerSystemCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ComputerSystem CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1450,12 +1450,12 @@ public static ComputerSystem CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ComputerSystem(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint RequestReplicationStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1474,7 +1474,7 @@ public uint RequestReplicationStateChange(ushort RequestedState, System.DateTime
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1494,7 +1494,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(uint PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1508,115 +1508,115 @@ public uint SetPowerState(uint PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
public enum FailedOverReplicationTypeValues {
-
+
None = 0,
-
+
Regular = 1,
-
+
Application_consistent = 2,
-
+
Planned = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum LastReplicationTypeValues {
-
+
None = 0,
-
+
Regular = 1,
-
+
Application_consistent = 2,
-
+
Planned = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum ReplicationHealthValues {
-
+
Not_applicable = 0,
-
+
Ok = 1,
-
+
Warning = 2,
-
+
Critical = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum ReplicationModeValues {
-
+
None = 0,
-
+
Primary = 1,
-
+
Recovery = 2,
-
+
Test_Replica = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum ReplicationStateValues {
-
+
Disabled = 0,
-
+
Ready_for_replication = 1,
-
+
Waiting_to_complete_initial_replication = 2,
-
+
Replicating = 3,
-
+
Synced_replication_complete = 4,
-
+
Recovered = 5,
-
+
Committed = 6,
-
+
Suspended = 7,
-
+
Critical = 8,
-
+
Waiting_to_start_resynchronization = 9,
-
+
Resynchronizing = 10,
-
+
Resynchronization_suspended = 11,
-
+
NULL_ENUM_VALUE = 12,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ComputerSystemCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ComputerSystemCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1624,189 +1624,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ComputerSystem(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ComputerSystemEnumerator(privColObj.GetEnumerator());
}
-
+
public class ComputerSystemEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ComputerSystemEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ComputerSystem(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs
index 823e41482bcd..931d7a648eb7 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -33,62 +33,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_ConcreteJob
public class ConcreteJob : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_ConcreteJob";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ConcreteJob() {
this.InitializeObject(null, null, null);
}
-
+
public ConcreteJob(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(ConcreteJob.ConstructPath(keyInstanceID)), null);
}
-
+
public ConcreteJob(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ConcreteJob.ConstructPath(keyInstanceID)), null);
}
-
+
public ConcreteJob(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ConcreteJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ConcreteJob(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ConcreteJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ConcreteJob(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -100,7 +100,7 @@ public ConcreteJob(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ConcreteJob(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -113,7 +113,7 @@ public ConcreteJob(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -122,7 +122,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -131,7 +131,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -140,7 +140,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -149,7 +149,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -158,7 +158,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -177,7 +177,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -189,7 +189,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -210,7 +210,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -222,7 +222,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCancellableNull {
@@ -235,7 +235,7 @@ public bool IsCancellableNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the job can be cancelled. The value of this property does not g" +
@@ -249,7 +249,7 @@ public bool Cancellable {
return ((bool)(curObj["Cancellable"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -257,7 +257,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -270,7 +270,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -282,7 +282,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDeleteOnCompletionNull {
@@ -295,7 +295,7 @@ public bool IsDeleteOnCompletionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -307,7 +307,7 @@ public bool DeleteOnCompletion {
return ((bool)(curObj["DeleteOnCompletion"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -315,7 +315,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -328,7 +328,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -340,7 +340,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsElapsedTimeNull {
@@ -353,7 +353,7 @@ public bool IsElapsedTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -367,7 +367,7 @@ public System.TimeSpan ElapsedTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -375,7 +375,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorCodeNull {
@@ -388,7 +388,7 @@ public bool IsErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -400,7 +400,7 @@ public ushort ErrorCode {
return ((ushort)(curObj["ErrorCode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -408,7 +408,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorSummaryDescription {
@@ -416,7 +416,7 @@ public string ErrorSummaryDescription {
return ((string)(curObj["ErrorSummaryDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -429,7 +429,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -441,7 +441,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -454,7 +454,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -468,7 +468,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -476,7 +476,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobRunTimesNull {
@@ -489,7 +489,7 @@ public bool IsJobRunTimesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -501,7 +501,7 @@ public uint JobRunTimes {
return ((uint)(curObj["JobRunTimes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobStateNull {
@@ -514,7 +514,7 @@ public bool IsJobStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -526,7 +526,7 @@ public ushort JobState {
return ((ushort)(curObj["JobState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string JobStatus {
@@ -534,7 +534,7 @@ public string JobStatus {
return ((string)(curObj["JobStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobTypeNull {
@@ -547,7 +547,7 @@ public bool IsJobTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates the type of Job being tracked by this object.")]
@@ -560,7 +560,7 @@ public ushort JobType {
return ((ushort)(curObj["JobType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLocalOrUtcTimeNull {
@@ -573,7 +573,7 @@ public bool IsLocalOrUtcTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -585,7 +585,7 @@ public ushort LocalOrUtcTime {
return ((ushort)(curObj["LocalOrUtcTime"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -593,7 +593,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Notify {
@@ -601,7 +601,7 @@ public string Notify {
return ((string)(curObj["Notify"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -614,7 +614,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -626,7 +626,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -634,7 +634,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherRecoveryAction {
@@ -642,7 +642,7 @@ public string OtherRecoveryAction {
return ((string)(curObj["OtherRecoveryAction"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Owner {
@@ -650,7 +650,7 @@ public string Owner {
return ((string)(curObj["Owner"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentCompleteNull {
@@ -663,7 +663,7 @@ public bool IsPercentCompleteNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -675,7 +675,7 @@ public ushort PercentComplete {
return ((ushort)(curObj["PercentComplete"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -688,7 +688,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -700,7 +700,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPriorityNull {
@@ -713,7 +713,7 @@ public bool IsPriorityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -725,7 +725,7 @@ public uint Priority {
return ((uint)(curObj["Priority"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRecoveryActionNull {
@@ -738,7 +738,7 @@ public bool IsRecoveryActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -750,7 +750,7 @@ public ushort RecoveryAction {
return ((ushort)(curObj["RecoveryAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayNull {
@@ -763,7 +763,7 @@ public bool IsRunDayNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -775,7 +775,7 @@ public sbyte RunDay {
return ((sbyte)(curObj["RunDay"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayOfWeekNull {
@@ -788,7 +788,7 @@ public bool IsRunDayOfWeekNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -800,7 +800,7 @@ public sbyte RunDayOfWeek {
return ((sbyte)(curObj["RunDayOfWeek"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunMonthNull {
@@ -813,7 +813,7 @@ public bool IsRunMonthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -825,7 +825,7 @@ public byte RunMonth {
return ((byte)(curObj["RunMonth"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunStartIntervalNull {
@@ -838,7 +838,7 @@ public bool IsRunStartIntervalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -852,7 +852,7 @@ public System.TimeSpan RunStartInterval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsScheduledStartTimeNull {
@@ -865,7 +865,7 @@ public bool IsScheduledStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -879,7 +879,7 @@ public System.DateTime ScheduledStartTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartTimeNull {
@@ -892,7 +892,7 @@ public bool IsStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -906,7 +906,7 @@ public System.DateTime StartTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -914,7 +914,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -922,7 +922,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeBeforeRemovalNull {
@@ -935,7 +935,7 @@ public bool IsTimeBeforeRemovalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -949,7 +949,7 @@ public System.TimeSpan TimeBeforeRemoval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -962,7 +962,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -976,7 +976,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeSubmittedNull {
@@ -989,7 +989,7 @@ public bool IsTimeSubmittedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1003,7 +1003,7 @@ public System.DateTime TimeSubmitted {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUntilTimeNull {
@@ -1016,7 +1016,7 @@ public bool IsUntilTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1030,9 +1030,9 @@ public System.DateTime UntilTime {
}
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1040,9 +1040,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1059,21 +1059,21 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCancellable() {
if ((this.IsCancellableNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given time interval in DMTF format to System.TimeSpan object.
static System.TimeSpan ToTimeSpan(string dmtfTimespan) {
int days = 0;
@@ -1114,7 +1114,7 @@ static System.TimeSpan ToTimeSpan(string dmtfTimespan) {
timespan = timespan.Add(tsTemp);
return timespan;
}
-
+
// Converts a given System.TimeSpan object to DMTF Time interval format.
static string ToDmtfTimeInterval(System.TimeSpan timespan) {
string dmtftimespan = ((int)(timespan.Days)).ToString().PadLeft(8, '0');
@@ -1131,8 +1131,8 @@ static string ToDmtfTimeInterval(System.TimeSpan timespan) {
dmtftimespan = string.Concat(dmtftimespan, ((int)(timespan.Seconds)).ToString().PadLeft(2, '0'));
dmtftimespan = string.Concat(dmtftimespan, ".");
System.TimeSpan tsTemp = new System.TimeSpan(timespan.Days, timespan.Hours, timespan.Minutes, timespan.Seconds, 0);
- long microsec = ((long)((((timespan.Ticks - tsTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((timespan.Ticks - tsTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicroSec = ((long)(microsec)).ToString();
if ((strMicroSec.Length > 6)) {
@@ -1142,21 +1142,21 @@ static string ToDmtfTimeInterval(System.TimeSpan timespan) {
dmtftimespan = string.Concat(dmtftimespan, ":000");
return dmtftimespan;
}
-
+
private bool ShouldSerializeDeleteOnCompletion() {
if ((this.IsDeleteOnCompletionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1208,13 +1208,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1242,7 +1242,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1269,8 +1269,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1280,193 +1280,193 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeElapsedTime() {
if ((this.IsElapsedTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCode() {
if ((this.IsErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobRunTimes() {
if ((this.IsJobRunTimesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobState() {
if ((this.IsJobStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobType() {
if ((this.IsJobTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLocalOrUtcTime() {
if ((this.IsLocalOrUtcTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentComplete() {
if ((this.IsPercentCompleteNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePriority() {
if ((this.IsPriorityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRecoveryAction() {
if ((this.IsRecoveryActionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDay() {
if ((this.IsRunDayNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDayOfWeek() {
if ((this.IsRunDayOfWeekNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunMonth() {
if ((this.IsRunMonthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunStartInterval() {
if ((this.IsRunStartIntervalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeScheduledStartTime() {
if ((this.IsScheduledStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStartTime() {
if ((this.IsStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeBeforeRemoval() {
if ((this.IsTimeBeforeRemovalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeSubmitted() {
if ((this.IsTimeSubmittedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUntilTime() {
if ((this.IsUntilTimeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ConcreteJob";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1478,24 +1478,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ConcreteJobCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ConcreteJobCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ConcreteJobCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ConcreteJobCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ConcreteJobCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1516,15 +1516,15 @@ public static ConcreteJobCollection GetInstances(System.Management.ManagementSco
}
return new ConcreteJobCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ConcreteJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ConcreteJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ConcreteJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1541,7 +1541,7 @@ public static ConcreteJobCollection GetInstances(System.Management.ManagementSco
ObjectSearcher.Options = enumOptions;
return new ConcreteJobCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ConcreteJob CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1556,12 +1556,12 @@ public static ConcreteJob CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ConcreteJob(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint GetError(out string Error) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1574,7 +1574,7 @@ public uint GetError(out string Error) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetErrorEx(out string[] Errors) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1587,7 +1587,7 @@ public uint GetErrorEx(out string[] Errors) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint KillJob(bool DeleteOnKill) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1600,7 +1600,7 @@ public uint KillJob(bool DeleteOnKill) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.TimeSpan TimeoutPeriod) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1614,34 +1614,34 @@ public uint RequestStateChange(ushort RequestedState, System.TimeSpan TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ConcreteJobCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ConcreteJobCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1649,189 +1649,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ConcreteJob(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ConcreteJobEnumerator(privColObj.GetEnumerator());
}
-
+
public class ConcreteJobEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ConcreteJobEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ConcreteJob(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs
index f281def4b10c..680a57f53c31 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_EthernetPortAllocationSettingData
public class EthernetPortAllocationSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_EthernetPortAllocationSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public EthernetPortAllocationSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public EthernetPortAllocationSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(EthernetPortAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(EthernetPortAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public EthernetPortAllocationSettingData(System.Management.ManagementObject theO
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public EthernetPortAllocationSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public EthernetPortAllocationSettingData(System.Management.ManagementBaseObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -228,7 +228,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -236,7 +236,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -244,7 +244,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -257,7 +257,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -269,7 +269,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -282,7 +282,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -294,7 +294,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -302,7 +302,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -310,7 +310,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -323,7 +323,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -335,7 +335,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -343,7 +343,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDesiredVLANEndpointModeNull {
@@ -356,7 +356,7 @@ public bool IsDesiredVLANEndpointModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -368,7 +368,7 @@ public ushort DesiredVLANEndpointMode {
return ((ushort)(curObj["DesiredVLANEndpointMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -376,7 +376,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -389,7 +389,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"EnabledState is an integer enumeration that indicates whether the allocation request is enabled or disabled. When an allocation request is marked as Disabled (3), then the allocation is not processed. The EnabledState for an active configuration is always marked as Enabled (2).")]
@@ -402,7 +402,7 @@ public EnabledStateValues EnabledState {
return ((EnabledStateValues)(System.Convert.ToInt32(curObj["EnabledState"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -410,7 +410,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -418,7 +418,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -431,7 +431,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -443,7 +443,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -456,7 +456,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -468,7 +468,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEndpointMode {
@@ -476,7 +476,7 @@ public string OtherEndpointMode {
return ((string)(curObj["OtherEndpointMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -484,7 +484,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -492,7 +492,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -500,7 +500,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The list of friendly names corresponding to each entry in the RequiredFeatures.")]
@@ -509,7 +509,7 @@ public string[] RequiredFeatureHints {
return ((string[])(curObj["RequiredFeatureHints"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The list of feature identifers representing all the features that are required fo" +
@@ -520,13 +520,13 @@ public string[] RequiredFeatures {
}
set {
curObj["RequiredFeatures"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -539,7 +539,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -551,7 +551,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -559,7 +559,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -572,7 +572,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -584,7 +584,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("This property specifies the network resource pool from which a connection will be" +
@@ -595,13 +595,13 @@ public string TestReplicaPoolID {
}
set {
curObj["TestReplicaPoolID"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("This property specifies the friendly name of the virtual network switch to which " +
@@ -612,13 +612,13 @@ public string TestReplicaSwitchName {
}
set {
curObj["TestReplicaSwitchName"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -631,7 +631,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -643,7 +643,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -651,7 +651,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -664,7 +664,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -676,9 +676,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -686,9 +686,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -705,133 +705,133 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDesiredVLANEndpointMode() {
if ((this.IsDesiredVLANEndpointModeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private void ResetRequiredFeatures() {
curObj["RequiredFeatures"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetTestReplicaPoolID() {
curObj["TestReplicaPoolID"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetTestReplicaSwitchName() {
curObj["TestReplicaSwitchName"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_EthernetPortAllocationSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -843,24 +843,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static EthernetPortAllocationSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -881,15 +881,15 @@ public static EthernetPortAllocationSettingDataCollection GetInstances(System.Ma
}
return new EthernetPortAllocationSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static EthernetPortAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -906,7 +906,7 @@ public static EthernetPortAllocationSettingDataCollection GetInstances(System.Ma
ObjectSearcher.Options = enumOptions;
return new EthernetPortAllocationSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static EthernetPortAllocationSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -921,48 +921,48 @@ public static EthernetPortAllocationSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new EthernetPortAllocationSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum EnabledStateValues {
-
+
Enabled = 2,
-
+
Disabled = 3,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class EthernetPortAllocationSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public EthernetPortAllocationSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -970,189 +970,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new EthernetPortAllocationSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new EthernetPortAllocationSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class EthernetPortAllocationSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public EthernetPortAllocationSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new EthernetPortAllocationSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs
index 5bc97f864bbf..b33b3a5890a4 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_EthernetSwitchPort
public class EthernetSwitchPort : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_EthernetSwitchPort";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public EthernetSwitchPort() {
this.InitializeObject(null, null, null);
}
-
+
public EthernetSwitchPort(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(EthernetSwitchPort.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public EthernetSwitchPort(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(EthernetSwitchPort.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public EthernetSwitchPort(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public EthernetSwitchPort(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public EthernetSwitchPort(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public EthernetSwitchPort(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public EthernetSwitchPort(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public EthernetSwitchPort(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public EthernetSwitchPort(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public EthernetSwitchPort(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsActiveMaximumTransmissionUnitNull {
@@ -234,7 +234,7 @@ public bool IsActiveMaximumTransmissionUnitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -246,7 +246,7 @@ public ulong ActiveMaximumTransmissionUnit {
return ((ulong)(curObj["ActiveMaximumTransmissionUnit"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AdditionalAvailability {
@@ -254,7 +254,7 @@ public ushort[] AdditionalAvailability {
return ((ushort[])(curObj["AdditionalAvailability"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutoSenseNull {
@@ -267,7 +267,7 @@ public bool IsAutoSenseNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -279,7 +279,7 @@ public bool AutoSense {
return ((bool)(curObj["AutoSense"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailabilityNull {
@@ -292,7 +292,7 @@ public bool IsAvailabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -304,7 +304,7 @@ public ushort Availability {
return ((ushort)(curObj["Availability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -312,7 +312,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] Capabilities {
@@ -320,7 +320,7 @@ public ushort[] Capabilities {
return ((ushort[])(curObj["Capabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] CapabilityDescriptions {
@@ -328,7 +328,7 @@ public string[] CapabilityDescriptions {
return ((string[])(curObj["CapabilityDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -336,7 +336,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -349,7 +349,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -361,7 +361,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -369,7 +369,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -377,7 +377,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -390,7 +390,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -402,7 +402,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string DeviceID {
@@ -410,7 +410,7 @@ public string DeviceID {
return ((string)(curObj["DeviceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -418,7 +418,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] EnabledCapabilities {
@@ -426,7 +426,7 @@ public ushort[] EnabledCapabilities {
return ((ushort[])(curObj["EnabledCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -439,7 +439,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -451,7 +451,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -464,7 +464,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -476,7 +476,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorClearedNull {
@@ -489,7 +489,7 @@ public bool IsErrorClearedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -501,7 +501,7 @@ public bool ErrorCleared {
return ((bool)(curObj["ErrorCleared"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -509,7 +509,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFullDuplexNull {
@@ -522,7 +522,7 @@ public bool IsFullDuplexNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -534,7 +534,7 @@ public bool FullDuplex {
return ((bool)(curObj["FullDuplex"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -547,7 +547,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -559,7 +559,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -567,7 +567,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -580,7 +580,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -594,7 +594,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -602,7 +602,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIOVOffloadUsageNull {
@@ -615,7 +615,7 @@ public bool IsIOVOffloadUsageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current I/O virtualization (IOV) offload usage on this port. The usage is the" +
@@ -629,7 +629,7 @@ public uint IOVOffloadUsage {
return ((uint)(curObj["IOVOffloadUsage"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastErrorCodeNull {
@@ -642,7 +642,7 @@ public bool IsLastErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -654,7 +654,7 @@ public uint LastErrorCode {
return ((uint)(curObj["LastErrorCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLinkTechnologyNull {
@@ -667,7 +667,7 @@ public bool IsLinkTechnologyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -679,7 +679,7 @@ public ushort LinkTechnology {
return ((ushort)(curObj["LinkTechnology"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxDataSizeNull {
@@ -692,7 +692,7 @@ public bool IsMaxDataSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -704,7 +704,7 @@ public uint MaxDataSize {
return ((uint)(curObj["MaxDataSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxQuiesceTimeNull {
@@ -717,7 +717,7 @@ public bool IsMaxQuiesceTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -729,7 +729,7 @@ public ulong MaxQuiesceTime {
return ((ulong)(curObj["MaxQuiesceTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxSpeedNull {
@@ -742,7 +742,7 @@ public bool IsMaxSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -754,7 +754,7 @@ public ulong MaxSpeed {
return ((ulong)(curObj["MaxSpeed"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -762,7 +762,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] NetworkAddresses {
@@ -770,7 +770,7 @@ public string[] NetworkAddresses {
return ((string[])(curObj["NetworkAddresses"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -783,7 +783,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -795,7 +795,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -803,7 +803,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherEnabledCapabilities {
@@ -811,7 +811,7 @@ public string[] OtherEnabledCapabilities {
return ((string[])(curObj["OtherEnabledCapabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -819,7 +819,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -827,7 +827,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherLinkTechnology {
@@ -835,7 +835,7 @@ public string OtherLinkTechnology {
return ((string)(curObj["OtherLinkTechnology"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherNetworkPortType {
@@ -843,7 +843,7 @@ public string OtherNetworkPortType {
return ((string)(curObj["OtherNetworkPortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherPortType {
@@ -851,7 +851,7 @@ public string OtherPortType {
return ((string)(curObj["OtherPortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PermanentAddress {
@@ -859,7 +859,7 @@ public string PermanentAddress {
return ((string)(curObj["PermanentAddress"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPortNumberNull {
@@ -872,7 +872,7 @@ public bool IsPortNumberNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -884,7 +884,7 @@ public ushort PortNumber {
return ((ushort)(curObj["PortNumber"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPortTypeNull {
@@ -897,7 +897,7 @@ public bool IsPortTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -909,7 +909,7 @@ public ushort PortType {
return ((ushort)(curObj["PortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -917,7 +917,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerManagementSupportedNull {
@@ -930,7 +930,7 @@ public bool IsPowerManagementSupportedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -942,7 +942,7 @@ public bool PowerManagementSupported {
return ((bool)(curObj["PowerManagementSupported"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerOnHoursNull {
@@ -955,7 +955,7 @@ public bool IsPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -967,7 +967,7 @@ public ulong PowerOnHours {
return ((ulong)(curObj["PowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -980,7 +980,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -992,7 +992,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedSpeedNull {
@@ -1005,7 +1005,7 @@ public bool IsRequestedSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1017,7 +1017,7 @@ public ulong RequestedSpeed {
return ((ulong)(curObj["RequestedSpeed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -1030,7 +1030,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1042,7 +1042,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSpeedNull {
@@ -1055,7 +1055,7 @@ public bool IsSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1067,7 +1067,7 @@ public ulong Speed {
return ((ulong)(curObj["Speed"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -1075,7 +1075,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -1083,7 +1083,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStatusInfoNull {
@@ -1096,7 +1096,7 @@ public bool IsStatusInfoNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1108,7 +1108,7 @@ public ushort StatusInfo {
return ((ushort)(curObj["StatusInfo"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSupportedMaximumTransmissionUnitNull {
@@ -1121,7 +1121,7 @@ public bool IsSupportedMaximumTransmissionUnitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1133,7 +1133,7 @@ public ulong SupportedMaximumTransmissionUnit {
return ((ulong)(curObj["SupportedMaximumTransmissionUnit"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -1141,7 +1141,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -1149,7 +1149,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -1162,7 +1162,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1176,7 +1176,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalPowerOnHoursNull {
@@ -1189,7 +1189,7 @@ public bool IsTotalPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1201,7 +1201,7 @@ public ulong TotalPowerOnHours {
return ((ulong)(curObj["TotalPowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -1214,7 +1214,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1226,7 +1226,7 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUsageRestrictionNull {
@@ -1239,7 +1239,7 @@ public bool IsUsageRestrictionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1251,7 +1251,7 @@ public ushort UsageRestriction {
return ((ushort)(curObj["UsageRestriction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVMQOffloadUsageNull {
@@ -1264,7 +1264,7 @@ public bool IsVMQOffloadUsageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current VMQ offloading usage on this port. The usage is the amount of VMQ res" +
@@ -1278,9 +1278,9 @@ public uint VMQOffloadUsage {
return ((uint)(curObj["VMQOffloadUsage"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1288,9 +1288,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1307,77 +1307,77 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeActiveMaximumTransmissionUnit() {
if ((this.IsActiveMaximumTransmissionUnitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutoSense() {
if ((this.IsAutoSenseNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAvailability() {
if ((this.IsAvailabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCleared() {
if ((this.IsErrorClearedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFullDuplex() {
if ((this.IsFullDuplexNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1429,13 +1429,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1463,7 +1463,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1490,8 +1490,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1501,187 +1501,187 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeIOVOffloadUsage() {
if ((this.IsIOVOffloadUsageNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastErrorCode() {
if ((this.IsLastErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLinkTechnology() {
if ((this.IsLinkTechnologyNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxDataSize() {
if ((this.IsMaxDataSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxQuiesceTime() {
if ((this.IsMaxQuiesceTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxSpeed() {
if ((this.IsMaxSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePortNumber() {
if ((this.IsPortNumberNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePortType() {
if ((this.IsPortTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerManagementSupported() {
if ((this.IsPowerManagementSupportedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerOnHours() {
if ((this.IsPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedSpeed() {
if ((this.IsRequestedSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSpeed() {
if ((this.IsSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStatusInfo() {
if ((this.IsStatusInfoNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSupportedMaximumTransmissionUnit() {
if ((this.IsSupportedMaximumTransmissionUnitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalPowerOnHours() {
if ((this.IsTotalPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUsageRestriction() {
if ((this.IsUsageRestrictionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVMQOffloadUsage() {
if ((this.IsVMQOffloadUsageNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_EthernetSwitchPort";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -1690,7 +1690,7 @@ private static string ConstructPath(string keyCreationClassName, string keyDevic
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1702,24 +1702,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static EthernetSwitchPortCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static EthernetSwitchPortCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static EthernetSwitchPortCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static EthernetSwitchPortCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static EthernetSwitchPortCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1740,15 +1740,15 @@ public static EthernetSwitchPortCollection GetInstances(System.Management.Manage
}
return new EthernetSwitchPortCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static EthernetSwitchPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static EthernetSwitchPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static EthernetSwitchPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1765,7 +1765,7 @@ public static EthernetSwitchPortCollection GetInstances(System.Management.Manage
ObjectSearcher.Options = enumOptions;
return new EthernetSwitchPortCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static EthernetSwitchPort CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1780,12 +1780,12 @@ public static EthernetSwitchPort CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new EthernetSwitchPort(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint EnableDevice(bool Enabled) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1798,7 +1798,7 @@ public uint EnableDevice(bool Enabled) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint OnlineDevice(bool Online) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1811,7 +1811,7 @@ public uint OnlineDevice(bool Online) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint QuiesceDevice(bool Quiesce) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1824,7 +1824,7 @@ public uint QuiesceDevice(bool Quiesce) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1843,7 +1843,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Reset() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1854,7 +1854,7 @@ public uint Reset() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RestoreProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1865,7 +1865,7 @@ public uint RestoreProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SaveProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1876,7 +1876,7 @@ public uint SaveProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(ushort PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1890,34 +1890,34 @@ public uint SetPowerState(ushort PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class EthernetSwitchPortCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public EthernetSwitchPortCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1925,189 +1925,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new EthernetSwitchPort(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new EthernetSwitchPortEnumerator(privColObj.GetEnumerator());
}
-
+
public class EthernetSwitchPortEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public EthernetSwitchPortEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new EthernetSwitchPort(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortBandwidthSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortBandwidthSettingData.cs
index 482c4d2fa86e..6085ac5aeccc 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortBandwidthSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortBandwidthSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_EthernetSwitchPortBandwidthSettingData
public class EthernetSwitchPortBandwidthSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_EthernetSwitchPortBandwidthSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public EthernetSwitchPortBandwidthSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public EthernetSwitchPortBandwidthSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(EthernetSwitchPortBandwidthSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(EthernetSwitchPortBandwidthSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public EthernetSwitchPortBandwidthSettingData(System.Management.ManagementBaseOb
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsBurstLimitNull {
@@ -233,7 +233,7 @@ public bool IsBurstLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The peak bandwidth allowed from the port during bursts.")]
@@ -247,13 +247,13 @@ public ulong BurstLimit {
}
set {
curObj["BurstLimit"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsBurstSizeNull {
@@ -266,7 +266,7 @@ public bool IsBurstSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum burst size allowed.")]
@@ -280,13 +280,13 @@ public ulong BurstSize {
}
set {
curObj["BurstSize"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -294,7 +294,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -302,7 +302,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -310,7 +310,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -318,7 +318,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -331,7 +331,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The bandwidth limit allowed for the port.")]
@@ -345,13 +345,13 @@ public ulong Limit {
}
set {
curObj["Limit"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -364,7 +364,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The minimum absolute bandwidth guaranteed for the port.")]
@@ -378,13 +378,13 @@ public ulong Reservation {
}
set {
curObj["Reservation"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -397,7 +397,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The minimum bandwidth in weight guaranteed for the port.")]
@@ -411,15 +411,15 @@ public ulong Weight {
}
set {
curObj["Weight"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -427,9 +427,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -446,107 +446,107 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeBurstLimit() {
if ((this.IsBurstLimitNull == false)) {
return true;
}
return false;
}
-
+
private void ResetBurstLimit() {
curObj["BurstLimit"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeBurstSize() {
if ((this.IsBurstSizeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetBurstSize() {
curObj["BurstSize"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private void ResetLimit() {
curObj["Limit"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private void ResetReservation() {
curObj["Reservation"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
private void ResetWeight() {
curObj["Weight"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_EthernetSwitchPortBandwidthSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -558,24 +558,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -596,15 +596,15 @@ public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(Syst
}
return new EthernetSwitchPortBandwidthSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -621,7 +621,7 @@ public static EthernetSwitchPortBandwidthSettingDataCollection GetInstances(Syst
ObjectSearcher.Options = enumOptions;
return new EthernetSwitchPortBandwidthSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static EthernetSwitchPortBandwidthSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -636,39 +636,39 @@ public static EthernetSwitchPortBandwidthSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new EthernetSwitchPortBandwidthSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class EthernetSwitchPortBandwidthSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public EthernetSwitchPortBandwidthSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -676,189 +676,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new EthernetSwitchPortBandwidthSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new EthernetSwitchPortBandwidthSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class EthernetSwitchPortBandwidthSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public EthernetSwitchPortBandwidthSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new EthernetSwitchPortBandwidthSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs
index f95567cf9548..e936f9e00dda 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_EthernetSwitchPortVlanSettingData
public class EthernetSwitchPortVlanSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_EthernetSwitchPortVlanSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public EthernetSwitchPortVlanSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public EthernetSwitchPortVlanSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(EthernetSwitchPortVlanSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(EthernetSwitchPortVlanSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public EthernetSwitchPortVlanSettingData(System.Management.ManagementObject theO
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public EthernetSwitchPortVlanSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public EthernetSwitchPortVlanSettingData(System.Management.ManagementBaseObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAccessVlanIdNull {
@@ -233,7 +233,7 @@ public bool IsAccessVlanIdNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The vlan ID in access mode.")]
@@ -247,13 +247,13 @@ public ushort AccessVlanId {
}
set {
curObj["AccessVlanId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -261,7 +261,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -269,7 +269,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -277,7 +277,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -285,7 +285,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNativeVlanIdNull {
@@ -298,7 +298,7 @@ public bool IsNativeVlanIdNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The vlan ID in trunk mode.")]
@@ -312,13 +312,13 @@ public ushort NativeVlanId {
}
set {
curObj["NativeVlanId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperationModeNull {
@@ -331,7 +331,7 @@ public bool IsOperationModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The vlan operation modes.")]
@@ -350,13 +350,13 @@ public OperationModeValues OperationMode {
else {
curObj["OperationMode"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryVlanIdNull {
@@ -369,7 +369,7 @@ public bool IsPrimaryVlanIdNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The primary vlan ID in private mode.")]
@@ -383,13 +383,13 @@ public ushort PrimaryVlanId {
}
set {
curObj["PrimaryVlanId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The prune vlan ID bitmap in trunk mode.")]
@@ -399,13 +399,13 @@ public ushort[] PruneVlanIdArray {
}
set {
curObj["PruneVlanIdArray"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPvlanModeNull {
@@ -418,7 +418,7 @@ public bool IsPvlanModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The private vlan modes.")]
@@ -437,13 +437,13 @@ public PvlanModeValues PvlanMode {
else {
curObj["PvlanMode"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSecondaryVlanIdNull {
@@ -456,7 +456,7 @@ public bool IsSecondaryVlanIdNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The secondary vlan ID in private mode.")]
@@ -470,13 +470,13 @@ public ushort SecondaryVlanId {
}
set {
curObj["SecondaryVlanId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The secondary vlan ID bitmap in private mode.")]
@@ -486,13 +486,13 @@ public ushort[] SecondaryVlanIdArray {
}
set {
curObj["SecondaryVlanIdArray"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The trunk vlan ID bitmap in trunk mode.")]
@@ -502,15 +502,15 @@ public ushort[] TrunkVlanIdArray {
}
set {
curObj["TrunkVlanIdArray"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -518,9 +518,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -537,146 +537,146 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAccessVlanId() {
if ((this.IsAccessVlanIdNull == false)) {
return true;
}
return false;
}
-
+
private void ResetAccessVlanId() {
curObj["AccessVlanId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeNativeVlanId() {
if ((this.IsNativeVlanIdNull == false)) {
return true;
}
return false;
}
-
+
private void ResetNativeVlanId() {
curObj["NativeVlanId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeOperationMode() {
if ((this.IsOperationModeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetOperationMode() {
curObj["OperationMode"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializePrimaryVlanId() {
if ((this.IsPrimaryVlanIdNull == false)) {
return true;
}
return false;
}
-
+
private void ResetPrimaryVlanId() {
curObj["PrimaryVlanId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetPruneVlanIdArray() {
curObj["PruneVlanIdArray"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializePvlanMode() {
if ((this.IsPvlanModeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetPvlanMode() {
curObj["PvlanMode"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeSecondaryVlanId() {
if ((this.IsSecondaryVlanIdNull == false)) {
return true;
}
return false;
}
-
+
private void ResetSecondaryVlanId() {
curObj["SecondaryVlanId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetSecondaryVlanIdArray() {
curObj["SecondaryVlanIdArray"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetTrunkVlanIdArray() {
curObj["TrunkVlanIdArray"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_EthernetSwitchPortVlanSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -688,24 +688,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static EthernetSwitchPortVlanSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -726,15 +726,15 @@ public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Ma
}
return new EthernetSwitchPortVlanSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -751,7 +751,7 @@ public static EthernetSwitchPortVlanSettingDataCollection GetInstances(System.Ma
ObjectSearcher.Options = enumOptions;
return new EthernetSwitchPortVlanSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static EthernetSwitchPortVlanSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -766,61 +766,61 @@ public static EthernetSwitchPortVlanSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new EthernetSwitchPortVlanSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum OperationModeValues {
-
+
Access = 1,
-
+
Trunk = 2,
-
+
Private = 3,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum PvlanModeValues {
-
+
Isolated = 1,
-
+
Community = 2,
-
+
Promiscuous = 3,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class EthernetSwitchPortVlanSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public EthernetSwitchPortVlanSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -828,189 +828,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new EthernetSwitchPortVlanSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new EthernetSwitchPortVlanSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class EthernetSwitchPortVlanSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public EthernetSwitchPortVlanSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new EthernetSwitchPortVlanSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs
index 1b6828621d0b..e4b2fda9d482 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_ExternalEthernetPort
public class ExternalEthernetPort : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_ExternalEthernetPort";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ExternalEthernetPort() {
this.InitializeObject(null, null, null);
}
-
+
public ExternalEthernetPort(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(ExternalEthernetPort.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ExternalEthernetPort(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ExternalEthernetPort.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ExternalEthernetPort(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ExternalEthernetPort(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ExternalEthernetPort(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ExternalEthernetPort(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ExternalEthernetPort(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public ExternalEthernetPort(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ExternalEthernetPort(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public ExternalEthernetPort(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsActiveMaximumTransmissionUnitNull {
@@ -234,7 +234,7 @@ public bool IsActiveMaximumTransmissionUnitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -246,7 +246,7 @@ public ulong ActiveMaximumTransmissionUnit {
return ((ulong)(curObj["ActiveMaximumTransmissionUnit"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AdditionalAvailability {
@@ -254,7 +254,7 @@ public ushort[] AdditionalAvailability {
return ((ushort[])(curObj["AdditionalAvailability"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutoSenseNull {
@@ -267,7 +267,7 @@ public bool IsAutoSenseNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -279,7 +279,7 @@ public bool AutoSense {
return ((bool)(curObj["AutoSense"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailabilityNull {
@@ -292,7 +292,7 @@ public bool IsAvailabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -304,7 +304,7 @@ public ushort Availability {
return ((ushort)(curObj["Availability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -312,7 +312,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] Capabilities {
@@ -320,7 +320,7 @@ public ushort[] Capabilities {
return ((ushort[])(curObj["Capabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] CapabilityDescriptions {
@@ -328,7 +328,7 @@ public string[] CapabilityDescriptions {
return ((string[])(curObj["CapabilityDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -336,7 +336,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -349,7 +349,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -361,7 +361,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -369,7 +369,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -377,7 +377,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -390,7 +390,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -402,7 +402,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string DeviceID {
@@ -410,7 +410,7 @@ public string DeviceID {
return ((string)(curObj["DeviceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -418,7 +418,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] EnabledCapabilities {
@@ -426,7 +426,7 @@ public ushort[] EnabledCapabilities {
return ((ushort[])(curObj["EnabledCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -439,7 +439,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -451,7 +451,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -464,7 +464,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -476,7 +476,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorClearedNull {
@@ -489,7 +489,7 @@ public bool IsErrorClearedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -501,7 +501,7 @@ public bool ErrorCleared {
return ((bool)(curObj["ErrorCleared"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -509,7 +509,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFullDuplexNull {
@@ -522,7 +522,7 @@ public bool IsFullDuplexNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -534,7 +534,7 @@ public bool FullDuplex {
return ((bool)(curObj["FullDuplex"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -547,7 +547,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -559,7 +559,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -567,7 +567,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -580,7 +580,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -594,7 +594,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -602,7 +602,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIsBoundNull {
@@ -615,7 +615,7 @@ public bool IsIsBoundNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("If this property is true, then this Ethernet port can be connected to the switche" +
@@ -631,7 +631,7 @@ public bool IsBound {
return ((bool)(curObj["IsBound"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastErrorCodeNull {
@@ -644,7 +644,7 @@ public bool IsLastErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -656,7 +656,7 @@ public uint LastErrorCode {
return ((uint)(curObj["LastErrorCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLinkTechnologyNull {
@@ -669,7 +669,7 @@ public bool IsLinkTechnologyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -681,7 +681,7 @@ public ushort LinkTechnology {
return ((ushort)(curObj["LinkTechnology"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxDataSizeNull {
@@ -694,7 +694,7 @@ public bool IsMaxDataSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -706,7 +706,7 @@ public uint MaxDataSize {
return ((uint)(curObj["MaxDataSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxQuiesceTimeNull {
@@ -719,7 +719,7 @@ public bool IsMaxQuiesceTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -731,7 +731,7 @@ public ulong MaxQuiesceTime {
return ((ulong)(curObj["MaxQuiesceTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxSpeedNull {
@@ -744,7 +744,7 @@ public bool IsMaxSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -756,7 +756,7 @@ public ulong MaxSpeed {
return ((ulong)(curObj["MaxSpeed"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -764,7 +764,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] NetworkAddresses {
@@ -772,7 +772,7 @@ public string[] NetworkAddresses {
return ((string[])(curObj["NetworkAddresses"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -785,7 +785,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -797,7 +797,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -805,7 +805,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherEnabledCapabilities {
@@ -813,7 +813,7 @@ public string[] OtherEnabledCapabilities {
return ((string[])(curObj["OtherEnabledCapabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -821,7 +821,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -829,7 +829,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherLinkTechnology {
@@ -837,7 +837,7 @@ public string OtherLinkTechnology {
return ((string)(curObj["OtherLinkTechnology"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherNetworkPortType {
@@ -845,7 +845,7 @@ public string OtherNetworkPortType {
return ((string)(curObj["OtherNetworkPortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherPortType {
@@ -853,7 +853,7 @@ public string OtherPortType {
return ((string)(curObj["OtherPortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PermanentAddress {
@@ -861,7 +861,7 @@ public string PermanentAddress {
return ((string)(curObj["PermanentAddress"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPortNumberNull {
@@ -874,7 +874,7 @@ public bool IsPortNumberNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -886,7 +886,7 @@ public ushort PortNumber {
return ((ushort)(curObj["PortNumber"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPortTypeNull {
@@ -899,7 +899,7 @@ public bool IsPortTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -911,7 +911,7 @@ public ushort PortType {
return ((ushort)(curObj["PortType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -919,7 +919,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerManagementSupportedNull {
@@ -932,7 +932,7 @@ public bool IsPowerManagementSupportedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -944,7 +944,7 @@ public bool PowerManagementSupported {
return ((bool)(curObj["PowerManagementSupported"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerOnHoursNull {
@@ -957,7 +957,7 @@ public bool IsPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -969,7 +969,7 @@ public ulong PowerOnHours {
return ((ulong)(curObj["PowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -982,7 +982,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -994,7 +994,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedSpeedNull {
@@ -1007,7 +1007,7 @@ public bool IsRequestedSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1019,7 +1019,7 @@ public ulong RequestedSpeed {
return ((ulong)(curObj["RequestedSpeed"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -1032,7 +1032,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1044,7 +1044,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSpeedNull {
@@ -1057,7 +1057,7 @@ public bool IsSpeedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1069,7 +1069,7 @@ public ulong Speed {
return ((ulong)(curObj["Speed"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -1077,7 +1077,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -1085,7 +1085,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStatusInfoNull {
@@ -1098,7 +1098,7 @@ public bool IsStatusInfoNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1110,7 +1110,7 @@ public ushort StatusInfo {
return ((ushort)(curObj["StatusInfo"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSupportedMaximumTransmissionUnitNull {
@@ -1123,7 +1123,7 @@ public bool IsSupportedMaximumTransmissionUnitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1135,7 +1135,7 @@ public ulong SupportedMaximumTransmissionUnit {
return ((ulong)(curObj["SupportedMaximumTransmissionUnit"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -1143,7 +1143,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -1151,7 +1151,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -1164,7 +1164,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1178,7 +1178,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalPowerOnHoursNull {
@@ -1191,7 +1191,7 @@ public bool IsTotalPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1203,7 +1203,7 @@ public ulong TotalPowerOnHours {
return ((ulong)(curObj["TotalPowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -1216,7 +1216,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1228,7 +1228,7 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUsageRestrictionNull {
@@ -1241,7 +1241,7 @@ public bool IsUsageRestrictionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1253,9 +1253,9 @@ public ushort UsageRestriction {
return ((ushort)(curObj["UsageRestriction"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1263,9 +1263,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1282,77 +1282,77 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeActiveMaximumTransmissionUnit() {
if ((this.IsActiveMaximumTransmissionUnitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutoSense() {
if ((this.IsAutoSenseNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAvailability() {
if ((this.IsAvailabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCleared() {
if ((this.IsErrorClearedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFullDuplex() {
if ((this.IsFullDuplexNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1404,13 +1404,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1438,7 +1438,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1465,8 +1465,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1476,180 +1476,180 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeIsBound() {
if ((this.IsIsBoundNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastErrorCode() {
if ((this.IsLastErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLinkTechnology() {
if ((this.IsLinkTechnologyNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxDataSize() {
if ((this.IsMaxDataSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxQuiesceTime() {
if ((this.IsMaxQuiesceTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxSpeed() {
if ((this.IsMaxSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePortNumber() {
if ((this.IsPortNumberNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePortType() {
if ((this.IsPortTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerManagementSupported() {
if ((this.IsPowerManagementSupportedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerOnHours() {
if ((this.IsPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedSpeed() {
if ((this.IsRequestedSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSpeed() {
if ((this.IsSpeedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStatusInfo() {
if ((this.IsStatusInfoNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSupportedMaximumTransmissionUnit() {
if ((this.IsSupportedMaximumTransmissionUnitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalPowerOnHours() {
if ((this.IsTotalPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUsageRestriction() {
if ((this.IsUsageRestrictionNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ExternalEthernetPort";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -1658,7 +1658,7 @@ private static string ConstructPath(string keyCreationClassName, string keyDevic
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1670,24 +1670,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ExternalEthernetPortCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ExternalEthernetPortCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ExternalEthernetPortCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ExternalEthernetPortCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ExternalEthernetPortCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1708,15 +1708,15 @@ public static ExternalEthernetPortCollection GetInstances(System.Management.Mana
}
return new ExternalEthernetPortCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ExternalEthernetPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ExternalEthernetPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ExternalEthernetPortCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1733,7 +1733,7 @@ public static ExternalEthernetPortCollection GetInstances(System.Management.Mana
ObjectSearcher.Options = enumOptions;
return new ExternalEthernetPortCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ExternalEthernetPort CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1748,12 +1748,12 @@ public static ExternalEthernetPort CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ExternalEthernetPort(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint EnableDevice(bool Enabled) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1766,7 +1766,7 @@ public uint EnableDevice(bool Enabled) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint OnlineDevice(bool Online) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1779,7 +1779,7 @@ public uint OnlineDevice(bool Online) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint QuiesceDevice(bool Quiesce) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1792,7 +1792,7 @@ public uint QuiesceDevice(bool Quiesce) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1811,7 +1811,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Reset() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1822,7 +1822,7 @@ public uint Reset() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RestoreProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1833,7 +1833,7 @@ public uint RestoreProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SaveProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1844,7 +1844,7 @@ public uint SaveProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(ushort PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1858,34 +1858,34 @@ public uint SetPowerState(ushort PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ExternalEthernetPortCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ExternalEthernetPortCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1893,189 +1893,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ExternalEthernetPort(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ExternalEthernetPortEnumerator(privColObj.GetEnumerator());
}
-
+
public class ExternalEthernetPortEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ExternalEthernetPortEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ExternalEthernetPort(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs
index 1ebbeb00f910..5b3b781748b1 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_ImageManagementService
public class ImageManagementService : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_ImageManagementService";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ImageManagementService() {
this.InitializeObject(null, null, null);
}
-
+
public ImageManagementService(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(ImageManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ImageManagementService(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ImageManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ImageManagementService(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ImageManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ImageManagementService(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ImageManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ImageManagementService(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public ImageManagementService(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ImageManagementService(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public ImageManagementService(System.Management.ManagementBaseObject theObject)
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -229,7 +229,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -237,7 +237,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -250,7 +250,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -262,7 +262,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -270,7 +270,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -278,7 +278,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -291,7 +291,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -303,7 +303,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -311,7 +311,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -324,7 +324,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -336,7 +336,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -349,7 +349,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -361,7 +361,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -374,7 +374,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -386,7 +386,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -399,7 +399,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -413,7 +413,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -421,7 +421,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -429,7 +429,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -442,7 +442,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -454,7 +454,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -462,7 +462,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -470,7 +470,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -478,7 +478,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -486,7 +486,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -499,7 +499,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -511,7 +511,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -524,7 +524,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -536,7 +536,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartedNull {
@@ -549,7 +549,7 @@ public bool IsStartedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -561,7 +561,7 @@ public bool Started {
return ((bool)(curObj["Started"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string StartMode {
@@ -569,7 +569,7 @@ public string StartMode {
return ((string)(curObj["StartMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -577,7 +577,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -585,7 +585,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -593,7 +593,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -601,7 +601,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -614,7 +614,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -628,7 +628,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -641,7 +641,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -653,9 +653,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -663,9 +663,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -682,42 +682,42 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -769,13 +769,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -803,7 +803,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -830,8 +830,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -841,75 +841,75 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStarted() {
if ((this.IsStartedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ImageManagementService";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -918,7 +918,7 @@ private static string ConstructPath(string keyCreationClassName, string keyName,
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -930,24 +930,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ImageManagementServiceCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ImageManagementServiceCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ImageManagementServiceCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ImageManagementServiceCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ImageManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -968,15 +968,15 @@ public static ImageManagementServiceCollection GetInstances(System.Management.Ma
}
return new ImageManagementServiceCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ImageManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ImageManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ImageManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -993,7 +993,7 @@ public static ImageManagementServiceCollection GetInstances(System.Management.Ma
ObjectSearcher.Options = enumOptions;
return new ImageManagementServiceCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ImageManagementService CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1008,12 +1008,12 @@ public static ImageManagementService CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ImageManagementService(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint AttachVirtualHardDisk(bool AssignDriveLetter, string Path, bool ReadOnly, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1034,7 +1034,7 @@ public uint AttachVirtualHardDisk(bool AssignDriveLetter, string Path, bool Read
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CompactVirtualHardDisk(ushort Mode, string Path, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1054,7 +1054,7 @@ public uint CompactVirtualHardDisk(ushort Mode, string Path, out System.Manageme
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ConvertVirtualHardDisk(string SourcePath, string VirtualDiskSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1074,7 +1074,7 @@ public uint ConvertVirtualHardDisk(string SourcePath, string VirtualDiskSettingD
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CreateVirtualFloppyDisk(string Path, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1093,7 +1093,7 @@ public uint CreateVirtualFloppyDisk(string Path, out System.Management.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CreateVirtualHardDisk(string VirtualDiskSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1112,7 +1112,7 @@ public uint CreateVirtualHardDisk(string VirtualDiskSettingData, out System.Mana
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetVirtualHardDiskSettingData(string Path, out System.Management.ManagementPath Job, out string SettingData) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1133,7 +1133,7 @@ public uint GetVirtualHardDiskSettingData(string Path, out System.Management.Man
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetVirtualHardDiskState(string Path, out System.Management.ManagementPath Job, out string State) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1154,7 +1154,7 @@ public uint GetVirtualHardDiskState(string Path, out System.Management.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint MergeVirtualHardDisk(string DestinationPath, string SourcePath, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1174,7 +1174,7 @@ public uint MergeVirtualHardDisk(string DestinationPath, string SourcePath, out
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1194,7 +1194,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ResizeVirtualHardDisk(ulong MaxInternalSize, string Path, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1214,7 +1214,7 @@ public uint ResizeVirtualHardDisk(ulong MaxInternalSize, string Path, out System
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetParentVirtualHardDisk(string ChildPath, bool IgnoreIDMismatch, string LeafPath, string ParentPath, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1236,7 +1236,7 @@ public uint SetParentVirtualHardDisk(string ChildPath, bool IgnoreIDMismatch, st
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetVirtualHardDiskSettingData(string VirtualDiskSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1255,7 +1255,7 @@ public uint SetVirtualHardDiskSettingData(string VirtualDiskSettingData, out Sys
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StartService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1266,7 +1266,7 @@ public uint StartService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StopService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1277,7 +1277,7 @@ public uint StopService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ValidateVirtualHardDisk(string Path, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1296,34 +1296,34 @@ public uint ValidateVirtualHardDisk(string Path, out System.Management.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ImageManagementServiceCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ImageManagementServiceCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1331,189 +1331,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ImageManagementService(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ImageManagementServiceEnumerator(privColObj.GetEnumerator());
}
-
+
public class ImageManagementServiceEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ImageManagementServiceEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ImageManagementService(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs
index 976da28136f7..016ad1885740 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs
@@ -24,8 +24,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -33,62 +33,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_KvpExchangeComponent
public class KvpExchangeComponent : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_KvpExchangeComponent";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public KvpExchangeComponent() {
this.InitializeObject(null, null, null);
}
-
+
public KvpExchangeComponent(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(KvpExchangeComponent.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public KvpExchangeComponent(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(KvpExchangeComponent.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public KvpExchangeComponent(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public KvpExchangeComponent(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public KvpExchangeComponent(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public KvpExchangeComponent(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public KvpExchangeComponent(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -100,7 +100,7 @@ public KvpExchangeComponent(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public KvpExchangeComponent(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -113,7 +113,7 @@ public KvpExchangeComponent(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -122,7 +122,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -131,7 +131,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -140,7 +140,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -149,7 +149,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -158,7 +158,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -177,7 +177,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -189,7 +189,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -210,7 +210,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -222,7 +222,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AdditionalAvailability {
@@ -230,7 +230,7 @@ public ushort[] AdditionalAvailability {
return ((ushort[])(curObj["AdditionalAvailability"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailabilityNull {
@@ -243,7 +243,7 @@ public bool IsAvailabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -255,7 +255,7 @@ public ushort Availability {
return ((ushort)(curObj["Availability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -263,7 +263,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -271,7 +271,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -284,7 +284,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -296,7 +296,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -304,7 +304,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -312,7 +312,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -325,7 +325,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -337,7 +337,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string DeviceID {
@@ -345,7 +345,7 @@ public string DeviceID {
return ((string)(curObj["DeviceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -353,7 +353,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -366,7 +366,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -378,7 +378,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -391,7 +391,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -403,7 +403,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorClearedNull {
@@ -416,7 +416,7 @@ public bool IsErrorClearedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -428,7 +428,7 @@ public bool ErrorCleared {
return ((bool)(curObj["ErrorCleared"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -436,7 +436,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"An array of embedded Msvm_KvpExchangeDataItem instances which contain the set of key-value pairs that components running within the guest operating system have pushed up to be available for access by external clients. This array will not contain any intrinsic items that are pushed by the integration component directly.")]
@@ -445,7 +445,7 @@ public string[] GuestExchangeItems {
return ((string[])(curObj["GuestExchangeItems"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"An array of embedded Msvm_KvpExchangeDataItem instances which contain the set of key-value pairs that the guest operating system has pushed up to be available for access by external clients. This array will not contain any data items pushed by other components running within the guest operating system.")]
@@ -454,7 +454,7 @@ public string[] GuestIntrinsicExchangeItems {
return ((string[])(curObj["GuestIntrinsicExchangeItems"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -467,7 +467,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -479,7 +479,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -487,7 +487,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -500,7 +500,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -514,7 +514,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -522,7 +522,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastErrorCodeNull {
@@ -535,7 +535,7 @@ public bool IsLastErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -547,7 +547,7 @@ public uint LastErrorCode {
return ((uint)(curObj["LastErrorCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxQuiesceTimeNull {
@@ -560,7 +560,7 @@ public bool IsMaxQuiesceTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -572,7 +572,7 @@ public ulong MaxQuiesceTime {
return ((ulong)(curObj["MaxQuiesceTime"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -580,7 +580,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -593,7 +593,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -605,7 +605,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -613,7 +613,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -621,7 +621,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -629,7 +629,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -637,7 +637,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerManagementSupportedNull {
@@ -650,7 +650,7 @@ public bool IsPowerManagementSupportedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -662,7 +662,7 @@ public bool PowerManagementSupported {
return ((bool)(curObj["PowerManagementSupported"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerOnHoursNull {
@@ -675,7 +675,7 @@ public bool IsPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -687,7 +687,7 @@ public ulong PowerOnHours {
return ((ulong)(curObj["PowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -700,7 +700,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -712,7 +712,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -725,7 +725,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -737,7 +737,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -745,7 +745,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -753,7 +753,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStatusInfoNull {
@@ -766,7 +766,7 @@ public bool IsStatusInfoNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -778,7 +778,7 @@ public ushort StatusInfo {
return ((ushort)(curObj["StatusInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -786,7 +786,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -794,7 +794,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -807,7 +807,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -821,7 +821,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalPowerOnHoursNull {
@@ -834,7 +834,7 @@ public bool IsTotalPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -846,7 +846,7 @@ public ulong TotalPowerOnHours {
return ((ulong)(curObj["TotalPowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -859,7 +859,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -871,9 +871,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -881,9 +881,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -900,56 +900,56 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAvailability() {
if ((this.IsAvailabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCleared() {
if ((this.IsErrorClearedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1001,13 +1001,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1035,7 +1035,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1062,8 +1062,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1073,110 +1073,110 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastErrorCode() {
if ((this.IsLastErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxQuiesceTime() {
if ((this.IsMaxQuiesceTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerManagementSupported() {
if ((this.IsPowerManagementSupportedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerOnHours() {
if ((this.IsPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStatusInfo() {
if ((this.IsStatusInfoNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalPowerOnHours() {
if ((this.IsTotalPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_KvpExchangeComponent";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -1185,7 +1185,7 @@ private static string ConstructPath(string keyCreationClassName, string keyDevic
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1197,24 +1197,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static KvpExchangeComponentCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static KvpExchangeComponentCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static KvpExchangeComponentCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static KvpExchangeComponentCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static KvpExchangeComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1235,15 +1235,15 @@ public static KvpExchangeComponentCollection GetInstances(System.Management.Mana
}
return new KvpExchangeComponentCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static KvpExchangeComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static KvpExchangeComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static KvpExchangeComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1260,7 +1260,7 @@ public static KvpExchangeComponentCollection GetInstances(System.Management.Mana
ObjectSearcher.Options = enumOptions;
return new KvpExchangeComponentCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static KvpExchangeComponent CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1275,12 +1275,12 @@ public static KvpExchangeComponent CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new KvpExchangeComponent(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint EnableDevice(bool Enabled) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1293,7 +1293,7 @@ public uint EnableDevice(bool Enabled) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint OnlineDevice(bool Online) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1306,7 +1306,7 @@ public uint OnlineDevice(bool Online) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint QuiesceDevice(bool Quiesce) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1319,7 +1319,7 @@ public uint QuiesceDevice(bool Quiesce) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1339,7 +1339,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Reset() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1350,7 +1350,7 @@ public uint Reset() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RestoreProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1361,7 +1361,7 @@ public uint RestoreProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SaveProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1372,7 +1372,7 @@ public uint SaveProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(ushort PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1386,34 +1386,34 @@ public uint SetPowerState(ushort PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class KvpExchangeComponentCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public KvpExchangeComponentCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1421,189 +1421,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new KvpExchangeComponent(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new KvpExchangeComponentEnumerator(privColObj.GetEnumerator());
}
-
+
public class KvpExchangeComponentEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public KvpExchangeComponentEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new KvpExchangeComponent(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs
index 4e704e023549..81c562bd173f 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs
@@ -24,70 +24,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_KvpExchangeComponentSettingData
public class KvpExchangeComponentSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_KvpExchangeComponentSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public KvpExchangeComponentSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public KvpExchangeComponentSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(KvpExchangeComponentSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(KvpExchangeComponentSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public KvpExchangeComponentSettingData(System.Management.ManagementObject theObj
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public KvpExchangeComponentSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public KvpExchangeComponentSettingData(System.Management.ManagementBaseObject th
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -229,7 +229,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -237,7 +237,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -245,7 +245,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -258,7 +258,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -270,7 +270,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -283,7 +283,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -295,7 +295,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -303,7 +303,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -311,7 +311,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -324,7 +324,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -336,7 +336,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -344,7 +344,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -352,7 +352,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -365,7 +365,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The enabled and disabled states of an element.
@@ -380,7 +380,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("An array of Msvm_KvpExchangeDataItem instances.\nThis is a read-only property, but" +
@@ -391,7 +391,7 @@ public string[] HostExchangeItems {
return ((string[])(curObj["HostExchangeItems"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"An array of Msvm_KvpExchangeDataItem instances containing the key/value pairs that are stored in the configuration file but not exchanged with the guest OS. This allows applications to store VM-specific data that does not need to be visible to the guest OS. The items are formatted the same as the items in the HostExchangeItems property except the Source property of the Msvm_KvpExchangeDataItem instance is set to 4. Each configuration file is limited to 128 key/value pairs, where each value field is allowed to be up to 16 KB in size and the key field is allowed to be up to512 bytes.")]
@@ -400,7 +400,7 @@ public string[] HostOnlyItems {
return ((string[])(curObj["HostOnlyItems"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -408,7 +408,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -416,7 +416,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -429,7 +429,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -441,7 +441,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -454,7 +454,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -466,7 +466,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -474,7 +474,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -482,7 +482,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -490,7 +490,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -503,7 +503,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -515,7 +515,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -523,7 +523,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -536,7 +536,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -548,7 +548,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -561,7 +561,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -573,7 +573,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -581,7 +581,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -594,7 +594,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -606,9 +606,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -616,9 +616,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -635,102 +635,102 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_KvpExchangeComponentSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -742,24 +742,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static KvpExchangeComponentSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -780,15 +780,15 @@ public static KvpExchangeComponentSettingDataCollection GetInstances(System.Mana
}
return new KvpExchangeComponentSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static KvpExchangeComponentSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -805,7 +805,7 @@ public static KvpExchangeComponentSettingDataCollection GetInstances(System.Mana
ObjectSearcher.Options = enumOptions;
return new KvpExchangeComponentSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static KvpExchangeComponentSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -820,39 +820,39 @@ public static KvpExchangeComponentSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new KvpExchangeComponentSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class KvpExchangeComponentSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public KvpExchangeComponentSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -860,189 +860,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new KvpExchangeComponentSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new KvpExchangeComponentSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class KvpExchangeComponentSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public KvpExchangeComponentSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new KvpExchangeComponentSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs
index f076f7902775..58f3dff68166 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs
@@ -24,62 +24,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_KvpExchangeDataItem
public class KvpExchangeDataItem : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_KvpExchangeDataItem";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public KvpExchangeDataItem() {
this.InitializeObject(null, null, null);
}
-
+
public KvpExchangeDataItem(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public KvpExchangeDataItem(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public KvpExchangeDataItem(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public KvpExchangeDataItem(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public KvpExchangeDataItem(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -91,7 +91,7 @@ public KvpExchangeDataItem(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public KvpExchangeDataItem(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -104,7 +104,7 @@ public KvpExchangeDataItem(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -113,7 +113,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -122,7 +122,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -131,7 +131,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -140,7 +140,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -149,7 +149,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -168,7 +168,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -180,7 +180,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -201,7 +201,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -213,7 +213,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -221,7 +221,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Data {
@@ -229,7 +229,7 @@ public string Data {
return ((string)(curObj["Data"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -237,7 +237,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -245,7 +245,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -253,7 +253,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -261,7 +261,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSourceNull {
@@ -274,7 +274,7 @@ public bool IsSourceNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -286,9 +286,9 @@ public ushort Source {
return ((ushort)(curObj["Source"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -296,9 +296,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -315,38 +315,38 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeSource() {
if ((this.IsSourceNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath() {
string strPath = "ROOT\\virtualization\\v2:Msvm_KvpExchangeDataItem";
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -358,24 +358,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static KvpExchangeDataItemCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -396,15 +396,15 @@ public static KvpExchangeDataItemCollection GetInstances(System.Management.Manag
}
return new KvpExchangeDataItemCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static KvpExchangeDataItemCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static KvpExchangeDataItemCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -421,7 +421,7 @@ public static KvpExchangeDataItemCollection GetInstances(System.Management.Manag
ObjectSearcher.Options = enumOptions;
return new KvpExchangeDataItemCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static KvpExchangeDataItem CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -436,39 +436,39 @@ public static KvpExchangeDataItem CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new KvpExchangeDataItem(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class KvpExchangeDataItemCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public KvpExchangeDataItemCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -476,189 +476,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new KvpExchangeDataItem(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new KvpExchangeDataItemEnumerator(privColObj.GetEnumerator());
}
-
+
public class KvpExchangeDataItemEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public KvpExchangeDataItemEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new KvpExchangeDataItem(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs
index 9f09a0694983..7fc0495fa046 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_LANEndpoint
public class LANEndpoint : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_LANEndpoint";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public LANEndpoint() {
this.InitializeObject(null, null, null);
}
-
+
public LANEndpoint(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(LANEndpoint.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public LANEndpoint(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(LANEndpoint.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public LANEndpoint(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public LANEndpoint(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public LANEndpoint(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public LANEndpoint(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public LANEndpoint(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public LANEndpoint(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public LANEndpoint(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public LANEndpoint(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] AliasAddresses {
@@ -229,7 +229,7 @@ public string[] AliasAddresses {
return ((string[])(curObj["AliasAddresses"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -237,7 +237,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -245,7 +245,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -258,7 +258,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -270,7 +270,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConnectedNull {
@@ -283,7 +283,7 @@ public bool IsConnectedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("This property is set to TRUE if the LAN endpoint is connected to a switch port.")]
@@ -296,7 +296,7 @@ public bool Connected {
return ((bool)(curObj["Connected"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -304,7 +304,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -312,7 +312,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -325,7 +325,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -337,7 +337,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -345,7 +345,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -358,7 +358,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -370,7 +370,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -383,7 +383,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -395,7 +395,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] GroupAddresses {
@@ -403,7 +403,7 @@ public string[] GroupAddresses {
return ((string[])(curObj["GroupAddresses"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -416,7 +416,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -428,7 +428,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -441,7 +441,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -455,7 +455,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -463,7 +463,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string LANID {
@@ -471,7 +471,7 @@ public string LANID {
return ((string)(curObj["LANID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLANTypeNull {
@@ -484,7 +484,7 @@ public bool IsLANTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -496,7 +496,7 @@ public ushort LANType {
return ((ushort)(curObj["LANType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string MACAddress {
@@ -504,7 +504,7 @@ public string MACAddress {
return ((string)(curObj["MACAddress"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxDataSizeNull {
@@ -517,7 +517,7 @@ public bool IsMaxDataSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -529,7 +529,7 @@ public uint MaxDataSize {
return ((uint)(curObj["MaxDataSize"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -537,7 +537,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string NameFormat {
@@ -545,7 +545,7 @@ public string NameFormat {
return ((string)(curObj["NameFormat"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -558,7 +558,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -570,7 +570,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -578,7 +578,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -586,7 +586,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherLANType {
@@ -594,7 +594,7 @@ public string OtherLANType {
return ((string)(curObj["OtherLANType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherTypeDescription {
@@ -602,7 +602,7 @@ public string OtherTypeDescription {
return ((string)(curObj["OtherTypeDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -615,7 +615,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -627,7 +627,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProtocolIFTypeNull {
@@ -640,7 +640,7 @@ public bool IsProtocolIFTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -652,7 +652,7 @@ public ushort ProtocolIFType {
return ((ushort)(curObj["ProtocolIFType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProtocolTypeNull {
@@ -665,7 +665,7 @@ public bool IsProtocolTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -677,7 +677,7 @@ public ushort ProtocolType {
return ((ushort)(curObj["ProtocolType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -690,7 +690,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -702,7 +702,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -710,7 +710,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -718,7 +718,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -726,7 +726,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -734,7 +734,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -747,7 +747,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -761,7 +761,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -774,7 +774,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -786,9 +786,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -796,9 +796,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -815,49 +815,49 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConnected() {
if ((this.IsConnectedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -909,13 +909,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -943,7 +943,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -970,8 +970,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -981,96 +981,96 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLANType() {
if ((this.IsLANTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxDataSize() {
if ((this.IsMaxDataSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProtocolIFType() {
if ((this.IsProtocolIFTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProtocolType() {
if ((this.IsProtocolTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_LANEndpoint";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -1079,7 +1079,7 @@ private static string ConstructPath(string keyCreationClassName, string keyName,
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1091,24 +1091,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static LANEndpointCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static LANEndpointCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static LANEndpointCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static LANEndpointCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static LANEndpointCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1129,15 +1129,15 @@ public static LANEndpointCollection GetInstances(System.Management.ManagementSco
}
return new LANEndpointCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static LANEndpointCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static LANEndpointCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static LANEndpointCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1154,7 +1154,7 @@ public static LANEndpointCollection GetInstances(System.Management.ManagementSco
ObjectSearcher.Options = enumOptions;
return new LANEndpointCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static LANEndpoint CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1169,12 +1169,12 @@ public static LANEndpoint CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new LANEndpoint(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1193,34 +1193,34 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class LANEndpointCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public LANEndpointCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1228,189 +1228,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new LANEndpoint(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new LANEndpointEnumerator(privColObj.GetEnumerator());
}
-
+
public class LANEndpointEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public LANEndpointEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new LANEndpoint(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs
index 99200dd1b214..1276fe928911 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_MemorySettingData
public class MemorySettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_MemorySettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public MemorySettingData() {
this.InitializeObject(null, null, null);
}
-
+
public MemorySettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(MemorySettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public MemorySettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(MemorySettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public MemorySettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public MemorySettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public MemorySettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public MemorySettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public MemorySettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public MemorySettingData(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public MemorySettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public MemorySettingData(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -228,7 +228,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -236,7 +236,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -244,7 +244,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -257,7 +257,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -269,7 +269,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -282,7 +282,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -294,7 +294,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -302,7 +302,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -310,7 +310,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -323,7 +323,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -335,7 +335,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -343,7 +343,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDynamicMemoryEnabledNull {
@@ -356,7 +356,7 @@ public bool IsDynamicMemoryEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates if dynamic memory is enabled.")]
@@ -369,7 +369,7 @@ public bool DynamicMemoryEnabled {
return ((bool)(curObj["DynamicMemoryEnabled"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -377,7 +377,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -385,7 +385,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -393,7 +393,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIsVirtualizedNull {
@@ -406,7 +406,7 @@ public bool IsIsVirtualizedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Indicates whether this device is virtualized or passed through, possibly using partitioning. When set to False, the underlying or host resource is utilized. At least one item shall be present in the DeviceID property. When set to True, the resource is virtualized and may not map directly to an underlying/host resource. Some implementations may support specific assignment for virtualized resources, in which case the host resource(s) are exposed using the DeviceID property. This property is always set to True.")]
@@ -419,7 +419,7 @@ public bool IsVirtualized {
return ((bool)(curObj["IsVirtualized"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -432,7 +432,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -444,7 +444,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -457,7 +457,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -469,7 +469,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxMemoryBlocksPerNumaNodeNull {
@@ -482,7 +482,7 @@ public bool IsMaxMemoryBlocksPerNumaNodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum amount of memory that can be observed within the VM as belonging to a" +
@@ -496,7 +496,7 @@ public ulong MaxMemoryBlocksPerNumaNode {
return ((ulong)(curObj["MaxMemoryBlocksPerNumaNode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -504,7 +504,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -512,7 +512,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -520,7 +520,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -533,7 +533,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -545,7 +545,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -553,7 +553,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -566,7 +566,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -578,7 +578,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSwapFilesInUseNull {
@@ -591,7 +591,7 @@ public bool IsSwapFilesInUseNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates if smart paging is active.")]
@@ -604,7 +604,7 @@ public bool SwapFilesInUse {
return ((bool)(curObj["SwapFilesInUse"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTargetMemoryBufferNull {
@@ -617,7 +617,7 @@ public bool IsTargetMemoryBufferNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -629,7 +629,7 @@ public uint TargetMemoryBuffer {
return ((uint)(curObj["TargetMemoryBuffer"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -642,7 +642,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -654,7 +654,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -662,7 +662,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -675,7 +675,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -687,9 +687,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -697,9 +697,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -716,130 +716,130 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDynamicMemoryEnabled() {
if ((this.IsDynamicMemoryEnabledNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeIsVirtualized() {
if ((this.IsIsVirtualizedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxMemoryBlocksPerNumaNode() {
if ((this.IsMaxMemoryBlocksPerNumaNodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSwapFilesInUse() {
if ((this.IsSwapFilesInUseNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTargetMemoryBuffer() {
if ((this.IsTargetMemoryBufferNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_MemorySettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -851,24 +851,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static MemorySettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static MemorySettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static MemorySettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static MemorySettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static MemorySettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -889,15 +889,15 @@ public static MemorySettingDataCollection GetInstances(System.Management.Managem
}
return new MemorySettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static MemorySettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static MemorySettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static MemorySettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -914,7 +914,7 @@ public static MemorySettingDataCollection GetInstances(System.Management.Managem
ObjectSearcher.Options = enumOptions;
return new MemorySettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static MemorySettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -929,39 +929,39 @@ public static MemorySettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new MemorySettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class MemorySettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public MemorySettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -969,189 +969,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new MemorySettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new MemorySettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class MemorySettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public MemorySettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new MemorySettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MigrationJob.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MigrationJob.cs
index 7b7e5f1d088a..d58e282b4a08 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MigrationJob.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MigrationJob.cs
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_MigrationJob
public class MigrationJob : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_MigrationJob";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public MigrationJob() {
this.InitializeObject(null, null, null);
}
-
+
public MigrationJob(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(MigrationJob.ConstructPath(keyInstanceID)), null);
}
-
+
public MigrationJob(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(MigrationJob.ConstructPath(keyInstanceID)), null);
}
-
+
public MigrationJob(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public MigrationJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public MigrationJob(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public MigrationJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public MigrationJob(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public MigrationJob(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public MigrationJob(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public MigrationJob(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCancellableNull {
@@ -234,7 +234,7 @@ public bool IsCancellableNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the job can be cancelled. The value of this property does not g" +
@@ -248,7 +248,7 @@ public bool Cancellable {
return ((bool)(curObj["Cancellable"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -256,7 +256,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -269,7 +269,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -281,7 +281,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDeleteOnCompletionNull {
@@ -294,7 +294,7 @@ public bool IsDeleteOnCompletionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -306,7 +306,7 @@ public bool DeleteOnCompletion {
return ((bool)(curObj["DeleteOnCompletion"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -314,7 +314,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Hostname the destination virtualization platform where the virtual system is migr" +
@@ -324,7 +324,7 @@ public string DestinationHost {
return ((string)(curObj["DestinationHost"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -337,7 +337,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -349,7 +349,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsElapsedTimeNull {
@@ -362,7 +362,7 @@ public bool IsElapsedTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -376,7 +376,7 @@ public System.DateTime ElapsedTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -384,7 +384,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorCodeNull {
@@ -397,7 +397,7 @@ public bool IsErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -409,7 +409,7 @@ public ushort ErrorCode {
return ((ushort)(curObj["ErrorCode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -417,7 +417,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorSummaryDescription {
@@ -425,7 +425,7 @@ public string ErrorSummaryDescription {
return ((string)(curObj["ErrorSummaryDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -438,7 +438,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -450,7 +450,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -463,7 +463,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -477,7 +477,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -485,7 +485,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobRunTimesNull {
@@ -498,7 +498,7 @@ public bool IsJobRunTimesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -510,7 +510,7 @@ public uint JobRunTimes {
return ((uint)(curObj["JobRunTimes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobStateNull {
@@ -523,7 +523,7 @@ public bool IsJobStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -535,7 +535,7 @@ public ushort JobState {
return ((ushort)(curObj["JobState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string JobStatus {
@@ -543,7 +543,7 @@ public string JobStatus {
return ((string)(curObj["JobStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobTypeNull {
@@ -556,7 +556,7 @@ public bool IsJobTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates the type of Job being tracked by this object.")]
@@ -569,7 +569,7 @@ public JobTypeValues JobType {
return ((JobTypeValues)(System.Convert.ToInt32(curObj["JobType"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLocalOrUtcTimeNull {
@@ -582,7 +582,7 @@ public bool IsLocalOrUtcTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -594,7 +594,7 @@ public ushort LocalOrUtcTime {
return ((ushort)(curObj["LocalOrUtcTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMigrationTypeNull {
@@ -607,7 +607,7 @@ public bool IsMigrationTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The migration type as defined in Msvm_VirtualSystemMigrationSettingData.Migration" +
@@ -621,7 +621,7 @@ public ushort MigrationType {
return ((ushort)(curObj["MigrationType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -629,7 +629,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"For Live Migration this must be set to NULL. For Storage Migration, it will specify the virtual machine's virtual hard drives which moved and where they moved. If not NULL, NewResourceSettingData will contain an array of embedded instances of resource allocation setting data (RASD) which represent VHDs. Destination location will be provided using Connection property of RASD.")]
@@ -638,7 +638,7 @@ public string[] NewResourceSettingData {
return ((string[])(curObj["NewResourceSettingData"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"For Live Migration this will be set to NULL. For Storage Migration, it will indicate the new path for virtual machine data (ExternalDataRoot, SnapshotDataRoot and SwapFileDataRoot). This being NULL indicates that virtual machine's data roots are not moving. Otherwise NewSystemSettingData will be instance of Msvm_VirtualSystemGlobalSettingData containing properties ExternalDataRoot, SnapshotDataRoot and SwapFileDataRoot. If not NULL, ExternalDataRoot property will specify new location of virtual machine's current configuration and saved state. If not NULL, SnapshotDataRoot property will specify new location for snapshots data. If not NULL, SwapFileDataRoot property will specify new location of virtual machine's smart paging files ")]
@@ -647,7 +647,7 @@ public string NewSystemSettingData {
return ((string)(curObj["NewSystemSettingData"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Notify {
@@ -655,7 +655,7 @@ public string Notify {
return ((string)(curObj["Notify"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -668,7 +668,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -680,7 +680,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -688,7 +688,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherRecoveryAction {
@@ -696,7 +696,7 @@ public string OtherRecoveryAction {
return ((string)(curObj["OtherRecoveryAction"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Owner {
@@ -704,7 +704,7 @@ public string Owner {
return ((string)(curObj["Owner"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentCompleteNull {
@@ -717,7 +717,7 @@ public bool IsPercentCompleteNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -729,7 +729,7 @@ public ushort PercentComplete {
return ((ushort)(curObj["PercentComplete"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -742,7 +742,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -754,7 +754,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPriorityNull {
@@ -767,7 +767,7 @@ public bool IsPriorityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -779,7 +779,7 @@ public uint Priority {
return ((uint)(curObj["Priority"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRecoveryActionNull {
@@ -792,7 +792,7 @@ public bool IsRecoveryActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -804,7 +804,7 @@ public ushort RecoveryAction {
return ((ushort)(curObj["RecoveryAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayNull {
@@ -817,7 +817,7 @@ public bool IsRunDayNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -829,7 +829,7 @@ public sbyte RunDay {
return ((sbyte)(curObj["RunDay"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayOfWeekNull {
@@ -842,7 +842,7 @@ public bool IsRunDayOfWeekNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -854,7 +854,7 @@ public sbyte RunDayOfWeek {
return ((sbyte)(curObj["RunDayOfWeek"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunMonthNull {
@@ -867,7 +867,7 @@ public bool IsRunMonthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -879,7 +879,7 @@ public byte RunMonth {
return ((byte)(curObj["RunMonth"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunStartIntervalNull {
@@ -892,7 +892,7 @@ public bool IsRunStartIntervalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -906,7 +906,7 @@ public System.DateTime RunStartInterval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsScheduledStartTimeNull {
@@ -919,7 +919,7 @@ public bool IsScheduledStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -933,7 +933,7 @@ public System.DateTime ScheduledStartTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartTimeNull {
@@ -946,7 +946,7 @@ public bool IsStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -960,7 +960,7 @@ public System.DateTime StartTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -968,7 +968,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -976,7 +976,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeBeforeRemovalNull {
@@ -989,7 +989,7 @@ public bool IsTimeBeforeRemovalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1003,7 +1003,7 @@ public System.DateTime TimeBeforeRemoval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -1016,7 +1016,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1030,7 +1030,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeSubmittedNull {
@@ -1043,7 +1043,7 @@ public bool IsTimeSubmittedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1057,7 +1057,7 @@ public System.DateTime TimeSubmitted {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUntilTimeNull {
@@ -1070,7 +1070,7 @@ public bool IsUntilTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1084,7 +1084,7 @@ public System.DateTime UntilTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("GUID of the affected virtual system.")]
@@ -1093,9 +1093,9 @@ public string VirtualSystemName {
return ((string)(curObj["VirtualSystemName"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1103,9 +1103,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1122,35 +1122,35 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCancellable() {
if ((this.IsCancellableNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDeleteOnCompletion() {
if ((this.IsDeleteOnCompletionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1202,13 +1202,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1236,7 +1236,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1263,8 +1263,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1274,200 +1274,200 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeElapsedTime() {
if ((this.IsElapsedTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCode() {
if ((this.IsErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobRunTimes() {
if ((this.IsJobRunTimesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobState() {
if ((this.IsJobStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobType() {
if ((this.IsJobTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLocalOrUtcTime() {
if ((this.IsLocalOrUtcTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMigrationType() {
if ((this.IsMigrationTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentComplete() {
if ((this.IsPercentCompleteNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePriority() {
if ((this.IsPriorityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRecoveryAction() {
if ((this.IsRecoveryActionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDay() {
if ((this.IsRunDayNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDayOfWeek() {
if ((this.IsRunDayOfWeekNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunMonth() {
if ((this.IsRunMonthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunStartInterval() {
if ((this.IsRunStartIntervalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeScheduledStartTime() {
if ((this.IsScheduledStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStartTime() {
if ((this.IsStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeBeforeRemoval() {
if ((this.IsTimeBeforeRemovalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeSubmitted() {
if ((this.IsTimeSubmittedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUntilTime() {
if ((this.IsUntilTimeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_MigrationJob";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1479,24 +1479,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static MigrationJobCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static MigrationJobCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static MigrationJobCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static MigrationJobCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static MigrationJobCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1517,15 +1517,15 @@ public static MigrationJobCollection GetInstances(System.Management.ManagementSc
}
return new MigrationJobCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static MigrationJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static MigrationJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static MigrationJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1542,7 +1542,7 @@ public static MigrationJobCollection GetInstances(System.Management.ManagementSc
ObjectSearcher.Options = enumOptions;
return new MigrationJobCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static MigrationJob CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1557,12 +1557,12 @@ public static MigrationJob CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new MigrationJob(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint GetError(out string Error) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1575,7 +1575,7 @@ public uint GetError(out string Error) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetErrorEx(out string[] Errors) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1588,7 +1588,7 @@ public uint GetErrorEx(out string[] Errors) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint KillJob(bool DeleteOnKill) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1601,7 +1601,7 @@ public uint KillJob(bool DeleteOnKill) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1615,57 +1615,57 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public enum JobTypeValues {
-
+
Unknown0 = 0,
-
+
Creating_Remote_Virtual_Machine = 300,
-
+
Checking_Virtual_Machine_Compatibility = 301,
-
+
Checking_Virtual_Machine_and_Storage_Compatibility = 302,
-
+
Checking_Storage_Compatibility = 303,
-
+
Checking_Storage_Migration = 304,
-
+
Moving_Virtual_Machine = 305,
-
+
Moving_Virtual_Machine_and_Storage = 306,
-
+
Moving_Storage = 307,
-
+
NULL_ENUM_VALUE = 308,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class MigrationJobCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public MigrationJobCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1673,189 +1673,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new MigrationJob(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new MigrationJobEnumerator(privColObj.GetEnumerator());
}
-
+
public class MigrationJobEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public MigrationJobEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new MigrationJob(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs
index c21c71cc6d4d..f8e0a73f2ed7 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_ProcessorSettingData
public class ProcessorSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_ProcessorSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ProcessorSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public ProcessorSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(ProcessorSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public ProcessorSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ProcessorSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public ProcessorSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ProcessorSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ProcessorSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ProcessorSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ProcessorSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public ProcessorSettingData(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ProcessorSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public ProcessorSettingData(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -228,7 +228,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -236,7 +236,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -244,7 +244,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -257,7 +257,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -269,7 +269,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -282,7 +282,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -294,7 +294,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -302,7 +302,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -310,7 +310,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -323,7 +323,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -335,7 +335,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -343,7 +343,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -351,7 +351,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -359,7 +359,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -367,7 +367,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -380,7 +380,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -392,7 +392,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitCPUIDNull {
@@ -405,7 +405,7 @@ public bool IsLimitCPUIDNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the virtual machine should lower the CPU identifier. Some older" +
@@ -420,7 +420,7 @@ public bool LimitCPUID {
return ((bool)(curObj["LimitCPUID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitProcessorFeaturesNull {
@@ -433,7 +433,7 @@ public bool IsLimitProcessorFeaturesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Indicates whether the VM should limit the CPU features exposed to the operating system. Limiting the processor features enables the VM to be migrated to different host computer systems with different processors. Migrating VMs between computers with processors from different vendors is not supported.")]
@@ -446,7 +446,7 @@ public bool LimitProcessorFeatures {
return ((bool)(curObj["LimitProcessorFeatures"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -459,7 +459,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -471,7 +471,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxNumaNodesPerSocketNull {
@@ -484,7 +484,7 @@ public bool IsMaxNumaNodesPerSocketNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum number of NUMA nodes that can be observed within the VM as belonging " +
@@ -498,7 +498,7 @@ public ulong MaxNumaNodesPerSocket {
return ((ulong)(curObj["MaxNumaNodesPerSocket"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxProcessorsPerNumaNodeNull {
@@ -511,7 +511,7 @@ public bool IsMaxProcessorsPerNumaNodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum number of virtual processors that can be observed within the VM as be" +
@@ -525,7 +525,7 @@ public ulong MaxProcessorsPerNumaNode {
return ((ulong)(curObj["MaxProcessorsPerNumaNode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -533,7 +533,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -541,7 +541,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -549,7 +549,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -562,7 +562,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -574,7 +574,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -582,7 +582,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -595,7 +595,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -607,7 +607,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -620,7 +620,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -632,7 +632,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -640,7 +640,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -653,7 +653,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -665,9 +665,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -675,9 +675,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -694,123 +694,123 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimitCPUID() {
if ((this.IsLimitCPUIDNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimitProcessorFeatures() {
if ((this.IsLimitProcessorFeaturesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxNumaNodesPerSocket() {
if ((this.IsMaxNumaNodesPerSocketNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxProcessorsPerNumaNode() {
if ((this.IsMaxProcessorsPerNumaNodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ProcessorSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -822,24 +822,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ProcessorSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ProcessorSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ProcessorSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ProcessorSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ProcessorSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -860,15 +860,15 @@ public static ProcessorSettingDataCollection GetInstances(System.Management.Mana
}
return new ProcessorSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ProcessorSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ProcessorSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ProcessorSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -885,7 +885,7 @@ public static ProcessorSettingDataCollection GetInstances(System.Management.Mana
ObjectSearcher.Options = enumOptions;
return new ProcessorSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ProcessorSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -900,39 +900,39 @@ public static ProcessorSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ProcessorSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ProcessorSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ProcessorSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -940,189 +940,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ProcessorSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ProcessorSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class ProcessorSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ProcessorSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ProcessorSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs
index a75837e15ecf..dc097e1852a5 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs
@@ -24,70 +24,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_ResourceAllocationSettingData
public class ResourceAllocationSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_ResourceAllocationSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ResourceAllocationSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public ResourceAllocationSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(ResourceAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ResourceAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public ResourceAllocationSettingData(System.Management.ManagementObject theObjec
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ResourceAllocationSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public ResourceAllocationSettingData(System.Management.ManagementBaseObject theO
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -229,7 +229,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -237,7 +237,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -245,7 +245,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -258,7 +258,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -270,7 +270,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -283,7 +283,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -295,7 +295,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -303,7 +303,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -311,7 +311,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -324,7 +324,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -336,7 +336,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -344,7 +344,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -352,7 +352,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -360,7 +360,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -368,7 +368,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -381,7 +381,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -393,7 +393,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -406,7 +406,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -418,7 +418,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -426,7 +426,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -434,7 +434,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -442,7 +442,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -455,7 +455,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -467,7 +467,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -475,7 +475,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -488,7 +488,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -500,7 +500,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -513,7 +513,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -525,7 +525,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -533,7 +533,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"A free-form string array of identifiers of this resource presented to the virtual computer system's operating system. These values are only used if the ResourceType property is set to 6 (Parallel SCSI HBA) and the ResourceSubType property is set to ""Microsoft Synthetic SCSI Controller"". This property is set to ""GUID"".
@@ -544,7 +544,7 @@ public string[] VirtualSystemIdentifiers {
return ((string[])(curObj["VirtualSystemIdentifiers"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -557,7 +557,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -569,9 +569,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -579,9 +579,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -598,95 +598,95 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ResourceAllocationSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -698,24 +698,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ResourceAllocationSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -736,15 +736,15 @@ public static ResourceAllocationSettingDataCollection GetInstances(System.Manage
}
return new ResourceAllocationSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ResourceAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -761,7 +761,7 @@ public static ResourceAllocationSettingDataCollection GetInstances(System.Manage
ObjectSearcher.Options = enumOptions;
return new ResourceAllocationSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ResourceAllocationSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -776,39 +776,39 @@ public static ResourceAllocationSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ResourceAllocationSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ResourceAllocationSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ResourceAllocationSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -816,189 +816,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ResourceAllocationSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ResourceAllocationSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class ResourceAllocationSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ResourceAllocationSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ResourceAllocationSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ShutdownComponent.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ShutdownComponent.cs
index 81613ea88f49..678f80b0bf6e 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ShutdownComponent.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ShutdownComponent.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_ShutdownComponent
public class ShutdownComponent : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_ShutdownComponent";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public ShutdownComponent() {
this.InitializeObject(null, null, null);
}
-
+
public ShutdownComponent(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(ShutdownComponent.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ShutdownComponent(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(ShutdownComponent.ConstructPath(keyCreationClassName, keyDeviceID, keySystemCreationClassName, keySystemName)), null);
}
-
+
public ShutdownComponent(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public ShutdownComponent(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public ShutdownComponent(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public ShutdownComponent(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public ShutdownComponent(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public ShutdownComponent(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public ShutdownComponent(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public ShutdownComponent(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AdditionalAvailability {
@@ -229,7 +229,7 @@ public ushort[] AdditionalAvailability {
return ((ushort[])(curObj["AdditionalAvailability"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailabilityNull {
@@ -242,7 +242,7 @@ public bool IsAvailabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -254,7 +254,7 @@ public ushort Availability {
return ((ushort)(curObj["Availability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -262,7 +262,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -270,7 +270,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -283,7 +283,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -295,7 +295,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -303,7 +303,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -311,7 +311,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -324,7 +324,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -336,7 +336,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string DeviceID {
@@ -344,7 +344,7 @@ public string DeviceID {
return ((string)(curObj["DeviceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -352,7 +352,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -365,7 +365,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -377,7 +377,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -390,7 +390,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -402,7 +402,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorClearedNull {
@@ -415,7 +415,7 @@ public bool IsErrorClearedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -427,7 +427,7 @@ public bool ErrorCleared {
return ((bool)(curObj["ErrorCleared"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -435,7 +435,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -448,7 +448,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -460,7 +460,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -468,7 +468,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -481,7 +481,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -495,7 +495,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -503,7 +503,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastErrorCodeNull {
@@ -516,7 +516,7 @@ public bool IsLastErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -528,7 +528,7 @@ public uint LastErrorCode {
return ((uint)(curObj["LastErrorCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxQuiesceTimeNull {
@@ -541,7 +541,7 @@ public bool IsMaxQuiesceTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -553,7 +553,7 @@ public ulong MaxQuiesceTime {
return ((ulong)(curObj["MaxQuiesceTime"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -561,7 +561,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -574,7 +574,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -586,7 +586,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -594,7 +594,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -602,7 +602,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -610,7 +610,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -618,7 +618,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerManagementSupportedNull {
@@ -631,7 +631,7 @@ public bool IsPowerManagementSupportedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -643,7 +643,7 @@ public bool PowerManagementSupported {
return ((bool)(curObj["PowerManagementSupported"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPowerOnHoursNull {
@@ -656,7 +656,7 @@ public bool IsPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -668,7 +668,7 @@ public ulong PowerOnHours {
return ((ulong)(curObj["PowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -681,7 +681,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -693,7 +693,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -706,7 +706,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -718,7 +718,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -726,7 +726,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -734,7 +734,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStatusInfoNull {
@@ -747,7 +747,7 @@ public bool IsStatusInfoNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -759,7 +759,7 @@ public ushort StatusInfo {
return ((ushort)(curObj["StatusInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -767,7 +767,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -775,7 +775,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -788,7 +788,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -802,7 +802,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTotalPowerOnHoursNull {
@@ -815,7 +815,7 @@ public bool IsTotalPowerOnHoursNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -827,7 +827,7 @@ public ulong TotalPowerOnHours {
return ((ulong)(curObj["TotalPowerOnHours"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -840,7 +840,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -852,9 +852,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -862,9 +862,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -881,56 +881,56 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAvailability() {
if ((this.IsAvailabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCleared() {
if ((this.IsErrorClearedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -982,13 +982,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1016,7 +1016,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1043,8 +1043,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1054,110 +1054,110 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLastErrorCode() {
if ((this.IsLastErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxQuiesceTime() {
if ((this.IsMaxQuiesceTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerManagementSupported() {
if ((this.IsPowerManagementSupportedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePowerOnHours() {
if ((this.IsPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStatusInfo() {
if ((this.IsStatusInfoNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTotalPowerOnHours() {
if ((this.IsTotalPowerOnHoursNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyDeviceID, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_ShutdownComponent";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -1166,7 +1166,7 @@ private static string ConstructPath(string keyCreationClassName, string keyDevic
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1178,24 +1178,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static ShutdownComponentCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static ShutdownComponentCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static ShutdownComponentCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static ShutdownComponentCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static ShutdownComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1216,15 +1216,15 @@ public static ShutdownComponentCollection GetInstances(System.Management.Managem
}
return new ShutdownComponentCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static ShutdownComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static ShutdownComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static ShutdownComponentCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1241,7 +1241,7 @@ public static ShutdownComponentCollection GetInstances(System.Management.Managem
ObjectSearcher.Options = enumOptions;
return new ShutdownComponentCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static ShutdownComponent CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1256,12 +1256,12 @@ public static ShutdownComponent CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new ShutdownComponent(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint EnableDevice(bool Enabled) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1274,7 +1274,7 @@ public uint EnableDevice(bool Enabled) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint InitiateShutdown(bool Force, string Reason) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1288,7 +1288,7 @@ public uint InitiateShutdown(bool Force, string Reason) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint OnlineDevice(bool Online) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1301,7 +1301,7 @@ public uint OnlineDevice(bool Online) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint QuiesceDevice(bool Quiesce) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1314,7 +1314,7 @@ public uint QuiesceDevice(bool Quiesce) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1333,7 +1333,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint Reset() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1344,7 +1344,7 @@ public uint Reset() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RestoreProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1355,7 +1355,7 @@ public uint RestoreProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SaveProperties() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1366,7 +1366,7 @@ public uint SaveProperties() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(ushort PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1380,34 +1380,34 @@ public uint SetPowerState(ushort PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class ShutdownComponentCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public ShutdownComponentCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1415,189 +1415,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new ShutdownComponent(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new ShutdownComponentEnumerator(privColObj.GetEnumerator());
}
-
+
public class ShutdownComponentEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public ShutdownComponentEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new ShutdownComponent(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs
index 602347f90dc3..b9b58816539d 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_StorageAllocationSettingData
public class StorageAllocationSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_StorageAllocationSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public StorageAllocationSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public StorageAllocationSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(StorageAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(StorageAllocationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public StorageAllocationSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public StorageAllocationSettingData(System.Management.ManagementObject theObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public StorageAllocationSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public StorageAllocationSettingData(System.Management.ManagementBaseObject theOb
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAccessNull {
@@ -233,7 +233,7 @@ public bool IsAccessNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -245,7 +245,7 @@ public ushort Access {
return ((ushort)(curObj["Access"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -253,7 +253,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -261,7 +261,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -269,7 +269,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -282,7 +282,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -294,7 +294,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -307,7 +307,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -319,7 +319,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -327,7 +327,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -335,7 +335,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -348,7 +348,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -360,7 +360,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -368,7 +368,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -376,7 +376,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string HostExtentName {
@@ -384,7 +384,7 @@ public string HostExtentName {
return ((string)(curObj["HostExtentName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHostExtentNameFormatNull {
@@ -397,7 +397,7 @@ public bool IsHostExtentNameFormatNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -409,7 +409,7 @@ public ushort HostExtentNameFormat {
return ((ushort)(curObj["HostExtentNameFormat"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHostExtentNameNamespaceNull {
@@ -422,7 +422,7 @@ public bool IsHostExtentNameNamespaceNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -434,7 +434,7 @@ public ushort HostExtentNameNamespace {
return ((ushort)(curObj["HostExtentNameNamespace"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHostExtentStartingAddressNull {
@@ -447,7 +447,7 @@ public bool IsHostExtentStartingAddressNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -459,7 +459,7 @@ public ulong HostExtentStartingAddress {
return ((ulong)(curObj["HostExtentStartingAddress"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -467,7 +467,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHostResourceBlockSizeNull {
@@ -480,7 +480,7 @@ public bool IsHostResourceBlockSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -492,7 +492,7 @@ public ulong HostResourceBlockSize {
return ((ulong)(curObj["HostResourceBlockSize"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -500,7 +500,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -513,7 +513,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -525,7 +525,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -538,7 +538,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -550,7 +550,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherHostExtentNameFormat {
@@ -558,7 +558,7 @@ public string OtherHostExtentNameFormat {
return ((string)(curObj["OtherHostExtentNameFormat"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherHostExtentNameNamespace {
@@ -566,7 +566,7 @@ public string OtherHostExtentNameNamespace {
return ((string)(curObj["OtherHostExtentNameNamespace"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -574,7 +574,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -582,7 +582,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -590,7 +590,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -603,7 +603,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -615,7 +615,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -623,7 +623,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -636,7 +636,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -648,7 +648,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -661,7 +661,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -673,7 +673,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -681,7 +681,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualResourceBlockSizeNull {
@@ -694,7 +694,7 @@ public bool IsVirtualResourceBlockSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -706,7 +706,7 @@ public ulong VirtualResourceBlockSize {
return ((ulong)(curObj["VirtualResourceBlockSize"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -719,7 +719,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -731,9 +731,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -741,9 +741,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -760,137 +760,137 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAccess() {
if ((this.IsAccessNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHostExtentNameFormat() {
if ((this.IsHostExtentNameFormatNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHostExtentNameNamespace() {
if ((this.IsHostExtentNameNamespaceNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHostExtentStartingAddress() {
if ((this.IsHostExtentStartingAddressNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHostResourceBlockSize() {
if ((this.IsHostResourceBlockSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualResourceBlockSize() {
if ((this.IsVirtualResourceBlockSizeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_StorageAllocationSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -902,24 +902,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static StorageAllocationSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -940,15 +940,15 @@ public static StorageAllocationSettingDataCollection GetInstances(System.Managem
}
return new StorageAllocationSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static StorageAllocationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -965,7 +965,7 @@ public static StorageAllocationSettingDataCollection GetInstances(System.Managem
ObjectSearcher.Options = enumOptions;
return new StorageAllocationSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static StorageAllocationSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -980,39 +980,39 @@ public static StorageAllocationSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new StorageAllocationSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class StorageAllocationSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public StorageAllocationSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1020,189 +1020,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new StorageAllocationSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new StorageAllocationSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class StorageAllocationSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public StorageAllocationSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new StorageAllocationSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageJob.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageJob.cs
index 5a101f1bfeb4..2daa32f914ea 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageJob.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageJob.cs
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_StorageJob
public class StorageJob : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_StorageJob";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public StorageJob() {
this.InitializeObject(null, null, null);
}
-
+
public StorageJob(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(StorageJob.ConstructPath(keyInstanceID)), null);
}
-
+
public StorageJob(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(StorageJob.ConstructPath(keyInstanceID)), null);
}
-
+
public StorageJob(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public StorageJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public StorageJob(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public StorageJob(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public StorageJob(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public StorageJob(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public StorageJob(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public StorageJob(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCancellableNull {
@@ -234,7 +234,7 @@ public bool IsCancellableNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the job can be cancelled. The value of this property does not g" +
@@ -248,7 +248,7 @@ public bool Cancellable {
return ((bool)(curObj["Cancellable"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -256,7 +256,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("On failure of the asynchronous operation, this property contains the file path to" +
@@ -266,7 +266,7 @@ public string Child {
return ((string)(curObj["Child"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -279,7 +279,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -291,7 +291,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDeleteOnCompletionNull {
@@ -304,7 +304,7 @@ public bool IsDeleteOnCompletionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -316,7 +316,7 @@ public bool DeleteOnCompletion {
return ((bool)(curObj["DeleteOnCompletion"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -324,7 +324,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -337,7 +337,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -349,7 +349,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsElapsedTimeNull {
@@ -362,7 +362,7 @@ public bool IsElapsedTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -376,7 +376,7 @@ public System.DateTime ElapsedTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -384,7 +384,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsErrorCodeNull {
@@ -397,7 +397,7 @@ public bool IsErrorCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -409,7 +409,7 @@ public ushort ErrorCode {
return ((ushort)(curObj["ErrorCode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorDescription {
@@ -417,7 +417,7 @@ public string ErrorDescription {
return ((string)(curObj["ErrorDescription"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ErrorSummaryDescription {
@@ -425,7 +425,7 @@ public string ErrorSummaryDescription {
return ((string)(curObj["ErrorSummaryDescription"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -438,7 +438,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -450,7 +450,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -463,7 +463,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -477,7 +477,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -485,7 +485,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobCompletionStatusCodeNull {
@@ -498,7 +498,7 @@ public bool IsJobCompletionStatusCodeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The HRESULT code that describes the completion status for the asynchronous operat" +
@@ -512,7 +512,7 @@ public uint JobCompletionStatusCode {
return ((uint)(curObj["JobCompletionStatusCode"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobRunTimesNull {
@@ -525,7 +525,7 @@ public bool IsJobRunTimesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -537,7 +537,7 @@ public uint JobRunTimes {
return ((uint)(curObj["JobRunTimes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobStateNull {
@@ -550,7 +550,7 @@ public bool IsJobStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -562,7 +562,7 @@ public ushort JobState {
return ((ushort)(curObj["JobState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string JobStatus {
@@ -570,7 +570,7 @@ public string JobStatus {
return ((string)(curObj["JobStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsJobTypeNull {
@@ -583,7 +583,7 @@ public bool IsJobTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The type of asynchronous operation being tracked by this instance of Msvm_StorageJob.
@@ -607,7 +607,7 @@ public JobTypeValues JobType {
return ((JobTypeValues)(System.Convert.ToInt32(curObj["JobType"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLocalOrUtcTimeNull {
@@ -620,7 +620,7 @@ public bool IsLocalOrUtcTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -632,7 +632,7 @@ public ushort LocalOrUtcTime {
return ((ushort)(curObj["LocalOrUtcTime"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -640,7 +640,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Notify {
@@ -648,7 +648,7 @@ public string Notify {
return ((string)(curObj["Notify"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -661,7 +661,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -673,7 +673,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -681,7 +681,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherRecoveryAction {
@@ -689,7 +689,7 @@ public string OtherRecoveryAction {
return ((string)(curObj["OtherRecoveryAction"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Owner {
@@ -697,7 +697,7 @@ public string Owner {
return ((string)(curObj["Owner"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("On failure of the asynchronous operation, this property contains the file path to" +
@@ -707,7 +707,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentCompleteNull {
@@ -720,7 +720,7 @@ public bool IsPercentCompleteNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -732,7 +732,7 @@ public ushort PercentComplete {
return ((ushort)(curObj["PercentComplete"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -745,7 +745,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -757,7 +757,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPriorityNull {
@@ -770,7 +770,7 @@ public bool IsPriorityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -782,7 +782,7 @@ public uint Priority {
return ((uint)(curObj["Priority"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRecoveryActionNull {
@@ -795,7 +795,7 @@ public bool IsRecoveryActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -807,7 +807,7 @@ public ushort RecoveryAction {
return ((ushort)(curObj["RecoveryAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayNull {
@@ -820,7 +820,7 @@ public bool IsRunDayNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -832,7 +832,7 @@ public sbyte RunDay {
return ((sbyte)(curObj["RunDay"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunDayOfWeekNull {
@@ -845,7 +845,7 @@ public bool IsRunDayOfWeekNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -857,7 +857,7 @@ public sbyte RunDayOfWeek {
return ((sbyte)(curObj["RunDayOfWeek"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunMonthNull {
@@ -870,7 +870,7 @@ public bool IsRunMonthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -882,7 +882,7 @@ public byte RunMonth {
return ((byte)(curObj["RunMonth"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRunStartIntervalNull {
@@ -895,7 +895,7 @@ public bool IsRunStartIntervalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -909,7 +909,7 @@ public System.DateTime RunStartInterval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsScheduledStartTimeNull {
@@ -922,7 +922,7 @@ public bool IsScheduledStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -936,7 +936,7 @@ public System.DateTime ScheduledStartTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartTimeNull {
@@ -949,7 +949,7 @@ public bool IsStartTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -963,7 +963,7 @@ public System.DateTime StartTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -971,7 +971,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -979,7 +979,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeBeforeRemovalNull {
@@ -992,7 +992,7 @@ public bool IsTimeBeforeRemovalNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1006,7 +1006,7 @@ public System.DateTime TimeBeforeRemoval {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -1019,7 +1019,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1033,7 +1033,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeSubmittedNull {
@@ -1046,7 +1046,7 @@ public bool IsTimeSubmittedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1060,7 +1060,7 @@ public System.DateTime TimeSubmitted {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUntilTimeNull {
@@ -1073,7 +1073,7 @@ public bool IsUntilTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1087,9 +1087,9 @@ public System.DateTime UntilTime {
}
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1097,9 +1097,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1116,35 +1116,35 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCancellable() {
if ((this.IsCancellableNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDeleteOnCompletion() {
if ((this.IsDeleteOnCompletionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1196,13 +1196,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1230,7 +1230,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1257,8 +1257,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1268,200 +1268,200 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeElapsedTime() {
if ((this.IsElapsedTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeErrorCode() {
if ((this.IsErrorCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobCompletionStatusCode() {
if ((this.IsJobCompletionStatusCodeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobRunTimes() {
if ((this.IsJobRunTimesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobState() {
if ((this.IsJobStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeJobType() {
if ((this.IsJobTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLocalOrUtcTime() {
if ((this.IsLocalOrUtcTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentComplete() {
if ((this.IsPercentCompleteNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePriority() {
if ((this.IsPriorityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRecoveryAction() {
if ((this.IsRecoveryActionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDay() {
if ((this.IsRunDayNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunDayOfWeek() {
if ((this.IsRunDayOfWeekNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunMonth() {
if ((this.IsRunMonthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRunStartInterval() {
if ((this.IsRunStartIntervalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeScheduledStartTime() {
if ((this.IsScheduledStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStartTime() {
if ((this.IsStartTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeBeforeRemoval() {
if ((this.IsTimeBeforeRemovalNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeSubmitted() {
if ((this.IsTimeSubmittedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUntilTime() {
if ((this.IsUntilTimeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_StorageJob";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1473,24 +1473,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static StorageJobCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static StorageJobCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static StorageJobCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static StorageJobCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static StorageJobCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1511,15 +1511,15 @@ public static StorageJobCollection GetInstances(System.Management.ManagementScop
}
return new StorageJobCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static StorageJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static StorageJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static StorageJobCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1536,7 +1536,7 @@ public static StorageJobCollection GetInstances(System.Management.ManagementScop
ObjectSearcher.Options = enumOptions;
return new StorageJobCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static StorageJob CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1551,12 +1551,12 @@ public static StorageJob CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new StorageJob(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint GetError(out string Error) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1569,7 +1569,7 @@ public uint GetError(out string Error) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetErrorEx(out string[] Errors) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1582,7 +1582,7 @@ public uint GetErrorEx(out string[] Errors) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint KillJob(bool DeleteOnKill) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1595,7 +1595,7 @@ public uint KillJob(bool DeleteOnKill) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1609,59 +1609,59 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public enum JobTypeValues {
-
+
Unknown0 = 0,
-
+
VHD_Creation = 1,
-
+
Floppy_Creation = 2,
-
+
Compaction = 3,
-
+
Expansion = 4,
-
+
Merging = 5,
-
+
Conversion = 6,
-
+
Loopback_Mount = 7,
-
+
Get_VHD_Info = 8,
-
+
Validate_VHD_Image = 9,
-
+
NULL_ENUM_VALUE = 10,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class StorageJobCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public StorageJobCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1669,189 +1669,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new StorageJob(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new StorageJobEnumerator(privColObj.GetEnumerator());
}
-
+
public class StorageJobEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public StorageJobEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new StorageJob(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs
index a9523b79851c..b12d9c7eaadf 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs
@@ -23,102 +23,102 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
- //
- //
- //
- //
+ //
+ //
+ //
+ //
// If the embedded property is strongly typed then, to strongly type the property to the type of
// the embedded object, you have to do the following things.
// 1. Generate Managed class for the WMI class of the embedded property. This can be done with MgmtClassGen.exe tool or from Server Explorer.
// 2. Include the namespace of the generated class.
// 3. Change the property get/set functions so as return the instance of the Managed class.
// Below is a sample code.
- //
+ //
// VB Code
- //
- //
- //
+ //
+ //
+ //
// Property name
// Managed class name of Embedded Property
- //
- //
- //
- //
- //
- //
+ //
+ //
+ //
+ //
+ //
+ //
// C# Code
- //
- //
- //
+ //
+ //
+ //
// Managed class name of Embedded property
// Property name
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
// An Early Bound class generated for the WMI class.Msvm_SummaryInformation
public class SummaryInformation : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_SummaryInformation";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public SummaryInformation() {
this.InitializeObject(null, null, null);
}
-
+
public SummaryInformation(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public SummaryInformation(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public SummaryInformation(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public SummaryInformation(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public SummaryInformation(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -130,7 +130,7 @@ public SummaryInformation(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public SummaryInformation(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -143,7 +143,7 @@ public SummaryInformation(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -152,7 +152,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -161,7 +161,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -170,7 +170,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -179,7 +179,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -207,7 +207,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -219,7 +219,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -240,7 +240,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -252,7 +252,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The identifier of the physical graphics processing unit (GPU) allocated to this v" +
@@ -262,7 +262,7 @@ public string AllocatedGPU {
return ((string)(curObj["AllocatedGPU"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsApplicationHealthNull {
@@ -275,7 +275,7 @@ public bool IsApplicationHealthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The current application health status for the virtual system. This property may be one of the following values: ""OK""; ""Application Critical""; ""Disabled"".For more information, see the documentation for the StatusDescriptions property of the Msvm_HeartbeatComponent class. This property is not valid for instances of Msvm_SummaryInformation representing a virtual system snapshot.")]
@@ -288,7 +288,7 @@ public ApplicationHealthValues ApplicationHealth {
return ((ApplicationHealthValues)(System.Convert.ToInt32(curObj["ApplicationHealth"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("An array of Msvm_ConcreteJob instances representing any asynchronous operations r" +
@@ -300,7 +300,7 @@ public System.Management.ManagementBaseObject[] AsynchronousTasks {
return ((System.Management.ManagementBaseObject[])(curObj["AsynchronousTasks"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAvailableMemoryBufferNull {
@@ -313,7 +313,7 @@ public bool IsAvailableMemoryBufferNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The available memory buffer percentage in the virtual system.")]
@@ -326,7 +326,7 @@ public int AvailableMemoryBuffer {
return ((int)(curObj["AvailableMemoryBuffer"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCreationTimeNull {
@@ -339,7 +339,7 @@ public bool IsCreationTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The time at which the virtual system or snapshot was created.")]
@@ -354,7 +354,7 @@ public System.DateTime CreationTime {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The friendly name for the virtual system or snapshot.")]
@@ -363,7 +363,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -376,7 +376,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current state of the virtual system or snapshot.")]
@@ -389,7 +389,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The name of the guest operating system, if available. If this information is not " +
@@ -400,7 +400,7 @@ public string GuestOperatingSystem {
return ((string)(curObj["GuestOperatingSystem"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -413,7 +413,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current health state for the virtual system. This property is not valid for i" +
@@ -427,7 +427,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHeartbeatNull {
@@ -440,7 +440,7 @@ public bool IsHeartbeatNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The current heartbeat status for the virtual system. This property may be one of the following values: ""OK""; ""Error""; ""No Contact""; or ""Lost Communication"". For more information, see the documentation for the StatusDescriptions property of the Msvm_HeartbeatComponent class. This property is not valid for instances of Msvm_SummaryInformation representing a virtual system snapshot.")]
@@ -453,7 +453,7 @@ public ushort Heartbeat {
return ((ushort)(curObj["Heartbeat"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIntegrationServicesVersionStateNull {
@@ -466,7 +466,7 @@ public bool IsIntegrationServicesVersionStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Whether or not the integration services installed in the virtual machine are up t" +
@@ -480,7 +480,7 @@ public IntegrationServicesVersionStateValues IntegrationServicesVersionState {
return ((IntegrationServicesVersionStateValues)(System.Convert.ToInt32(curObj["IntegrationServicesVersionState"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMemoryAvailableNull {
@@ -493,7 +493,7 @@ public bool IsMemoryAvailableNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The memory available percentage in the virtual system.")]
@@ -506,7 +506,7 @@ public int MemoryAvailable {
return ((int)(curObj["MemoryAvailable"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMemorySpansPhysicalNumaNodesNull {
@@ -519,7 +519,7 @@ public bool IsMemorySpansPhysicalNumaNodesNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether or not the memory of the one or more of the virtual non-uniform" +
@@ -534,7 +534,7 @@ public bool MemorySpansPhysicalNumaNodes {
return ((bool)(curObj["MemorySpansPhysicalNumaNodes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMemoryUsageNull {
@@ -547,7 +547,7 @@ public bool IsMemoryUsageNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current memory usage of the virtual system. This property is not valid for in" +
@@ -561,7 +561,7 @@ public ulong MemoryUsage {
return ((ulong)(curObj["MemoryUsage"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The unique name for the virtual system or snapshot.")]
@@ -570,7 +570,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The notes associated with the virtual system or snapshot.")]
@@ -579,7 +579,7 @@ public string Notes {
return ((string)(curObj["Notes"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfProcessorsNull {
@@ -592,7 +592,7 @@ public bool IsNumberOfProcessorsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The total number of virtual processors allocated to the virtual system or snapsho" +
@@ -606,7 +606,7 @@ public ushort NumberOfProcessors {
return ((ushort)(curObj["NumberOfProcessors"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current status of the element.")]
@@ -615,7 +615,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A string that describes the enabled or disabled state of the element when the Ena" +
@@ -626,7 +626,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProcessorLoadNull {
@@ -639,7 +639,7 @@ public bool IsProcessorLoadNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The current processor usage of the virtual system. This property is not valid for" +
@@ -653,7 +653,7 @@ public ushort ProcessorLoad {
return ((ushort)(curObj["ProcessorLoad"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("An array of the previous 100 samples of the processor usage for the virtual syste" +
@@ -664,7 +664,7 @@ public ushort[] ProcessorLoadHistory {
return ((ushort[])(curObj["ProcessorLoadHistory"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationHealthNull {
@@ -677,7 +677,7 @@ public bool IsReplicationHealthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Replication health for the virtual machine.")]
@@ -690,7 +690,7 @@ public ReplicationHealthValues ReplicationHealth {
return ((ReplicationHealthValues)(System.Convert.ToInt32(curObj["ReplicationHealth"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationModeNull {
@@ -703,7 +703,7 @@ public bool IsReplicationModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Identifies replication type for the virtual machine.")]
@@ -716,7 +716,7 @@ public ReplicationModeValues ReplicationMode {
return ((ReplicationModeValues)(System.Convert.ToInt32(curObj["ReplicationMode"])));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReplicationStateNull {
@@ -729,7 +729,7 @@ public bool IsReplicationStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Replication state for the virtual machine.")]
@@ -742,7 +742,7 @@ public ReplicationStateValues ReplicationState {
return ((ReplicationStateValues)(System.Convert.ToInt32(curObj["ReplicationState"])));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("An array of Msvm_VirtualSystemSettingData instances representing the snapshots fo" +
@@ -753,7 +753,7 @@ public System.Management.ManagementBaseObject[] Snapshots {
return ((System.Management.ManagementBaseObject[])(curObj["Snapshots"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Strings that describe the various OperationalStatus array values.")]
@@ -762,7 +762,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsSwapFilesInUseNull {
@@ -775,7 +775,7 @@ public bool IsSwapFilesInUseNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indecates if smart paging is active.")]
@@ -788,7 +788,7 @@ public bool SwapFilesInUse {
return ((bool)(curObj["SwapFilesInUse"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Reference to the CIM_ComputerSystem instance representing the test replica virtua" +
@@ -802,7 +802,7 @@ public System.Management.ManagementPath TestReplicaSystem {
return null;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("An array containing a small, thumbnail-sized image of the desktop for the virtual" +
@@ -812,7 +812,7 @@ public byte[] ThumbnailImage {
return ((byte[])(curObj["ThumbnailImage"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsUpTimeNull {
@@ -825,7 +825,7 @@ public bool IsUpTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The amount of time since the virtual system was last booted. This property is not" +
@@ -840,9 +840,9 @@ public ulong UpTime {
return ((ulong)(curObj["UpTime"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -850,9 +850,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -869,21 +869,21 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeApplicationHealth() {
if ((this.IsApplicationHealthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAvailableMemoryBuffer() {
if ((this.IsAvailableMemoryBufferNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -935,13 +935,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -969,7 +969,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -996,8 +996,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1007,136 +1007,136 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeCreationTime() {
if ((this.IsCreationTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHeartbeat() {
if ((this.IsHeartbeatNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeIntegrationServicesVersionState() {
if ((this.IsIntegrationServicesVersionStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMemoryAvailable() {
if ((this.IsMemoryAvailableNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMemorySpansPhysicalNumaNodes() {
if ((this.IsMemorySpansPhysicalNumaNodesNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMemoryUsage() {
if ((this.IsMemoryUsageNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumberOfProcessors() {
if ((this.IsNumberOfProcessorsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProcessorLoad() {
if ((this.IsProcessorLoadNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationHealth() {
if ((this.IsReplicationHealthNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationMode() {
if ((this.IsReplicationModeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReplicationState() {
if ((this.IsReplicationStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeSwapFilesInUse() {
if ((this.IsSwapFilesInUseNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeUpTime() {
if ((this.IsUpTimeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath() {
string strPath = "ROOT\\virtualization\\v2:Msvm_SummaryInformation";
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1148,24 +1148,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static SummaryInformationCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static SummaryInformationCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static SummaryInformationCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static SummaryInformationCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static SummaryInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1186,15 +1186,15 @@ public static SummaryInformationCollection GetInstances(System.Management.Manage
}
return new SummaryInformationCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static SummaryInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static SummaryInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static SummaryInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1211,7 +1211,7 @@ public static SummaryInformationCollection GetInstances(System.Management.Manage
ObjectSearcher.Options = enumOptions;
return new SummaryInformationCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static SummaryInformation CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1226,116 +1226,116 @@ public static SummaryInformation CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new SummaryInformation(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum ApplicationHealthValues {
-
+
OK = 2,
-
+
Application_Critical = 32782,
-
+
Disabled = 32896,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum IntegrationServicesVersionStateValues {
-
+
Unknown0 = 0,
-
+
UpToDate = 1,
-
+
Mismatch = 2,
-
+
NULL_ENUM_VALUE = 3,
}
-
+
public enum ReplicationHealthValues {
-
+
Not_applicable = 0,
-
+
Ok = 1,
-
+
Warning = 2,
-
+
Critical = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum ReplicationModeValues {
-
+
None = 0,
-
+
Primary = 1,
-
+
Recovery = 2,
-
+
Test_Replica = 3,
-
+
NULL_ENUM_VALUE = 4,
}
-
+
public enum ReplicationStateValues {
-
+
Disabled = 0,
-
+
Ready_for_replication = 1,
-
+
Waiting_to_complete_initial_replication = 2,
-
+
Replicating = 3,
-
+
Synced_replication_complete = 4,
-
+
Recovered = 5,
-
+
Committed = 6,
-
+
Suspended = 7,
-
+
Critical = 8,
-
+
Waiting_to_start_resynchronization = 9,
-
+
Resynchronizing = 10,
-
+
Resynchronization_suspended = 11,
-
+
NULL_ENUM_VALUE = 12,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class SummaryInformationCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public SummaryInformationCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1343,189 +1343,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new SummaryInformation(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new SummaryInformationEnumerator(privColObj.GetEnumerator());
}
-
+
public class SummaryInformationEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public SummaryInformationEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new SummaryInformation(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs
index caa74fe5ac0c..2e04d8541417 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_SyntheticEthernetPortSettingData
public class SyntheticEthernetPortSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_SyntheticEthernetPortSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public SyntheticEthernetPortSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public SyntheticEthernetPortSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(SyntheticEthernetPortSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(SyntheticEthernetPortSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public SyntheticEthernetPortSettingData(System.Management.ManagementObject theOb
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public SyntheticEthernetPortSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public SyntheticEthernetPortSettingData(System.Management.ManagementBaseObject t
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Address {
@@ -228,7 +228,7 @@ public string Address {
return ((string)(curObj["Address"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AddressOnParent {
@@ -236,7 +236,7 @@ public string AddressOnParent {
return ((string)(curObj["AddressOnParent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AllocationUnits {
@@ -244,7 +244,7 @@ public string AllocationUnits {
return ((string)(curObj["AllocationUnits"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticAllocationNull {
@@ -257,7 +257,7 @@ public bool IsAutomaticAllocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -269,7 +269,7 @@ public bool AutomaticAllocation {
return ((bool)(curObj["AutomaticAllocation"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticDeallocationNull {
@@ -282,7 +282,7 @@ public bool IsAutomaticDeallocationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -294,7 +294,7 @@ public bool AutomaticDeallocation {
return ((bool)(curObj["AutomaticDeallocation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -302,7 +302,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Connection {
@@ -310,7 +310,7 @@ public string[] Connection {
return ((string[])(curObj["Connection"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsConsumerVisibilityNull {
@@ -323,7 +323,7 @@ public bool IsConsumerVisibilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -335,7 +335,7 @@ public ushort ConsumerVisibility {
return ((ushort)(curObj["ConsumerVisibility"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -343,7 +343,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDesiredVLANEndpointModeNull {
@@ -356,7 +356,7 @@ public bool IsDesiredVLANEndpointModeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -368,7 +368,7 @@ public ushort DesiredVLANEndpointMode {
return ((ushort)(curObj["DesiredVLANEndpointMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -376,7 +376,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] HostResource {
@@ -384,7 +384,7 @@ public string[] HostResource {
return ((string[])(curObj["HostResource"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -392,7 +392,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLimitNull {
@@ -405,7 +405,7 @@ public bool IsLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -417,7 +417,7 @@ public ulong Limit {
return ((ulong)(curObj["Limit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMappingBehaviorNull {
@@ -430,7 +430,7 @@ public bool IsMappingBehaviorNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -442,7 +442,7 @@ public ushort MappingBehavior {
return ((ushort)(curObj["MappingBehavior"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEndpointMode {
@@ -450,7 +450,7 @@ public string OtherEndpointMode {
return ((string)(curObj["OtherEndpointMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherResourceType {
@@ -458,7 +458,7 @@ public string OtherResourceType {
return ((string)(curObj["OtherResourceType"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Parent {
@@ -466,7 +466,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PoolID {
@@ -474,7 +474,7 @@ public string PoolID {
return ((string)(curObj["PoolID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsReservationNull {
@@ -487,7 +487,7 @@ public bool IsReservationNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -499,7 +499,7 @@ public ulong Reservation {
return ((ulong)(curObj["Reservation"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ResourceSubType {
@@ -507,7 +507,7 @@ public string ResourceSubType {
return ((string)(curObj["ResourceSubType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResourceTypeNull {
@@ -520,7 +520,7 @@ public bool IsResourceTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -532,7 +532,7 @@ public ushort ResourceType {
return ((ushort)(curObj["ResourceType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStaticMacAddressNull {
@@ -545,7 +545,7 @@ public bool IsStaticMacAddressNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates a static MAC address.\nThis is a read-only property, but it can be chang" +
@@ -560,7 +560,7 @@ public bool StaticMacAddress {
return ((bool)(curObj["StaticMacAddress"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualQuantityNull {
@@ -573,7 +573,7 @@ public bool IsVirtualQuantityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -585,7 +585,7 @@ public ulong VirtualQuantity {
return ((ulong)(curObj["VirtualQuantity"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualQuantityUnits {
@@ -593,7 +593,7 @@ public string VirtualQuantityUnits {
return ((string)(curObj["VirtualQuantityUnits"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"A free-form string array of identifiers of this resource presented to the virtual computer system's operating system. The indexes and values per index are defined on a per resource basis (that is, for each enumerated ResourceType value). This property is set to ""GUID"".
@@ -603,7 +603,7 @@ public string[] VirtualSystemIdentifiers {
return ((string[])(curObj["VirtualSystemIdentifiers"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsWeightNull {
@@ -616,7 +616,7 @@ public bool IsWeightNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -628,9 +628,9 @@ public uint Weight {
return ((uint)(curObj["Weight"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -638,9 +638,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -657,109 +657,109 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAutomaticAllocation() {
if ((this.IsAutomaticAllocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticDeallocation() {
if ((this.IsAutomaticDeallocationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeConsumerVisibility() {
if ((this.IsConsumerVisibilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDesiredVLANEndpointMode() {
if ((this.IsDesiredVLANEndpointModeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeLimit() {
if ((this.IsLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMappingBehavior() {
if ((this.IsMappingBehaviorNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeReservation() {
if ((this.IsReservationNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResourceType() {
if ((this.IsResourceTypeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStaticMacAddress() {
if ((this.IsStaticMacAddressNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualQuantity() {
if ((this.IsVirtualQuantityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeWeight() {
if ((this.IsWeightNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_SyntheticEthernetPortSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -771,24 +771,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static SyntheticEthernetPortSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -809,15 +809,15 @@ public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Man
}
return new SyntheticEthernetPortSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -834,7 +834,7 @@ public static SyntheticEthernetPortSettingDataCollection GetInstances(System.Man
ObjectSearcher.Options = enumOptions;
return new SyntheticEthernetPortSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static SyntheticEthernetPortSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -849,39 +849,39 @@ public static SyntheticEthernetPortSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new SyntheticEthernetPortSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class SyntheticEthernetPortSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public SyntheticEthernetPortSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -889,189 +889,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new SyntheticEthernetPortSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new SyntheticEthernetPortSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class SyntheticEthernetPortSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public SyntheticEthernetPortSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new SyntheticEthernetPortSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs
index 1d54ea7be216..550494fe8fd3 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_VirtualEthernetSwitch
public class VirtualEthernetSwitch : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_VirtualEthernetSwitch";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualEthernetSwitch() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualEthernetSwitch(string keyCreationClassName, string keyName) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualEthernetSwitch.ConstructPath(keyCreationClassName, keyName)), null);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualEthernetSwitch.ConstructPath(keyCreationClassName, keyName)), null);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public VirtualEthernetSwitch(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualEthernetSwitch(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public VirtualEthernetSwitch(System.Management.ManagementBaseObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -229,7 +229,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -237,7 +237,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -250,7 +250,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -262,7 +262,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -270,7 +270,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] Dedicated {
@@ -278,7 +278,7 @@ public ushort[] Dedicated {
return ((ushort[])(curObj["Dedicated"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -286,7 +286,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -299,7 +299,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -311,7 +311,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -319,7 +319,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -332,7 +332,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -344,7 +344,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -357,7 +357,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -369,7 +369,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -382,7 +382,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -394,7 +394,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] IdentifyingDescriptions {
@@ -402,7 +402,7 @@ public string[] IdentifyingDescriptions {
return ((string[])(curObj["IdentifyingDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -415,7 +415,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -429,7 +429,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -437,7 +437,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxIOVOffloadsNull {
@@ -450,7 +450,7 @@ public bool IsMaxIOVOffloadsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum number of SR-IOV Virtual Function offloads available on this switch.")]
@@ -463,7 +463,7 @@ public uint MaxIOVOffloads {
return ((uint)(curObj["MaxIOVOffloads"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxVMQOffloadsNull {
@@ -476,7 +476,7 @@ public bool IsMaxVMQOffloadsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum number of VMQ offloads allowed for a port on this switch.")]
@@ -490,13 +490,13 @@ public uint MaxVMQOffloads {
}
set {
curObj["MaxVMQOffloads"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -504,7 +504,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string NameFormat {
@@ -512,7 +512,7 @@ public string NameFormat {
return ((string)(curObj["NameFormat"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -525,7 +525,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -537,7 +537,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -545,7 +545,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherDedicatedDescriptions {
@@ -553,7 +553,7 @@ public string[] OtherDedicatedDescriptions {
return ((string[])(curObj["OtherDedicatedDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -561,7 +561,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] OtherIdentifyingInfo {
@@ -569,7 +569,7 @@ public string[] OtherIdentifyingInfo {
return ((string[])(curObj["OtherIdentifyingInfo"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] PowerManagementCapabilities {
@@ -577,7 +577,7 @@ public ushort[] PowerManagementCapabilities {
return ((ushort[])(curObj["PowerManagementCapabilities"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -585,7 +585,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -593,7 +593,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -606,7 +606,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -618,7 +618,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -631,7 +631,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -643,7 +643,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResetCapabilityNull {
@@ -656,7 +656,7 @@ public bool IsResetCapabilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -668,7 +668,7 @@ public ushort ResetCapability {
return ((ushort)(curObj["ResetCapability"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Roles {
@@ -676,7 +676,7 @@ public string[] Roles {
return ((string[])(curObj["Roles"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -684,7 +684,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -692,7 +692,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -705,7 +705,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -719,7 +719,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -732,7 +732,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -744,9 +744,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -754,9 +754,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -773,42 +773,42 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -860,13 +860,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -894,7 +894,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -921,8 +921,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -932,104 +932,104 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxIOVOffloads() {
if ((this.IsMaxIOVOffloadsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeMaxVMQOffloads() {
if ((this.IsMaxVMQOffloadsNull == false)) {
return true;
}
return false;
}
-
+
private void ResetMaxVMQOffloads() {
curObj["MaxVMQOffloads"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeResetCapability() {
if ((this.IsResetCapabilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualEthernetSwitch";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
strPath = string.Concat(strPath, string.Concat(",Name=", string.Concat("\"", string.Concat(keyName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1041,24 +1041,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualEthernetSwitchCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1079,15 +1079,15 @@ public static VirtualEthernetSwitchCollection GetInstances(System.Management.Man
}
return new VirtualEthernetSwitchCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualEthernetSwitchCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1104,7 +1104,7 @@ public static VirtualEthernetSwitchCollection GetInstances(System.Management.Man
ObjectSearcher.Options = enumOptions;
return new VirtualEthernetSwitchCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualEthernetSwitch CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1119,12 +1119,12 @@ public static VirtualEthernetSwitch CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualEthernetSwitch(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1143,7 +1143,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetPowerState(uint PowerState, System.DateTime Time) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1157,34 +1157,34 @@ public uint SetPowerState(uint PowerState, System.DateTime Time) {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualEthernetSwitchCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualEthernetSwitchCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1192,189 +1192,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualEthernetSwitch(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualEthernetSwitchEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualEthernetSwitchEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualEthernetSwitchEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualEthernetSwitch(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs
index 639e0070f522..89ac24ea7558 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_VirtualEthernetSwitchManagementService
public class VirtualEthernetSwitchManagementService : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_VirtualEthernetSwitchManagementService";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualEthernetSwitchManagementService() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualEthernetSwitchManagementService(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualEthernetSwitchManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualEthernetSwitchManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public VirtualEthernetSwitchManagementService(System.Management.ManagementObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualEthernetSwitchManagementService(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public VirtualEthernetSwitchManagementService(System.Management.ManagementBaseOb
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -229,7 +229,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -237,7 +237,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -250,7 +250,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -262,7 +262,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -270,7 +270,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -278,7 +278,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -291,7 +291,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -303,7 +303,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -311,7 +311,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -324,7 +324,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -336,7 +336,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -349,7 +349,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -361,7 +361,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -374,7 +374,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -386,7 +386,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -399,7 +399,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -413,7 +413,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -421,7 +421,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -429,7 +429,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -442,7 +442,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -454,7 +454,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -462,7 +462,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -470,7 +470,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -478,7 +478,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -486,7 +486,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -499,7 +499,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -511,7 +511,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -524,7 +524,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -536,7 +536,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartedNull {
@@ -549,7 +549,7 @@ public bool IsStartedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -561,7 +561,7 @@ public bool Started {
return ((bool)(curObj["Started"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string StartMode {
@@ -569,7 +569,7 @@ public string StartMode {
return ((string)(curObj["StartMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -577,7 +577,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -585,7 +585,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -593,7 +593,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -601,7 +601,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -614,7 +614,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -628,7 +628,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -641,7 +641,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -653,9 +653,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -663,9 +663,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -682,42 +682,42 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -769,13 +769,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -803,7 +803,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -830,8 +830,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -841,75 +841,75 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStarted() {
if ((this.IsStartedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualEthernetSwitchManagementService";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -918,7 +918,7 @@ private static string ConstructPath(string keyCreationClassName, string keyName,
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -930,24 +930,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualEthernetSwitchManagementServiceCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -968,15 +968,15 @@ public static VirtualEthernetSwitchManagementServiceCollection GetInstances(Syst
}
return new VirtualEthernetSwitchManagementServiceCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualEthernetSwitchManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -993,7 +993,7 @@ public static VirtualEthernetSwitchManagementServiceCollection GetInstances(Syst
ObjectSearcher.Options = enumOptions;
return new VirtualEthernetSwitchManagementServiceCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualEthernetSwitchManagementService CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1008,12 +1008,12 @@ public static VirtualEthernetSwitchManagementService CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualEthernetSwitchManagementService(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint AddFeatureSettings(System.Management.ManagementPath AffectedConfiguration, string[] FeatureSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingFeatureSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1042,7 +1042,7 @@ public uint AddFeatureSettings(System.Management.ManagementPath AffectedConfigur
return System.Convert.ToUInt32(0);
}
}
-
+
public uint AddResourceSettings(System.Management.ManagementPath AffectedConfiguration, string[] ResourceSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingResourceSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1071,7 +1071,7 @@ public uint AddResourceSettings(System.Management.ManagementPath AffectedConfigu
return System.Convert.ToUInt32(0);
}
}
-
+
public uint DefineSystem(System.Management.ManagementPath ReferenceConfiguration, string[] ResourceSettings, string SystemSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath ResultingSystem) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1096,7 +1096,7 @@ public uint DefineSystem(System.Management.ManagementPath ReferenceConfiguration
return System.Convert.ToUInt32(0);
}
}
-
+
public uint DestroySystem(System.Management.ManagementPath AffectedSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1114,7 +1114,7 @@ public uint DestroySystem(System.Management.ManagementPath AffectedSystem, out S
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyFeatureSettings(string[] FeatureSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingFeatureSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1142,7 +1142,7 @@ public uint ModifyFeatureSettings(string[] FeatureSettings, out System.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyResourceSettings(string[] ResourceSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingResourceSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1170,7 +1170,7 @@ public uint ModifyResourceSettings(string[] ResourceSettings, out System.Managem
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifySystemSettings(string SystemSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1188,7 +1188,7 @@ public uint ModifySystemSettings(string SystemSettings, out System.Management.Ma
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveFeatureSettings(System.Management.ManagementPath[] FeatureSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1216,7 +1216,7 @@ public uint RemoveFeatureSettings(System.Management.ManagementPath[] FeatureSett
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveResourceSettings(System.Management.ManagementPath[] ResourceSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1245,7 +1245,7 @@ public uint RemoveResourceSettings(System.Management.ManagementPath[] ResourceSe
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1264,7 +1264,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StartService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1275,7 +1275,7 @@ public uint StartService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StopService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1286,34 +1286,34 @@ public uint StopService() {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualEthernetSwitchManagementServiceCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualEthernetSwitchManagementServiceCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1321,189 +1321,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualEthernetSwitchManagementService(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualEthernetSwitchManagementServiceEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualEthernetSwitchManagementServiceEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualEthernetSwitchManagementServiceEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualEthernetSwitchManagementService(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs
index 0a8aec37e58d..95b711f6489e 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_VirtualHardDiskSettingData
public class VirtualHardDiskSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_VirtualHardDiskSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualHardDiskSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualHardDiskSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualHardDiskSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualHardDiskSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public VirtualHardDiskSettingData(System.Management.ManagementObject theObject)
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualHardDiskSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public VirtualHardDiskSettingData(System.Management.ManagementBaseObject theObje
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsBlockSizeNull {
@@ -233,7 +233,7 @@ public bool IsBlockSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The block size used by the virtual hard disk")]
@@ -247,13 +247,13 @@ public uint BlockSize {
}
set {
curObj["BlockSize"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -262,13 +262,13 @@ public string Caption {
}
set {
curObj["Caption"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -277,13 +277,13 @@ public string Description {
}
set {
curObj["Description"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -292,13 +292,13 @@ public string ElementName {
}
set {
curObj["ElementName"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFormatNull {
@@ -311,7 +311,7 @@ public bool IsFormatNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The format for the virtual hard disk.")]
@@ -330,13 +330,13 @@ public FormatValues Format {
else {
curObj["Format"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -345,13 +345,13 @@ public string InstanceID {
}
set {
curObj["InstanceID"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLogicalSectorSizeNull {
@@ -364,7 +364,7 @@ public bool IsLogicalSectorSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The logical sector size used by the virtual hard disk")]
@@ -378,13 +378,13 @@ public uint LogicalSectorSize {
}
set {
curObj["LogicalSectorSize"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxInternalSizeNull {
@@ -397,7 +397,7 @@ public bool IsMaxInternalSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum size of the virtual hard disk as viewable by the virtual machine, in " +
@@ -413,13 +413,13 @@ public ulong MaxInternalSize {
}
set {
curObj["MaxInternalSize"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The parent of the virtual hard disk. If the virtual hard disk does not have a par" +
@@ -430,13 +430,13 @@ public string ParentPath {
}
set {
curObj["ParentPath"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The path of the virtual hard disk.")]
@@ -446,13 +446,13 @@ public string Path0 {
}
set {
curObj["Path"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPhysicalSectorSizeNull {
@@ -465,7 +465,7 @@ public bool IsPhysicalSectorSizeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The physical sector size used by the virtual hard disk")]
@@ -479,13 +479,13 @@ public uint PhysicalSectorSize {
}
set {
curObj["PhysicalSectorSize"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTypeNull {
@@ -498,7 +498,7 @@ public bool IsTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The type of virtual hard disk.")]
@@ -517,15 +517,15 @@ public TypeValues Type {
else {
curObj["Type"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -533,9 +533,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -552,162 +552,162 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeBlockSize() {
if ((this.IsBlockSizeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetBlockSize() {
curObj["BlockSize"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetCaption() {
curObj["Caption"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetDescription() {
curObj["Description"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetElementName() {
curObj["ElementName"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeFormat() {
if ((this.IsFormatNull == false)) {
return true;
}
return false;
}
-
+
private void ResetFormat() {
curObj["Format"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeLogicalSectorSize() {
if ((this.IsLogicalSectorSizeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetLogicalSectorSize() {
curObj["LogicalSectorSize"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeMaxInternalSize() {
if ((this.IsMaxInternalSizeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetMaxInternalSize() {
curObj["MaxInternalSize"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetParentPath() {
curObj["ParentPath"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetPath0() {
curObj["Path"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializePhysicalSectorSize() {
if ((this.IsPhysicalSectorSizeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetPhysicalSectorSize() {
curObj["PhysicalSectorSize"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeType() {
if ((this.IsTypeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetType() {
curObj["Type"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualHardDiskSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -719,24 +719,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualHardDiskSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -757,15 +757,15 @@ public static VirtualHardDiskSettingDataCollection GetInstances(System.Managemen
}
return new VirtualHardDiskSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualHardDiskSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -782,7 +782,7 @@ public static VirtualHardDiskSettingDataCollection GetInstances(System.Managemen
ObjectSearcher.Options = enumOptions;
return new VirtualHardDiskSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualHardDiskSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -797,59 +797,59 @@ public static VirtualHardDiskSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualHardDiskSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum FormatValues {
-
+
VHD = 2,
-
+
VHDX = 3,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
public enum TypeValues {
-
+
Fixed = 2,
-
+
Dynamic = 3,
-
+
Differencing = 4,
-
+
NULL_ENUM_VALUE = 0,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualHardDiskSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualHardDiskSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -857,189 +857,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualHardDiskSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualHardDiskSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualHardDiskSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualHardDiskSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualHardDiskSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
index ba014b1e322b..b327d81bf944 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
@@ -24,8 +24,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -33,62 +33,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_VirtualSystemManagementService
public class VirtualSystemManagementService : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Msvm_VirtualSystemManagementService";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualSystemManagementService() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualSystemManagementService(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualSystemManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualSystemManagementService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualSystemManagementService(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -100,7 +100,7 @@ public VirtualSystemManagementService(System.Management.ManagementObject theObje
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualSystemManagementService(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -113,7 +113,7 @@ public VirtualSystemManagementService(System.Management.ManagementBaseObject the
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -122,7 +122,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -131,7 +131,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -140,7 +140,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -149,7 +149,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -158,7 +158,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -177,7 +177,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -189,7 +189,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -210,7 +210,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -222,7 +222,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -230,7 +230,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -238,7 +238,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -251,7 +251,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -263,7 +263,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -271,7 +271,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -279,7 +279,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -292,7 +292,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -304,7 +304,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -312,7 +312,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -325,7 +325,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -337,7 +337,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -350,7 +350,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -362,7 +362,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -375,7 +375,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -387,7 +387,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -400,7 +400,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -414,7 +414,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -422,7 +422,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -430,7 +430,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -443,7 +443,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -455,7 +455,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -463,7 +463,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -471,7 +471,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -479,7 +479,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -487,7 +487,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -500,7 +500,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -512,7 +512,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -525,7 +525,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -537,7 +537,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartedNull {
@@ -550,7 +550,7 @@ public bool IsStartedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -562,7 +562,7 @@ public bool Started {
return ((bool)(curObj["Started"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string StartMode {
@@ -570,7 +570,7 @@ public string StartMode {
return ((string)(curObj["StartMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -578,7 +578,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -586,7 +586,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -594,7 +594,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -602,7 +602,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -615,7 +615,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -629,7 +629,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -642,7 +642,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -654,9 +654,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -664,9 +664,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -683,42 +683,42 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -770,13 +770,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -804,7 +804,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -831,8 +831,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -842,75 +842,75 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStarted() {
if ((this.IsStartedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualSystemManagementService";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -919,7 +919,7 @@ private static string ConstructPath(string keyCreationClassName, string keyName,
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -931,24 +931,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualSystemManagementServiceCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -969,15 +969,15 @@ public static VirtualSystemManagementServiceCollection GetInstances(System.Manag
}
return new VirtualSystemManagementServiceCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -994,7 +994,7 @@ public static VirtualSystemManagementServiceCollection GetInstances(System.Manag
ObjectSearcher.Options = enumOptions;
return new VirtualSystemManagementServiceCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualSystemManagementService CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1009,12 +1009,12 @@ public static VirtualSystemManagementService CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualSystemManagementService(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint AddFeatureSettings(System.Management.ManagementPath AffectedConfiguration, string[] FeatureSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingFeatureSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1045,7 +1045,7 @@ public uint AddFeatureSettings(System.Management.ManagementPath AffectedConfigur
return System.Convert.ToUInt32(0);
}
}
-
+
public uint AddFibreChannelChap(string[] FcPortSettings, byte SecretEncoding, byte[] SharedSecret) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1060,7 +1060,7 @@ public uint AddFibreChannelChap(string[] FcPortSettings, byte SecretEncoding, by
return System.Convert.ToUInt32(0);
}
}
-
+
public uint AddKvpItems(string[] DataItems, System.Management.ManagementPath TargetSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1080,7 +1080,7 @@ public uint AddKvpItems(string[] DataItems, System.Management.ManagementPath Tar
return System.Convert.ToUInt32(0);
}
}
-
+
public uint AddResourceSettings(System.Management.ManagementPath AffectedConfiguration, string[] ResourceSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingResourceSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1111,7 +1111,7 @@ public uint AddResourceSettings(System.Management.ManagementPath AffectedConfigu
return System.Convert.ToUInt32(0);
}
}
-
+
public uint DefineSystem(string ReferenceConfigurationPath, string[] ResourceSettings, string SystemSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath ResultingSystem) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1138,7 +1138,7 @@ public uint DefineSystem(string ReferenceConfigurationPath, string[] ResourceSet
return System.Convert.ToUInt32(0);
}
}
-
+
public uint DestroySystem(System.Management.ManagementPath AffectedSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1157,7 +1157,7 @@ public uint DestroySystem(System.Management.ManagementPath AffectedSystem, out S
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ExportSystemDefinition(System.Management.ManagementPath ComputerSystem, string ExportDirectory, string ExportSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1179,7 +1179,7 @@ public uint ExportSystemDefinition(System.Management.ManagementPath ComputerSyst
return System.Convert.ToUInt32(0);
}
}
-
+
public uint FormatError(string[] Errors, out string ErrorMessage) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1194,7 +1194,7 @@ public uint FormatError(string[] Errors, out string ErrorMessage) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GenerateWwpn(uint NumberOfWwpns, out string[] GeneratedWwpn) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1209,7 +1209,7 @@ public uint GenerateWwpn(uint NumberOfWwpns, out string[] GeneratedWwpn) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetCurrentWwpnFromGenerator(out string CurrentWwpn) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1222,7 +1222,7 @@ public uint GetCurrentWwpnFromGenerator(out string CurrentWwpn) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetDefinitionFileSummaryInformation(string[] DefinitionFiles, out System.Management.ManagementBaseObject[] SummaryInformation) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1237,7 +1237,7 @@ public uint GetDefinitionFileSummaryInformation(string[] DefinitionFiles, out Sy
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetSizeOfSystemFiles(System.Management.ManagementPath Vssd, out ulong Size) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1252,7 +1252,7 @@ public uint GetSizeOfSystemFiles(System.Management.ManagementPath Vssd, out ulon
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetSummaryInformation(uint[] RequestedInformation, System.Management.ManagementPath[] SettingData, out System.Management.ManagementBaseObject[] SummaryInformation) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1278,7 +1278,7 @@ public uint GetSummaryInformation(uint[] RequestedInformation, System.Management
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetVirtualSystemThumbnailImage(ushort HeightPixels, System.Management.ManagementPath TargetSystem, ushort WidthPixels, out byte[] ImageData) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1295,7 +1295,7 @@ public uint GetVirtualSystemThumbnailImage(ushort HeightPixels, System.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ImportSnapshotDefinitions(System.Management.ManagementPath PlannedSystem, string SnapshotFolder, out System.Management.ManagementPath[] ImportedSnapshots, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1326,7 +1326,7 @@ public uint ImportSnapshotDefinitions(System.Management.ManagementPath PlannedSy
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ImportSystemDefinition(bool GenerateNewSystemIdentifier, string SnapshotFolder, string SystemDefinitionFile, out System.Management.ManagementPath ImportedSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1354,7 +1354,7 @@ public uint ImportSystemDefinition(bool GenerateNewSystemIdentifier, string Snap
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyDiskMergeSettings(string SettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1373,7 +1373,7 @@ public uint ModifyDiskMergeSettings(string SettingData, out System.Management.Ma
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyFeatureSettings(string[] FeatureSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingFeatureSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1403,7 +1403,7 @@ public uint ModifyFeatureSettings(string[] FeatureSettings, out System.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyKvpItems(string[] DataItems, System.Management.ManagementPath TargetSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1423,7 +1423,7 @@ public uint ModifyKvpItems(string[] DataItems, System.Management.ManagementPath
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyResourceSettings(string[] ResourceSettings, out System.Management.ManagementPath Job, out System.Management.ManagementPath[] ResultingResourceSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1453,7 +1453,7 @@ public uint ModifyResourceSettings(string[] ResourceSettings, out System.Managem
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyServiceSettings(string SettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1472,7 +1472,7 @@ public uint ModifyServiceSettings(string SettingData, out System.Management.Mana
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifySystemSettings(string SystemSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1491,7 +1491,7 @@ public uint ModifySystemSettings(string SystemSettings, out System.Management.Ma
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RealizePlannedSystem(System.Management.ManagementPath PlannedSystem, out System.Management.ManagementPath Job, out System.Management.ManagementPath ResultingSystem) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1515,7 +1515,7 @@ public uint RealizePlannedSystem(System.Management.ManagementPath PlannedSystem,
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveFeatureSettings(System.Management.ManagementPath[] FeatureSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1544,7 +1544,7 @@ public uint RemoveFeatureSettings(System.Management.ManagementPath[] FeatureSett
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveFibreChannelChap(string[] FcPortSettings) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1557,7 +1557,7 @@ public uint RemoveFibreChannelChap(string[] FcPortSettings) {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveKvpItems(string[] DataItems, System.Management.ManagementPath TargetSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1577,7 +1577,7 @@ public uint RemoveKvpItems(string[] DataItems, System.Management.ManagementPath
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveResourceSettings(System.Management.ManagementPath[] ResourceSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1606,7 +1606,7 @@ public uint RemoveResourceSettings(System.Management.ManagementPath[] ResourceSe
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1626,7 +1626,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint SetGuestNetworkAdapterConfiguration(System.Management.ManagementPath ComputerSystem, string[] NetworkConfiguration, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1646,7 +1646,7 @@ public uint SetGuestNetworkAdapterConfiguration(System.Management.ManagementPath
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StartService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1657,7 +1657,7 @@ public uint StartService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StopService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1668,7 +1668,7 @@ public uint StopService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ValidatePlannedSystem(System.Management.ManagementPath PlannedSystem, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1687,34 +1687,34 @@ public uint ValidatePlannedSystem(System.Management.ManagementPath PlannedSystem
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualSystemManagementServiceCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualSystemManagementServiceCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1722,189 +1722,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualSystemManagementService(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualSystemManagementServiceEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualSystemManagementServiceEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualSystemManagementServiceEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualSystemManagementService(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementServiceSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementServiceSettingData.cs
index 390140f2b5ee..c11e5cc27d6b 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementServiceSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementServiceSettingData.cs
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
+namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
{
using System;
using System.ComponentModel;
@@ -24,70 +24,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_VirtualSystemManagementServiceSettingData
public class VirtualSystemManagementServiceSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_VirtualSystemManagementServiceSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualSystemManagementServiceSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualSystemManagementServiceSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualSystemManagementServiceSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualSystemManagementServiceSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public VirtualSystemManagementServiceSettingData(System.Management.ManagementObj
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualSystemManagementServiceSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public VirtualSystemManagementServiceSettingData(System.Management.ManagementBas
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Used by OEMs to allow BIOS-locked Windows operating systems to run in the virtual machine. This string must be exactly 32 characters in length.
@@ -231,7 +231,7 @@ public string BiosLockString {
return ((string)(curObj["BiosLockString"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -239,7 +239,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The WorldWideNodeName address for dynamically generated WorldWideName addresses u" +
@@ -251,7 +251,7 @@ public string CurrentWWNNAddress {
return ((string)(curObj["CurrentWWNNAddress"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The default external data root. By default, \"root\\ProgramData\\Microsoft\\Windows\\V" +
@@ -262,7 +262,7 @@ public string DefaultExternalDataRoot {
return ((string)(curObj["DefaultExternalDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The default virtual hard disk path. By default, \"root\\Users\\Public\\Documents\\Virt" +
@@ -273,7 +273,7 @@ public string DefaultVirtualHardDiskPath {
return ((string)(curObj["DefaultVirtualHardDiskPath"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -281,7 +281,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -289,7 +289,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHbaLunTimeoutNull {
@@ -302,7 +302,7 @@ public bool IsHbaLunTimeoutNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"This property describes the amount of time that the Synthetic FC virtual device will wait for a LUN to appear before starting a virtual machine.
@@ -316,7 +316,7 @@ public uint HbaLunTimeout {
return ((uint)(curObj["HbaLunTimeout"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -324,7 +324,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum MAC address for dynamically generated MAC addresses.\nThis is a read-o" +
@@ -335,7 +335,7 @@ public string MaximumMacAddress {
return ((string)(curObj["MaximumMacAddress"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The maximum WorldWidePortName address for dynamically generated WorldWideName add" +
@@ -347,7 +347,7 @@ public string MaximumWWPNAddress {
return ((string)(curObj["MaximumWWPNAddress"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The minimum MAC address for dynamically generated MAC addresses.\nThis is a read-o" +
@@ -358,7 +358,7 @@ public string MinimumMacAddress {
return ((string)(curObj["MinimumMacAddress"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The minimum WorldWidePortName address for dynamically generated WorldWideName add" +
@@ -370,7 +370,7 @@ public string MinimumWWPNAddress {
return ((string)(curObj["MinimumWWPNAddress"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumaSpanningEnabledNull {
@@ -383,7 +383,7 @@ public bool IsNumaSpanningEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Reserved for future use.")]
@@ -396,7 +396,7 @@ public bool NumaSpanningEnabled {
return ((bool)(curObj["NumaSpanningEnabled"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Controls memory allocation for the VMs on non-uniform memory access (NUMA) system" +
@@ -407,7 +407,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Describes how the primary system owner can be reached (for example, phone number or e-mail address). By default, empty. This name may not exceed 256 characters in length.
@@ -417,9 +417,9 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -427,9 +427,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -446,46 +446,46 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeHbaLunTimeout() {
if ((this.IsHbaLunTimeoutNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeNumaSpanningEnabled() {
if ((this.IsNumaSpanningEnabledNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualSystemManagementServiceSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -497,24 +497,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualSystemManagementServiceSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -535,15 +535,15 @@ public static VirtualSystemManagementServiceSettingDataCollection GetInstances(S
}
return new VirtualSystemManagementServiceSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualSystemManagementServiceSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -560,7 +560,7 @@ public static VirtualSystemManagementServiceSettingDataCollection GetInstances(S
ObjectSearcher.Options = enumOptions;
return new VirtualSystemManagementServiceSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualSystemManagementServiceSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -575,39 +575,39 @@ public static VirtualSystemManagementServiceSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualSystemManagementServiceSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualSystemManagementServiceSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualSystemManagementServiceSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -615,189 +615,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualSystemManagementServiceSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualSystemManagementServiceSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualSystemManagementServiceSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualSystemManagementServiceSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualSystemManagementServiceSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationService.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationService.cs
index 89592b1b900f..4a00d23513c5 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationService.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationService.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_VirtualSystemMigrationService
public class VirtualSystemMigrationService : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_VirtualSystemMigrationService";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualSystemMigrationService() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualSystemMigrationService(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualSystemMigrationService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementScope mgmtScope, string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualSystemMigrationService.ConstructPath(keyCreationClassName, keyName, keySystemCreationClassName, keySystemName)), null);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public VirtualSystemMigrationService(System.Management.ManagementObject theObjec
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualSystemMigrationService(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public VirtualSystemMigrationService(System.Management.ManagementBaseObject theO
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsActiveStorageMigrationCountNull {
@@ -234,7 +234,7 @@ public bool IsActiveStorageMigrationCountNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The number of currently in-flight storage migrations.")]
@@ -247,7 +247,7 @@ public uint ActiveStorageMigrationCount {
return ((uint)(curObj["ActiveStorageMigrationCount"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsActiveVirtualSystemMigrationCountNull {
@@ -260,7 +260,7 @@ public bool IsActiveVirtualSystemMigrationCountNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The number of currently in-flight virtual system migrations.")]
@@ -273,7 +273,7 @@ public uint ActiveVirtualSystemMigrationCount {
return ((uint)(curObj["ActiveVirtualSystemMigrationCount"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] AvailableRequestedStates {
@@ -281,7 +281,7 @@ public ushort[] AvailableRequestedStates {
return ((ushort[])(curObj["AvailableRequestedStates"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -289,7 +289,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCommunicationStatusNull {
@@ -302,7 +302,7 @@ public bool IsCommunicationStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -314,7 +314,7 @@ public ushort CommunicationStatus {
return ((ushort)(curObj["CommunicationStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string CreationClassName {
@@ -322,7 +322,7 @@ public string CreationClassName {
return ((string)(curObj["CreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -330,7 +330,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDetailedStatusNull {
@@ -343,7 +343,7 @@ public bool IsDetailedStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -355,7 +355,7 @@ public ushort DetailedStatus {
return ((ushort)(curObj["DetailedStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -363,7 +363,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledDefaultNull {
@@ -376,7 +376,7 @@ public bool IsEnabledDefaultNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -388,7 +388,7 @@ public ushort EnabledDefault {
return ((ushort)(curObj["EnabledDefault"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEnabledStateNull {
@@ -401,7 +401,7 @@ public bool IsEnabledStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -413,7 +413,7 @@ public ushort EnabledState {
return ((ushort)(curObj["EnabledState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHealthStateNull {
@@ -426,7 +426,7 @@ public bool IsHealthStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -438,7 +438,7 @@ public ushort HealthState {
return ((ushort)(curObj["HealthState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
@@ -451,7 +451,7 @@ public bool IsInstallDateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -465,7 +465,7 @@ public System.DateTime InstallDate {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -473,7 +473,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The list of IP addresses of the host, which can be used for virtual system migra" +
@@ -483,7 +483,7 @@ public string[] MigrationServiceListenerIPAddressList {
return ((string[])(curObj["MigrationServiceListenerIPAddressList"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Name {
@@ -491,7 +491,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingStatusNull {
@@ -504,7 +504,7 @@ public bool IsOperatingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -516,7 +516,7 @@ public ushort OperatingStatus {
return ((ushort)(curObj["OperatingStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ushort[] OperationalStatus {
@@ -524,7 +524,7 @@ public ushort[] OperationalStatus {
return ((ushort[])(curObj["OperationalStatus"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherEnabledState {
@@ -532,7 +532,7 @@ public string OtherEnabledState {
return ((string)(curObj["OtherEnabledState"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerContact {
@@ -540,7 +540,7 @@ public string PrimaryOwnerContact {
return ((string)(curObj["PrimaryOwnerContact"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string PrimaryOwnerName {
@@ -548,7 +548,7 @@ public string PrimaryOwnerName {
return ((string)(curObj["PrimaryOwnerName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPrimaryStatusNull {
@@ -561,7 +561,7 @@ public bool IsPrimaryStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -573,7 +573,7 @@ public ushort PrimaryStatus {
return ((ushort)(curObj["PrimaryStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRequestedStateNull {
@@ -586,7 +586,7 @@ public bool IsRequestedStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -598,7 +598,7 @@ public ushort RequestedState {
return ((ushort)(curObj["RequestedState"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsStartedNull {
@@ -611,7 +611,7 @@ public bool IsStartedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -623,7 +623,7 @@ public bool Started {
return ((bool)(curObj["Started"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string StartMode {
@@ -631,7 +631,7 @@ public string StartMode {
return ((string)(curObj["StartMode"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Status {
@@ -639,7 +639,7 @@ public string Status {
return ((string)(curObj["Status"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] StatusDescriptions {
@@ -647,7 +647,7 @@ public string[] StatusDescriptions {
return ((string[])(curObj["StatusDescriptions"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemCreationClassName {
@@ -655,7 +655,7 @@ public string SystemCreationClassName {
return ((string)(curObj["SystemCreationClassName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SystemName {
@@ -663,7 +663,7 @@ public string SystemName {
return ((string)(curObj["SystemName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimeOfLastStateChangeNull {
@@ -676,7 +676,7 @@ public bool IsTimeOfLastStateChangeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -690,7 +690,7 @@ public System.DateTime TimeOfLastStateChange {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransitioningToStateNull {
@@ -703,7 +703,7 @@ public bool IsTransitioningToStateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -715,9 +715,9 @@ public ushort TransitioningToState {
return ((ushort)(curObj["TransitioningToState"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -725,9 +725,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -744,56 +744,56 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeActiveStorageMigrationCount() {
if ((this.IsActiveStorageMigrationCountNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeActiveVirtualSystemMigrationCount() {
if ((this.IsActiveVirtualSystemMigrationCountNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeCommunicationStatus() {
if ((this.IsCommunicationStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDetailedStatus() {
if ((this.IsDetailedStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledDefault() {
if ((this.IsEnabledDefaultNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeEnabledState() {
if ((this.IsEnabledStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeHealthState() {
if ((this.IsHealthStateNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -845,13 +845,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -879,7 +879,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -906,8 +906,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -917,75 +917,75 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeInstallDate() {
if ((this.IsInstallDateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeOperatingStatus() {
if ((this.IsOperatingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePrimaryStatus() {
if ((this.IsPrimaryStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRequestedState() {
if ((this.IsRequestedStateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeStarted() {
if ((this.IsStartedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimeOfLastStateChange() {
if ((this.IsTimeOfLastStateChangeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTransitioningToState() {
if ((this.IsTransitioningToStateNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyCreationClassName, string keyName, string keySystemCreationClassName, string keySystemName) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualSystemMigrationService";
strPath = string.Concat(strPath, string.Concat(".CreationClassName=", string.Concat("\"", string.Concat(keyCreationClassName, "\""))));
@@ -994,7 +994,7 @@ private static string ConstructPath(string keyCreationClassName, string keyName,
strPath = string.Concat(strPath, string.Concat(",SystemName=", string.Concat("\"", string.Concat(keySystemName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1006,24 +1006,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualSystemMigrationServiceCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1044,15 +1044,15 @@ public static VirtualSystemMigrationServiceCollection GetInstances(System.Manage
}
return new VirtualSystemMigrationServiceCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualSystemMigrationServiceCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1069,7 +1069,7 @@ public static VirtualSystemMigrationServiceCollection GetInstances(System.Manage
ObjectSearcher.Options = enumOptions;
return new VirtualSystemMigrationServiceCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualSystemMigrationService CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1084,12 +1084,12 @@ public static VirtualSystemMigrationService CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualSystemMigrationService(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public uint AddNetworkSettings(string[] NetworkSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1107,7 +1107,7 @@ public uint AddNetworkSettings(string[] NetworkSettings, out System.Management.M
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CheckSystemCompatibilityInfo(byte[] CompatibilityInfo, out string[] Reasons) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1122,7 +1122,7 @@ public uint CheckSystemCompatibilityInfo(byte[] CompatibilityInfo, out string[]
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CheckVirtualSystemIsMigratable(System.Management.ManagementPath ComputerSystem, string DestinationHost, string MigrationSettingData, string[] NewResourceSettingData, string NewSystemSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1144,7 +1144,7 @@ public uint CheckVirtualSystemIsMigratable(System.Management.ManagementPath Comp
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CheckVirtualSystemIsMigratableToHost(System.Management.ManagementPath ComputerSystem, string DestinationHost, string MigrationSettingData, string[] NewResourceSettingData, string NewSystemSettingData, out bool IsMigratable) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1163,7 +1163,7 @@ public uint CheckVirtualSystemIsMigratableToHost(System.Management.ManagementPat
return System.Convert.ToUInt32(0);
}
}
-
+
public uint CheckVirtualSystemIsMigratableToSystem(System.Management.ManagementPath ComputerSystem, System.Management.ManagementPath DestinationSystem, string MigrationSettingData, string[] NewResourceSettingData, string NewSystemSettingData, out bool IsMigratable) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1182,7 +1182,7 @@ public uint CheckVirtualSystemIsMigratableToSystem(System.Management.ManagementP
return System.Convert.ToUInt32(0);
}
}
-
+
public uint GetSystemCompatibilityInfo(System.Management.ManagementPath ComputerSystem, out byte[] CompatibilityInfo) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1197,7 +1197,7 @@ public uint GetSystemCompatibilityInfo(System.Management.ManagementPath Computer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint MigrateVirtualSystemToHost(System.Management.ManagementPath ComputerSystem, string DestinationHost, string MigrationSettingData, string[] NewResourceSettingData, string NewSystemSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1220,7 +1220,7 @@ public uint MigrateVirtualSystemToHost(System.Management.ManagementPath Computer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint MigrateVirtualSystemToSystem(System.Management.ManagementPath ComputerSystem, System.Management.ManagementPath DestinationSystem, string MigrationSettingData, string[] NewResourceSettingData, string NewSystemSettingData, out System.Management.ManagementPath Job, out System.Management.ManagementPath NewComputerSystem) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1247,7 +1247,7 @@ public uint MigrateVirtualSystemToSystem(System.Management.ManagementPath Comput
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyNetworkSettings(string[] NetworkSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1265,7 +1265,7 @@ public uint ModifyNetworkSettings(string[] NetworkSettings, out System.Managemen
return System.Convert.ToUInt32(0);
}
}
-
+
public uint ModifyServiceSettings(string ServiceSettingData, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1283,7 +1283,7 @@ public uint ModifyServiceSettings(string ServiceSettingData, out System.Manageme
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RemoveNetworkSettings(System.Management.ManagementPath[] NetworkSettings, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1311,7 +1311,7 @@ public uint RemoveNetworkSettings(System.Management.ManagementPath[] NetworkSett
return System.Convert.ToUInt32(0);
}
}
-
+
public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPeriod, out System.Management.ManagementPath Job) {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1330,7 +1330,7 @@ public uint RequestStateChange(ushort RequestedState, System.DateTime TimeoutPer
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StartService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1341,7 +1341,7 @@ public uint StartService() {
return System.Convert.ToUInt32(0);
}
}
-
+
public uint StopService() {
if ((isEmbedded == false)) {
System.Management.ManagementBaseObject inParams = null;
@@ -1352,34 +1352,34 @@ public uint StopService() {
return System.Convert.ToUInt32(0);
}
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualSystemMigrationServiceCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualSystemMigrationServiceCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1387,189 +1387,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualSystemMigrationService(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualSystemMigrationServiceEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualSystemMigrationServiceEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualSystemMigrationServiceEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualSystemMigrationService(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationSettingData.cs
index f7642dffa281..55e3cab6c2ac 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemMigrationSettingData.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Msvm_VirtualSystemMigrationSettingData
public class VirtualSystemMigrationSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_VirtualSystemMigrationSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualSystemMigrationSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualSystemMigrationSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualSystemMigrationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualSystemMigrationSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public VirtualSystemMigrationSettingData(System.Management.ManagementObject theO
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualSystemMigrationSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public VirtualSystemMigrationSettingData(System.Management.ManagementBaseObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsBandwidthNull {
@@ -233,7 +233,7 @@ public bool IsBandwidthNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -245,7 +245,7 @@ public ushort Bandwidth {
return ((ushort)(curObj["Bandwidth"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string BandwidthUnit {
@@ -253,7 +253,7 @@ public string BandwidthUnit {
return ((string)(curObj["BandwidthUnit"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -261,7 +261,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -269,7 +269,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("For storage migration it will be NULL. For virtual system \nmigration, client can " +
@@ -280,19 +280,19 @@ public string[] DestinationIPAddressList {
}
set {
curObj["DestinationIPAddressList"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [Description(@"If we have a planned computer system at migration destination then DestinationPlannedVirtualSystemId could be set to
-the GUID of the destination Planned VM where the VM needs to
-migrate. This is useful for cases where user has created a
-planned VM at the destination along with resource fixup, and
+ [Description(@"If we have a planned computer system at migration destination then DestinationPlannedVirtualSystemId could be set to
+the GUID of the destination Planned VM where the VM needs to
+migrate. This is useful for cases where user has created a
+planned VM at the destination along with resource fixup, and
wants a VM from source to migrate into this planned VM.")]
public string DestinationPlannedVirtualSystemId {
get {
@@ -300,13 +300,13 @@ public string DestinationPlannedVirtualSystemId {
}
set {
curObj["DestinationPlannedVirtualSystemId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -314,7 +314,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -322,7 +322,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMigrationTypeNull {
@@ -335,7 +335,7 @@ public bool IsMigrationTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("MigrationType describes the type of migration operation to \nbe performed.\n")]
@@ -354,13 +354,13 @@ public MigrationTypeValues MigrationType {
else {
curObj["MigrationType"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OtherTransportType {
@@ -368,7 +368,7 @@ public string OtherTransportType {
return ((string)(curObj["OtherTransportType"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPriorityNull {
@@ -381,7 +381,7 @@ public bool IsPriorityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -393,7 +393,7 @@ public ushort Priority {
return ((ushort)(curObj["Priority"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsRetainVhdCopiesOnSourceNull {
@@ -406,7 +406,7 @@ public bool IsRetainVhdCopiesOnSourceNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("For storage migration, this could be set to TRUE or FALSE\nto determine wheither, " +
@@ -422,13 +422,13 @@ public bool RetainVhdCopiesOnSource {
}
set {
curObj["RetainVhdCopiesOnSource"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTransportTypeNull {
@@ -441,7 +441,7 @@ public bool IsTransportTypeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -453,9 +453,9 @@ public ushort TransportType {
return ((ushort)(curObj["TransportType"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -463,9 +463,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -482,99 +482,99 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeBandwidth() {
if ((this.IsBandwidthNull == false)) {
return true;
}
return false;
}
-
+
private void ResetDestinationIPAddressList() {
curObj["DestinationIPAddressList"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetDestinationPlannedVirtualSystemId() {
curObj["DestinationPlannedVirtualSystemId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeMigrationType() {
if ((this.IsMigrationTypeNull == false)) {
return true;
}
return false;
}
-
+
private void ResetMigrationType() {
curObj["MigrationType"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializePriority() {
if ((this.IsPriorityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeRetainVhdCopiesOnSource() {
if ((this.IsRetainVhdCopiesOnSourceNull == false)) {
return true;
}
return false;
}
-
+
private void ResetRetainVhdCopiesOnSource() {
curObj["RetainVhdCopiesOnSource"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeTransportType() {
if ((this.IsTransportTypeNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualSystemMigrationSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -586,24 +586,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualSystemMigrationSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -624,15 +624,15 @@ public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Ma
}
return new VirtualSystemMigrationSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -649,7 +649,7 @@ public static VirtualSystemMigrationSettingDataCollection GetInstances(System.Ma
ObjectSearcher.Options = enumOptions;
return new VirtualSystemMigrationSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualSystemMigrationSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -664,56 +664,56 @@ public static VirtualSystemMigrationSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualSystemMigrationSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum MigrationTypeValues {
-
+
Unknown0 = 0,
-
+
VirtualSystem = 32768,
-
+
Storage = 32769,
-
+
Staged = 32770,
-
+
VirtualSystemAndStorage = 32771,
-
+
StorageDeepCheck = 32772,
-
+
NULL_ENUM_VALUE = 32773,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualSystemMigrationSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualSystemMigrationSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -721,189 +721,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualSystemMigrationSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualSystemMigrationSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualSystemMigrationSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualSystemMigrationSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualSystemMigrationSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs
index 4877957ad6b3..bc1e1fd36180 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs
@@ -23,8 +23,8 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
@@ -32,62 +32,62 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Msvm_VirtualSystemSettingData
public class VirtualSystemSettingData : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\virtualization\\v2";
-
+
// Private property to hold the name of WMI class which created this class.
public static string CreatedClassName = "Msvm_VirtualSystemSettingData";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public VirtualSystemSettingData() {
this.InitializeObject(null, null, null);
}
-
+
public VirtualSystemSettingData(string keyInstanceID) {
this.InitializeObject(null, new System.Management.ManagementPath(VirtualSystemSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementScope mgmtScope, string keyInstanceID) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(VirtualSystemSettingData.ConstructPath(keyInstanceID)), null);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public VirtualSystemSettingData(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -99,7 +99,7 @@ public VirtualSystemSettingData(System.Management.ManagementObject theObject) {
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public VirtualSystemSettingData(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -112,7 +112,7 @@ public VirtualSystemSettingData(System.Management.ManagementBaseObject theObject
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -121,7 +121,7 @@ public string OriginatingNamespace {
return "ROOT\\virtualization\\v2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -130,7 +130,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -139,7 +139,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -148,7 +148,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -157,7 +157,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -176,7 +176,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -188,7 +188,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -209,7 +209,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -221,7 +221,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Any additional information provided to the recovery action. The meaning of this property is defined by the action in AutomaticRecoveryAction. If AutomaticRecoveryAction is 0 (""None"") or 1 (""Restart""), this value is NULL. If AutomaticRecoveryAction is 2 (""Revert to Snapshot""), this is the object path to a snapshot that should be applied on failure of the virtual machine worker process.
@@ -232,13 +232,13 @@ public string AdditionalRecoveryInformation {
}
set {
curObj["AdditionalRecoveryInformation"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAllowFullSCSICommandSetNull {
@@ -251,7 +251,7 @@ public bool IsAllowFullSCSICommandSetNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Indicates whether SCSI commands from the guest operating system are passed to pass-through disks. If TRUE, SCSI commands emitted by the guest operating system to pass-through disks are not filtered.It is recommended that SCSI filtering remains enabled for production deployments.
@@ -267,13 +267,13 @@ public bool AllowFullSCSICommandSet {
}
set {
curObj["AllowFullSCSICommandSet"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAllowReducedFcRedundancyNull {
@@ -286,11 +286,11 @@ public bool IsAllowReducedFcRedundancyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [Description(@"Indicates whether live migration of a virtual machine that is configured with a virtual FC adapter is allowed to a destination machine, without doing any checks for the existence of paths to the storage devices on the destination
-The default value of this property is FALSE. If set to TRUE, the VM can be live migrated to a target machine which may have no or reduced paths to the target FC devices. The guest operating system may lose connectivity to storage and may behave in an unpredictable manner.
+ [Description(@"Indicates whether live migration of a virtual machine that is configured with a virtual FC adapter is allowed to a destination machine, without doing any checks for the existence of paths to the storage devices on the destination
+The default value of this property is FALSE. If set to TRUE, the VM can be live migrated to a target machine which may have no or reduced paths to the target FC devices. The guest operating system may lose connectivity to storage and may behave in an unpredictable manner.
This property should be cleared after a live migration")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool AllowReducedFcRedundancy {
@@ -302,13 +302,13 @@ public bool AllowReducedFcRedundancy {
}
set {
curObj["AllowReducedFcRedundancy"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticRecoveryActionNull {
@@ -321,7 +321,7 @@ public bool IsAutomaticRecoveryActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -333,7 +333,7 @@ public ushort AutomaticRecoveryAction {
return ((ushort)(curObj["AutomaticRecoveryAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticShutdownActionNull {
@@ -346,7 +346,7 @@ public bool IsAutomaticShutdownActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -358,7 +358,7 @@ public ushort AutomaticShutdownAction {
return ((ushort)(curObj["AutomaticShutdownAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticStartupActionNull {
@@ -371,7 +371,7 @@ public bool IsAutomaticStartupActionNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -383,7 +383,7 @@ public ushort AutomaticStartupAction {
return ((ushort)(curObj["AutomaticStartupAction"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticStartupActionDelayNull {
@@ -396,7 +396,7 @@ public bool IsAutomaticStartupActionDelayNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -410,7 +410,7 @@ public System.DateTime AutomaticStartupActionDelay {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAutomaticStartupActionSequenceNumberNull {
@@ -423,7 +423,7 @@ public bool IsAutomaticStartupActionSequenceNumberNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -435,7 +435,7 @@ public ushort AutomaticStartupActionSequenceNumber {
return ((ushort)(curObj["AutomaticStartupActionSequenceNumber"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The serial number of the base board for the virtual computer system.\nThis is a re" +
@@ -447,13 +447,13 @@ public string BaseBoardSerialNumber {
}
set {
curObj["BaseBoardSerialNumber"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The globally-unique identifier for the BIOS of the virtual computer system.\nThis " +
@@ -465,13 +465,13 @@ public string BIOSGUID {
}
set {
curObj["BIOSGUID"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsBIOSNumLockNull {
@@ -484,7 +484,7 @@ public bool IsBIOSNumLockNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"This property is set to TRUE if the num lock key is set to on by the BIOS, FALSE if the num lock key is set to off by the BIOS.
@@ -499,13 +499,13 @@ public bool BIOSNumLock {
}
set {
curObj["BIOSNumLock"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The serial number of the BIOS for the virtual computer system.\nThis is a read-onl" +
@@ -517,13 +517,13 @@ public string BIOSSerialNumber {
}
set {
curObj["BIOSSerialNumber"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The boot order set within the BIOS of the virtual computer system. This property is an array of values, max length 4, where each value indicates a device to boot from. The virtual computer system will first attempt to boot from the device indicated by the first value within the array. If that device does not contain a boot sector, the virtual computer system will attempt to boot from the next device specified by the BootOrder property and so on. If no device specified within the BootOrder contains a boot sector the virtual computer system will fail to boot. The default value for a virtual computer system is [0, 1, 2, 3, 4].
@@ -541,13 +541,13 @@ public ushort[] BootOrder {
}
set {
curObj["BootOrder"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Caption {
@@ -555,7 +555,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The asset tag of the chassis for the virtual computer system.\nThis is a read-only" +
@@ -567,13 +567,13 @@ public string ChassisAssetTag {
}
set {
curObj["ChassisAssetTag"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The serial number of the chassis for the virtual computer system.\nThis is a read-" +
@@ -585,13 +585,13 @@ public string ChassisSerialNumber {
}
set {
curObj["ChassisSerialNumber"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ConfigurationDataRoot {
@@ -599,7 +599,7 @@ public string ConfigurationDataRoot {
return ((string)(curObj["ConfigurationDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ConfigurationFile {
@@ -607,7 +607,7 @@ public string ConfigurationFile {
return ((string)(curObj["ConfigurationFile"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ConfigurationID {
@@ -615,7 +615,7 @@ public string ConfigurationID {
return ((string)(curObj["ConfigurationID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCreationTimeNull {
@@ -628,7 +628,7 @@ public bool IsCreationTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -642,7 +642,7 @@ public System.DateTime CreationTime {
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDebugChannelIdNull {
@@ -655,7 +655,7 @@ public bool IsDebugChannelIdNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The channel identifier used to debug the virtual system using the VUD unified deb" +
@@ -670,13 +670,13 @@ public uint DebugChannelId {
}
set {
curObj["DebugChannelId"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDebugPortNull {
@@ -689,7 +689,7 @@ public bool IsDebugPortNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The tcpip port used to debug the virtual system using synthetic debugging.")]
@@ -703,13 +703,13 @@ public uint DebugPort {
}
set {
curObj["DebugPort"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDebugPortEnabledNull {
@@ -722,7 +722,7 @@ public bool IsDebugPortEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Whether the virtual system is using synthetic debugging.")]
@@ -741,13 +741,13 @@ public DebugPortEnabledValues DebugPortEnabled {
else {
curObj["DebugPortEnabled"] = value;
}
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Description {
@@ -755,7 +755,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ElementName {
@@ -763,7 +763,7 @@ public string ElementName {
return ((string)(curObj["ElementName"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIncrementalBackupEnabledNull {
@@ -776,7 +776,7 @@ public bool IsIncrementalBackupEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Indicates whether the Hyper-V VSS writer supports taking incremental backup of th" +
@@ -791,13 +791,13 @@ public bool IncrementalBackupEnabled {
}
set {
curObj["IncrementalBackupEnabled"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string InstanceID {
@@ -805,7 +805,7 @@ public string InstanceID {
return ((string)(curObj["InstanceID"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIsSavedNull {
@@ -818,7 +818,7 @@ public bool IsIsSavedNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"This property is set to TRUE if the configuration has a reference to a saved state file, FALSE if not. Note that this does not indicate the presence of such a file, only that the configuration specifies one.
@@ -832,7 +832,7 @@ public bool IsSaved {
return ((bool)(curObj["IsSaved"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string LogDataRoot {
@@ -840,7 +840,7 @@ public string LogDataRoot {
return ((string)(curObj["LogDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string[] Notes {
@@ -848,7 +848,7 @@ public string[] Notes {
return ((string[])(curObj["Notes"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The object path for the snapshot Msvm_VirtualSystemSettingData from which this ob" +
@@ -859,7 +859,7 @@ public string Parent {
return ((string)(curObj["Parent"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string RecoveryFile {
@@ -867,7 +867,7 @@ public string RecoveryFile {
return ((string)(curObj["RecoveryFile"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SnapshotDataRoot {
@@ -875,7 +875,7 @@ public string SnapshotDataRoot {
return ((string)(curObj["SnapshotDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SuspendDataRoot {
@@ -883,7 +883,7 @@ public string SuspendDataRoot {
return ((string)(curObj["SuspendDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string SwapFileDataRoot {
@@ -891,7 +891,7 @@ public string SwapFileDataRoot {
return ((string)(curObj["SwapFileDataRoot"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The version of the virtual system in a format of \"major.minor\", for example \"2.0\"" +
@@ -901,7 +901,7 @@ public string Version {
return ((string)(curObj["Version"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsVirtualNumaEnabledNull {
@@ -914,7 +914,7 @@ public bool IsVirtualNumaEnabledNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Indicates whether virtual non-uniform memory access (NUMA) nodes are projected into the virtual machine. If FALSE, the virtual machine will have a single node. If TRUE, the number of virtual NUMA nodes projected into the virtual machine is determined from the values of the Msvm_ProcessorSettingData.MaxProcessorsPerNumaNode and Msvm_MemorySettingData.MaxMemoryBlocksPerNumaNode properties.
@@ -929,13 +929,13 @@ public bool VirtualNumaEnabled {
}
set {
curObj["VirtualNumaEnabled"] = value;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The name of the CIM_ComputerSystem to which this setting data belongs")]
@@ -944,7 +944,7 @@ public string VirtualSystemIdentifier {
return ((string)(curObj["VirtualSystemIdentifier"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string VirtualSystemType {
@@ -952,9 +952,9 @@ public string VirtualSystemType {
return ((string)(curObj["VirtualSystemType"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -962,9 +962,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -981,66 +981,66 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private void ResetAdditionalRecoveryInformation() {
curObj["AdditionalRecoveryInformation"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeAllowFullSCSICommandSet() {
if ((this.IsAllowFullSCSICommandSetNull == false)) {
return true;
}
return false;
}
-
+
private void ResetAllowFullSCSICommandSet() {
curObj["AllowFullSCSICommandSet"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeAllowReducedFcRedundancy() {
if ((this.IsAllowReducedFcRedundancyNull == false)) {
return true;
}
return false;
}
-
+
private void ResetAllowReducedFcRedundancy() {
curObj["AllowReducedFcRedundancy"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeAutomaticRecoveryAction() {
if ((this.IsAutomaticRecoveryActionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticShutdownAction() {
if ((this.IsAutomaticShutdownActionNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticStartupAction() {
if ((this.IsAutomaticStartupActionNull == false)) {
return true;
}
return false;
}
-
+
// Converts a given datetime in DMTF format to System.DateTime object.
static System.DateTime ToDateTime(string dmtfDate) {
System.DateTime initializer = System.DateTime.MinValue;
@@ -1092,13 +1092,13 @@ static System.DateTime ToDateTime(string dmtfDate) {
if (("******" != tempString)) {
ticks = (long.Parse(tempString) * ((long)((System.TimeSpan.TicksPerMillisecond / 1000))));
}
- if (((((((((year < 0)
- || (month < 0))
- || (day < 0))
- || (hour < 0))
- || (minute < 0))
- || (minute < 0))
- || (second < 0))
+ if (((((((((year < 0)
+ || (month < 0))
+ || (day < 0))
+ || (hour < 0))
+ || (minute < 0))
+ || (minute < 0))
+ || (second < 0))
|| (ticks < 0))) {
throw new System.ArgumentOutOfRangeException();
}
@@ -1126,7 +1126,7 @@ static System.DateTime ToDateTime(string dmtfDate) {
}
return datetime;
}
-
+
// Converts a given System.DateTime object to DMTF datetime format.
static string ToDmtfDateTime(System.DateTime date) {
string utcString = string.Empty;
@@ -1153,8 +1153,8 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, ((int)(date.Second)).ToString().PadLeft(2, '0'));
dmtfDateTime = string.Concat(dmtfDateTime, ".");
System.DateTime dtTemp = new System.DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
- long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
- * 1000)
+ long microsec = ((long)((((date.Ticks - dtTemp.Ticks)
+ * 1000)
/ System.TimeSpan.TicksPerMillisecond)));
string strMicrosec = ((long)(microsec)).ToString();
if ((strMicrosec.Length > 6)) {
@@ -1164,198 +1164,198 @@ static string ToDmtfDateTime(System.DateTime date) {
dmtfDateTime = string.Concat(dmtfDateTime, utcString);
return dmtfDateTime;
}
-
+
private bool ShouldSerializeAutomaticStartupActionDelay() {
if ((this.IsAutomaticStartupActionDelayNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeAutomaticStartupActionSequenceNumber() {
if ((this.IsAutomaticStartupActionSequenceNumberNull == false)) {
return true;
}
return false;
}
-
+
private void ResetBaseBoardSerialNumber() {
curObj["BaseBoardSerialNumber"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetBIOSGUID() {
curObj["BIOSGUID"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeBIOSNumLock() {
if ((this.IsBIOSNumLockNull == false)) {
return true;
}
return false;
}
-
+
private void ResetBIOSNumLock() {
curObj["BIOSNumLock"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetBIOSSerialNumber() {
curObj["BIOSSerialNumber"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetBootOrder() {
curObj["BootOrder"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetChassisAssetTag() {
curObj["ChassisAssetTag"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private void ResetChassisSerialNumber() {
curObj["ChassisSerialNumber"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeCreationTime() {
if ((this.IsCreationTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDebugChannelId() {
if ((this.IsDebugChannelIdNull == false)) {
return true;
}
return false;
}
-
+
private void ResetDebugChannelId() {
curObj["DebugChannelId"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeDebugPort() {
if ((this.IsDebugPortNull == false)) {
return true;
}
return false;
}
-
+
private void ResetDebugPort() {
curObj["DebugPort"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeDebugPortEnabled() {
if ((this.IsDebugPortEnabledNull == false)) {
return true;
}
return false;
}
-
+
private void ResetDebugPortEnabled() {
curObj["DebugPortEnabled"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeIncrementalBackupEnabled() {
if ((this.IsIncrementalBackupEnabledNull == false)) {
return true;
}
return false;
}
-
+
private void ResetIncrementalBackupEnabled() {
curObj["IncrementalBackupEnabled"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
private bool ShouldSerializeIsSaved() {
if ((this.IsIsSavedNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeVirtualNumaEnabled() {
if ((this.IsVirtualNumaEnabledNull == false)) {
return true;
}
return false;
}
-
+
private void ResetVirtualNumaEnabled() {
curObj["VirtualNumaEnabled"] = null;
- if (((isEmbedded == false)
+ if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyInstanceID) {
string strPath = "ROOT\\virtualization\\v2:Msvm_VirtualSystemSettingData";
strPath = string.Concat(strPath, string.Concat(".InstanceID=", string.Concat("\"", string.Concat(keyInstanceID, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1367,24 +1367,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static VirtualSystemSettingDataCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1405,15 +1405,15 @@ public static VirtualSystemSettingDataCollection GetInstances(System.Management.
}
return new VirtualSystemSettingDataCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static VirtualSystemSettingDataCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1430,7 +1430,7 @@ public static VirtualSystemSettingDataCollection GetInstances(System.Management.
ObjectSearcher.Options = enumOptions;
return new VirtualSystemSettingDataCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static VirtualSystemSettingData CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1445,50 +1445,50 @@ public static VirtualSystemSettingData CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new VirtualSystemSettingData(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
public enum DebugPortEnabledValues {
-
+
Val__Off = 0,
-
+
On = 1,
-
+
OnAutoAssigned = 2,
-
+
NULL_ENUM_VALUE = 3,
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class VirtualSystemSettingDataCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public VirtualSystemSettingDataCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1496,189 +1496,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new VirtualSystemSettingData(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new VirtualSystemSettingDataEnumerator(privColObj.GetEnumerator());
}
-
+
public class VirtualSystemSettingDataEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public VirtualSystemSettingDataEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new VirtualSystemSettingData(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/root.CIMV2.Win32_PerfFormattedData_Counters_ProcessorInformation.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/root.CIMV2.Win32_PerfFormattedData_Counters_ProcessorInformation.cs
index 0cf3735712e3..4d7ffc9cb3f4 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/root.CIMV2.Win32_PerfFormattedData_Counters_ProcessorInformation.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/root.CIMV2.Win32_PerfFormattedData_Counters_ProcessorInformation.cs
@@ -23,70 +23,70 @@ namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
-
-
+
+
// Functions ShouldSerialize are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use IsNull function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions IsNull() are used to check if a property is NULL.
// Functions Reset are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// An Early Bound class generated for the WMI class.Win32_PerfFormattedData_Counters_ProcessorInformation
public class PerfFormattedData_Counters_ProcessorInformation : System.ComponentModel.Component {
-
+
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "root\\CIMV2";
-
+
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Win32_PerfFormattedData_Counters_ProcessorInformation";
-
+
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
-
+
private ManagementSystemProperties PrivateSystemProperties;
-
+
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
-
+
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
-
+
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
-
+
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
-
+
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
-
+
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public PerfFormattedData_Counters_ProcessorInformation() {
this.InitializeObject(null, null, null);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(string keyName) {
this.InitializeObject(null, new System.Management.ManagementPath(PerfFormattedData_Counters_ProcessorInformation.ConstructPath(keyName)), null);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementScope mgmtScope, string keyName) {
this.InitializeObject(((System.Management.ManagementScope)(mgmtScope)), new System.Management.ManagementPath(PerfFormattedData_Counters_ProcessorInformation.ConstructPath(keyName)), null);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, path, getOptions);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path) {
this.InitializeObject(mgmtScope, path, null);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -98,7 +98,7 @@ public PerfFormattedData_Counters_ProcessorInformation(System.Management.Managem
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
public PerfFormattedData_Counters_ProcessorInformation(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
@@ -111,7 +111,7 @@ public PerfFormattedData_Counters_ProcessorInformation(System.Management.Managem
throw new System.ArgumentException("Class name does not match.");
}
}
-
+
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -120,7 +120,7 @@ public string OriginatingNamespace {
return "root\\CIMV2";
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
@@ -129,7 +129,7 @@ public string ManagementClassName {
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
- if (((strRet == null)
+ if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
@@ -138,7 +138,7 @@ public string ManagementClassName {
return strRet;
}
}
-
+
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -147,7 +147,7 @@ public ManagementSystemProperties SystemProperties {
return PrivateSystemProperties;
}
}
-
+
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -156,7 +156,7 @@ public System.Management.ManagementBaseObject LateBoundObject {
return curObj;
}
}
-
+
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -175,7 +175,7 @@ public System.Management.ManagementScope Scope {
}
}
}
-
+
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -187,7 +187,7 @@ public bool AutoCommit {
AutoCommitProp = value;
}
}
-
+
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
@@ -208,7 +208,7 @@ public System.Management.ManagementPath Path {
}
}
}
-
+
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -220,7 +220,7 @@ public static System.Management.ManagementScope StaticScope {
statMgmtScope = value;
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsAverageIdleTimeNull {
@@ -233,7 +233,7 @@ public bool IsAverageIdleTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Average Idle Time is the average idle duration in 100ns units observed between th" +
@@ -247,7 +247,7 @@ public ulong AverageIdleTime {
return ((ulong)(curObj["AverageIdleTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsC1TransitionsPersecNull {
@@ -260,7 +260,7 @@ public bool IsC1TransitionsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"C1 Transitions/sec is the rate that the CPU enters the C1 low-power idle state. The CPU enters the C1 state when it is sufficiently idle and exits this state on any interrupt. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -273,7 +273,7 @@ public ulong C1TransitionsPersec {
return ((ulong)(curObj["C1TransitionsPersec"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsC2TransitionsPersecNull {
@@ -286,7 +286,7 @@ public bool IsC2TransitionsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"C2 Transitions/sec is the rate that the CPU enters the C2 low-power idle state. The CPU enters the C2 state when it is sufficiently idle and exits this state on any interrupt. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -299,7 +299,7 @@ public ulong C2TransitionsPersec {
return ((ulong)(curObj["C2TransitionsPersec"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsC3TransitionsPersecNull {
@@ -312,7 +312,7 @@ public bool IsC3TransitionsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"C3 Transitions/sec is the rate that the CPU enters the C3 low-power idle state. The CPU enters the C3 state when it is sufficiently idle and exits this state on any interrupt. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -325,7 +325,7 @@ public ulong C3TransitionsPersec {
return ((ulong)(curObj["C3TransitionsPersec"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A short textual description (one-line string) for the statistic or metric.")]
@@ -334,7 +334,7 @@ public string Caption {
return ((string)(curObj["Caption"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsClockInterruptsPersecNull {
@@ -347,7 +347,7 @@ public bool IsClockInterruptsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Clock Interrupts/sec is the average rate, in incidents per second, at which the processor received and serviced clock tick interrupts. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -360,7 +360,7 @@ public uint ClockInterruptsPersec {
return ((uint)(curObj["ClockInterruptsPersec"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("A textual description of the statistic or metric.")]
@@ -369,7 +369,7 @@ public string Description {
return ((string)(curObj["Description"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDPCRateNull {
@@ -382,7 +382,7 @@ public bool IsDPCRateNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"DPC Rate is the rate at which deferred procedure calls (DPCs) were added to the processors DPC queues between the timer ticks of the processor clock. DPCs are interrupts that run at alower priority than standard interrupts. Each processor has its own DPC queue. This counter measures the rate that DPCs were added to the queue, not the number of DPCs in the queue. This counter displays the last observed value only; it is not an average.")]
@@ -395,7 +395,7 @@ public uint DPCRate {
return ((uint)(curObj["DPCRate"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDPCsQueuedPersecNull {
@@ -408,7 +408,7 @@ public bool IsDPCsQueuedPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"DPCs Queued/sec is the average rate, in incidents per second, at which deferred procedure calls (DPCs) were added to the processor's DPC queue. DPCs are interrupts that run at a lower priority than standard interrupts. Each processor has its own DPC queue. This counter measures the rate that DPCs are added to the queue, not the number of DPCs in the queue. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -421,7 +421,7 @@ public uint DPCsQueuedPersec {
return ((uint)(curObj["DPCsQueuedPersec"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFrequency_ObjectNull {
@@ -434,7 +434,7 @@ public bool IsFrequency_ObjectNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -446,7 +446,7 @@ public ulong Frequency_Object {
return ((ulong)(curObj["Frequency_Object"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFrequency_PerfTimeNull {
@@ -459,7 +459,7 @@ public bool IsFrequency_PerfTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -471,7 +471,7 @@ public ulong Frequency_PerfTime {
return ((ulong)(curObj["Frequency_PerfTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFrequency_Sys100NSNull {
@@ -484,7 +484,7 @@ public bool IsFrequency_Sys100NSNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -496,7 +496,7 @@ public ulong Frequency_Sys100NS {
return ((ulong)(curObj["Frequency_Sys100NS"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsIdleBreakEventsPersecNull {
@@ -509,7 +509,7 @@ public bool IsIdleBreakEventsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Idle Break Events/sec is the average rate, in incidents per second, at which the " +
@@ -525,7 +525,7 @@ public ulong IdleBreakEventsPersec {
return ((ulong)(curObj["IdleBreakEventsPersec"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInterruptsPersecNull {
@@ -538,7 +538,7 @@ public bool IsInterruptsPersecNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Interrupts/sec is the average rate, in incidents per second, at which the processor received and serviced hardware interrupts. It does not include deferred procedure calls (DPCs), which are counted separately. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards, and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended. The system clock typically interrupts the processor every 10 milliseconds, creating a background of interrupt activity. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.")]
@@ -551,7 +551,7 @@ public uint InterruptsPersec {
return ((uint)(curObj["InterruptsPersec"]));
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Name property defines the label by which the statistic or metric is known. Wh" +
@@ -561,7 +561,7 @@ public string Name {
return ((string)(curObj["Name"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsParkingStatusNull {
@@ -574,7 +574,7 @@ public bool IsParkingStatusNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Parking Status represents whether a processor is parked or not.")]
@@ -587,7 +587,7 @@ public uint ParkingStatus {
return ((uint)(curObj["ParkingStatus"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentC1TimeNull {
@@ -600,7 +600,7 @@ public bool IsPercentC1TimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% C1 Time is the percentage of time the processor spends in the C1 low-power idle state. % C1 Time is a subset of the total processor idle time. C1 low-power idle state enables the processor to maintain its entire context and quickly return to the running state. Not all systems support the % C1 state.")]
@@ -613,7 +613,7 @@ public ulong PercentC1Time {
return ((ulong)(curObj["PercentC1Time"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentC2TimeNull {
@@ -626,7 +626,7 @@ public bool IsPercentC2TimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% C2 Time is the percentage of time the processor spends in the C2 low-power idle state. % C2 Time is a subset of the total processor idle time. C2 low-power idle state enables the processor to maintain the context of the system caches. The C2 power state is a lower power and higher exit latency state than C1. Not all systems support the C2 state.")]
@@ -639,7 +639,7 @@ public ulong PercentC2Time {
return ((ulong)(curObj["PercentC2Time"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentC3TimeNull {
@@ -652,7 +652,7 @@ public bool IsPercentC3TimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% C3 Time is the percentage of time the processor spends in the C3 low-power idle state. % C3 Time is a subset of the total processor idle time. When the processor is in the C3 low-power idle state it is unable to maintain the coherency of its caches. The C3 power state is a lower power and higher exit latency state than C2. Not all systems support the C3 state.")]
@@ -665,7 +665,7 @@ public ulong PercentC3Time {
return ((ulong)(curObj["PercentC3Time"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentDPCTimeNull {
@@ -678,7 +678,7 @@ public bool IsPercentDPCTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% DPC Time is the percentage of time that the processor spent receiving and servicing deferred procedure calls (DPCs) during the sample interval. DPCs are interrupts that run at a lower priority than standard interrupts. % DPC Time is a component of % Privileged Time because DPCs are executed in privileged mode. They are counted separately and are not a component of the interrupt counters. This counter displays the average busy time as a percentage of the sample time.")]
@@ -691,7 +691,7 @@ public ulong PercentDPCTime {
return ((ulong)(curObj["PercentDPCTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentIdleTimeNull {
@@ -704,7 +704,7 @@ public bool IsPercentIdleTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("% Idle Time is the percentage of time the processor is idle during the sample int" +
@@ -718,7 +718,7 @@ public ulong PercentIdleTime {
return ((ulong)(curObj["PercentIdleTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentInterruptTimeNull {
@@ -731,7 +731,7 @@ public bool IsPercentInterruptTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% Interrupt Time is the time the processor spends receiving and servicing hardware interrupts during sample intervals. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. suspends normal thread execution during interrupts. This counter displays the average busy time as a percentage of the sample time.")]
@@ -744,7 +744,7 @@ public ulong PercentInterruptTime {
return ((ulong)(curObj["PercentInterruptTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentofMaximumFrequencyNull {
@@ -757,7 +757,7 @@ public bool IsPercentofMaximumFrequencyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("% of Maximum Frequency is the percentage of the current processor\'s maximum frequ" +
@@ -771,7 +771,7 @@ public uint PercentofMaximumFrequency {
return ((uint)(curObj["PercentofMaximumFrequency"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentPerformanceLimitNull {
@@ -784,7 +784,7 @@ public bool IsPercentPerformanceLimitNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% Performance Limit is the performance the processor guarantees it can provide, as a percentage of the nominal performance of the processor. Performance can be limited by Windows power policy, or by the platform as a result of a power budget, overheating, or other hardware issues.")]
@@ -797,7 +797,7 @@ public uint PercentPerformanceLimit {
return ((uint)(curObj["PercentPerformanceLimit"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentPriorityTimeNull {
@@ -810,7 +810,7 @@ public bool IsPercentPriorityTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% Priority Time is the percentage of elapsed time that the processor spends executing threads that are not low priority. It is calculated by measuring the percentage of time that the processor spends executing low priority threads or the idle thread and then subtracting that value from 100%. (Each processor has an idle thread to which time is accumulated when no other threads are ready to run). This counter displays the average percentage of busy time observed during the sample interval excluding low priority background work. It should be noted that the accounting calculation of whether the processor is idle is performed at an internal sampling interval of the system clock tick. % Priority Time can therefore underestimate the processor utilization as the processor may be spending a lot of time servicing threads between the system clock sampling interval. Workload based timer applications are one example of applications which are more likely to be measured inaccurately as timers are signaled just after the sample is taken.")]
@@ -823,7 +823,7 @@ public ulong PercentPriorityTime {
return ((ulong)(curObj["PercentPriorityTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentPrivilegedTimeNull {
@@ -836,7 +836,7 @@ public bool IsPercentPrivilegedTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% Privileged Time is the percentage of elapsed time that the process threads spent executing code in privileged mode. When a Windows system service in called, the service will often run in privileged mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. Some work done by Windows on behalf of the application might appear in other subsystem processes in addition to the privileged time in the process.")]
@@ -849,7 +849,7 @@ public ulong PercentPrivilegedTime {
return ((ulong)(curObj["PercentPrivilegedTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentPrivilegedUtilityNull {
@@ -862,7 +862,7 @@ public bool IsPercentPrivilegedUtilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Privileged Utility is the amount of work a processor is completing while executing in privileged mode, as a percentage of the amount of work the processor could complete if it were running at its nominal performance and never idle. On some processors, Privileged Utility may exceed 100%.")]
@@ -875,7 +875,7 @@ public ulong PercentPrivilegedUtility {
return ((ulong)(curObj["PercentPrivilegedUtility"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentProcessorPerformanceNull {
@@ -888,7 +888,7 @@ public bool IsPercentProcessorPerformanceNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor Performance is the average performance of the processor while it is exe" +
@@ -903,7 +903,7 @@ public ulong PercentProcessorPerformance {
return ((ulong)(curObj["PercentProcessorPerformance"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentProcessorTimeNull {
@@ -916,7 +916,7 @@ public bool IsPercentProcessorTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% Processor Time is the percentage of elapsed time that the processor spends to execute a non-Idle thread. It is calculated by measuring the percentage of time that the processor spends executing the idle thread and then subtracting that value from 100%. (Each processor has an idle thread to which time is accumulated when no other threads are ready to run). This counter is the primary indicator of processor activity, and displays the average percentage of busy time observed during the sample interval. It should be noted that the accounting calculation of whether the processor is idle is performed at an internal sampling interval of the system clock tick. On todays fast processors, % Processor Time can therefore underestimate the processor utilization as the processor may be spending a lot of time servicing threads between the system clock sampling interval. Workload based timer applications are one example of applications which are more likely to be measured inaccurately as timers are signaled just after the sample is taken.")]
@@ -929,7 +929,7 @@ public ulong PercentProcessorTime {
return ((ulong)(curObj["PercentProcessorTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentProcessorUtilityNull {
@@ -942,7 +942,7 @@ public bool IsPercentProcessorUtilityNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor Utility is the amount of work a processor is completing, as a percentag" +
@@ -958,7 +958,7 @@ public ulong PercentProcessorUtility {
return ((ulong)(curObj["PercentProcessorUtility"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPercentUserTimeNull {
@@ -971,7 +971,7 @@ public bool IsPercentUserTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"% User Time is the percentage of elapsed time the processor spends in the user mode. User mode is a restricted processing mode designed for applications, environment subsystems, and integral subsystems. The alternative, privileged mode, is designed for operating system components and allows direct access to hardware and all memory. The operating system switches application threads to privileged mode to access operating system services. This counter displays the average busy time as a percentage of the sample time.")]
@@ -984,7 +984,7 @@ public ulong PercentUserTime {
return ((ulong)(curObj["PercentUserTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsPerformanceLimitFlagsNull {
@@ -997,7 +997,7 @@ public bool IsPerformanceLimitFlagsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Performance Limit Flags indicate reasons why the processor performance was limite" +
@@ -1011,7 +1011,7 @@ public uint PerformanceLimitFlags {
return ((uint)(curObj["PerformanceLimitFlags"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProcessorFrequencyNull {
@@ -1024,7 +1024,7 @@ public bool IsProcessorFrequencyNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor Frequency is the frequency of the current processor in megahertz.")]
@@ -1037,7 +1037,7 @@ public uint ProcessorFrequency {
return ((uint)(curObj["ProcessorFrequency"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsProcessorStateFlagsNull {
@@ -1050,7 +1050,7 @@ public bool IsProcessorStateFlagsNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Processor State Flags")]
@@ -1063,7 +1063,7 @@ public uint ProcessorStateFlags {
return ((uint)(curObj["ProcessorStateFlags"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimestamp_ObjectNull {
@@ -1076,7 +1076,7 @@ public bool IsTimestamp_ObjectNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1088,7 +1088,7 @@ public ulong Timestamp_Object {
return ((ulong)(curObj["Timestamp_Object"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimestamp_PerfTimeNull {
@@ -1101,7 +1101,7 @@ public bool IsTimestamp_PerfTimeNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1113,7 +1113,7 @@ public ulong Timestamp_PerfTime {
return ((ulong)(curObj["Timestamp_PerfTime"]));
}
}
-
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsTimestamp_Sys100NSNull {
@@ -1126,7 +1126,7 @@ public bool IsTimestamp_Sys100NSNull {
}
}
}
-
+
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[TypeConverter(typeof(WMIValueTypeConverter))]
@@ -1138,9 +1138,9 @@ public ulong Timestamp_Sys100NS {
return ((ulong)(curObj["Timestamp_Sys100NS"]));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions OptionsParam) {
- if (((path != null)
+ if (((path != null)
&& (string.Compare(path.ClassName, this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1148,9 +1148,9 @@ private bool CheckIfProperClass(System.Management.ManagementScope mgmtScope, Sys
return CheckIfProperClass(new System.Management.ManagementObject(mgmtScope, path, OptionsParam));
}
}
-
+
private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
- if (((theObj != null)
+ if (((theObj != null)
&& (string.Compare(((string)(theObj["__CLASS"])), this.ManagementClassName, true, System.Globalization.CultureInfo.InvariantCulture) == 0))) {
return true;
}
@@ -1167,270 +1167,270 @@ private bool CheckIfProperClass(System.Management.ManagementBaseObject theObj) {
}
return false;
}
-
+
private bool ShouldSerializeAverageIdleTime() {
if ((this.IsAverageIdleTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeC1TransitionsPersec() {
if ((this.IsC1TransitionsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeC2TransitionsPersec() {
if ((this.IsC2TransitionsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeC3TransitionsPersec() {
if ((this.IsC3TransitionsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeClockInterruptsPersec() {
if ((this.IsClockInterruptsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDPCRate() {
if ((this.IsDPCRateNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeDPCsQueuedPersec() {
if ((this.IsDPCsQueuedPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFrequency_Object() {
if ((this.IsFrequency_ObjectNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFrequency_PerfTime() {
if ((this.IsFrequency_PerfTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeFrequency_Sys100NS() {
if ((this.IsFrequency_Sys100NSNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeIdleBreakEventsPersec() {
if ((this.IsIdleBreakEventsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeInterruptsPersec() {
if ((this.IsInterruptsPersecNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeParkingStatus() {
if ((this.IsParkingStatusNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentC1Time() {
if ((this.IsPercentC1TimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentC2Time() {
if ((this.IsPercentC2TimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentC3Time() {
if ((this.IsPercentC3TimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentDPCTime() {
if ((this.IsPercentDPCTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentIdleTime() {
if ((this.IsPercentIdleTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentInterruptTime() {
if ((this.IsPercentInterruptTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentofMaximumFrequency() {
if ((this.IsPercentofMaximumFrequencyNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentPerformanceLimit() {
if ((this.IsPercentPerformanceLimitNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentPriorityTime() {
if ((this.IsPercentPriorityTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentPrivilegedTime() {
if ((this.IsPercentPrivilegedTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentPrivilegedUtility() {
if ((this.IsPercentPrivilegedUtilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentProcessorPerformance() {
if ((this.IsPercentProcessorPerformanceNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentProcessorTime() {
if ((this.IsPercentProcessorTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentProcessorUtility() {
if ((this.IsPercentProcessorUtilityNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePercentUserTime() {
if ((this.IsPercentUserTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializePerformanceLimitFlags() {
if ((this.IsPerformanceLimitFlagsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProcessorFrequency() {
if ((this.IsProcessorFrequencyNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeProcessorStateFlags() {
if ((this.IsProcessorStateFlagsNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimestamp_Object() {
if ((this.IsTimestamp_ObjectNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimestamp_PerfTime() {
if ((this.IsTimestamp_PerfTimeNull == false)) {
return true;
}
return false;
}
-
+
private bool ShouldSerializeTimestamp_Sys100NS() {
if ((this.IsTimestamp_Sys100NSNull == false)) {
return true;
}
return false;
}
-
+
[Browsable(true)]
public void CommitObject() {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put();
}
}
-
+
[Browsable(true)]
public void CommitObject(System.Management.PutOptions putOptions) {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Put(putOptions);
}
}
-
+
private void Initialize() {
AutoCommitProp = true;
isEmbedded = false;
}
-
+
private static string ConstructPath(string keyName) {
string strPath = "root\\CIMV2:Win32_PerfFormattedData_Counters_ProcessorInformation";
strPath = string.Concat(strPath, string.Concat(".Name=", string.Concat("\"", string.Concat(keyName, "\""))));
return strPath;
}
-
+
private void InitializeObject(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
Initialize();
if ((path != null)) {
@@ -1442,24 +1442,24 @@ private void InitializeObject(System.Management.ManagementScope mgmtScope, Syste
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
-
+
// Different overloads of GetInstances() help in enumerating instances of the WMI class.
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances() {
return GetInstances(null, null, null);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(string condition) {
return GetInstances(null, condition, null);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(string[] selectedProperties) {
return GetInstances(null, null, selectedProperties);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(string condition, string[] selectedProperties) {
return GetInstances(null, condition, selectedProperties);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, System.Management.EnumerationOptions enumOptions) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1480,15 +1480,15 @@ public static PerfFormattedData_Counters_ProcessorInformationCollection GetInsta
}
return new PerfFormattedData_Counters_ProcessorInformationCollection(clsObject.GetInstances(enumOptions));
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition) {
return GetInstances(mgmtScope, condition, null);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string[] selectedProperties) {
return GetInstances(mgmtScope, null, selectedProperties);
}
-
+
public static PerfFormattedData_Counters_ProcessorInformationCollection GetInstances(System.Management.ManagementScope mgmtScope, string condition, string[] selectedProperties) {
if ((mgmtScope == null)) {
if ((statMgmtScope == null)) {
@@ -1505,7 +1505,7 @@ public static PerfFormattedData_Counters_ProcessorInformationCollection GetInsta
ObjectSearcher.Options = enumOptions;
return new PerfFormattedData_Counters_ProcessorInformationCollection(ObjectSearcher.Get());
}
-
+
[Browsable(true)]
public static PerfFormattedData_Counters_ProcessorInformation CreateInstance() {
System.Management.ManagementScope mgmtScope = null;
@@ -1520,39 +1520,39 @@ public static PerfFormattedData_Counters_ProcessorInformation CreateInstance() {
System.Management.ManagementClass tmpMgmtClass = new System.Management.ManagementClass(mgmtScope, mgmtPath, null);
return new PerfFormattedData_Counters_ProcessorInformation(tmpMgmtClass.CreateInstance());
}
-
+
[Browsable(true)]
public void Delete() {
PrivateLateBoundObject.Delete();
}
-
+
// Enumerator implementation for enumerating instances of the class.
public class PerfFormattedData_Counters_ProcessorInformationCollection : object, ICollection {
-
+
private ManagementObjectCollection privColObj;
-
+
public PerfFormattedData_Counters_ProcessorInformationCollection(ManagementObjectCollection objCollection) {
privColObj = objCollection;
}
-
+
public virtual int Count {
get {
return privColObj.Count;
}
}
-
+
public virtual bool IsSynchronized {
get {
return privColObj.IsSynchronized;
}
}
-
+
public virtual object SyncRoot {
get {
return this;
}
}
-
+
public virtual void CopyTo(System.Array array, int index) {
privColObj.CopyTo(array, index);
int nCtr;
@@ -1560,189 +1560,189 @@ public virtual void CopyTo(System.Array array, int index) {
array.SetValue(new PerfFormattedData_Counters_ProcessorInformation(((System.Management.ManagementObject)(array.GetValue(nCtr)))), nCtr);
}
}
-
+
public virtual System.Collections.IEnumerator GetEnumerator() {
return new PerfFormattedData_Counters_ProcessorInformationEnumerator(privColObj.GetEnumerator());
}
-
+
public class PerfFormattedData_Counters_ProcessorInformationEnumerator : object, System.Collections.IEnumerator {
-
+
private ManagementObjectCollection.ManagementObjectEnumerator privObjEnum;
-
+
public PerfFormattedData_Counters_ProcessorInformationEnumerator(ManagementObjectCollection.ManagementObjectEnumerator objEnum) {
privObjEnum = objEnum;
}
-
+
public virtual object Current {
get {
return new PerfFormattedData_Counters_ProcessorInformation(((System.Management.ManagementObject)(privObjEnum.Current)));
}
}
-
+
public virtual bool MoveNext() {
return privObjEnum.MoveNext();
}
-
+
public virtual void Reset() {
privObjEnum.Reset();
}
}
}
-
+
// TypeConverter to handle null values for ValueType properties
public class WMIValueTypeConverter : TypeConverter {
-
+
private TypeConverter baseConverter;
-
+
private System.Type baseType;
-
+
public WMIValueTypeConverter(System.Type inBaseType) {
baseConverter = TypeDescriptor.GetConverter(inBaseType);
baseType = inBaseType;
}
-
+
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type srcType) {
return baseConverter.CanConvertFrom(context, srcType);
}
-
+
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) {
return baseConverter.CanConvertTo(context, destinationType);
}
-
+
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
return baseConverter.ConvertFrom(context, culture, value);
}
-
+
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary dictionary) {
return baseConverter.CreateInstance(context, dictionary);
}
-
+
public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetCreateInstanceSupported(context);
}
-
+
public override PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributeVar) {
return baseConverter.GetProperties(context, value, attributeVar);
}
-
+
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetPropertiesSupported(context);
}
-
+
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValues(context);
}
-
+
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesExclusive(context);
}
-
+
public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) {
return baseConverter.GetStandardValuesSupported(context);
}
-
+
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) {
if ((baseType.BaseType == typeof(System.Enum))) {
if ((value.GetType() == destinationType)) {
return value;
}
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "NULL_ENUM_VALUE" ;
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((baseType == typeof(bool))
+ if (((baseType == typeof(bool))
&& (baseType.BaseType == typeof(System.ValueType)))) {
- if ((((value == null)
- && (context != null))
+ if ((((value == null)
+ && (context != null))
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
- if (((context != null)
+ if (((context != null)
&& (context.PropertyDescriptor.ShouldSerializeValue(context.Instance) == false))) {
return "";
}
return baseConverter.ConvertTo(context, culture, value, destinationType);
}
}
-
+
// Embedded class to represent WMI system Properties.
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ManagementSystemProperties {
-
+
private System.Management.ManagementBaseObject PrivateLateBoundObject;
-
+
public ManagementSystemProperties(System.Management.ManagementBaseObject ManagedObject) {
PrivateLateBoundObject = ManagedObject;
}
-
+
[Browsable(true)]
public int GENUS {
get {
return ((int)(PrivateLateBoundObject["__GENUS"]));
}
}
-
+
[Browsable(true)]
public string CLASS {
get {
return ((string)(PrivateLateBoundObject["__CLASS"]));
}
}
-
+
[Browsable(true)]
public string SUPERCLASS {
get {
return ((string)(PrivateLateBoundObject["__SUPERCLASS"]));
}
}
-
+
[Browsable(true)]
public string DYNASTY {
get {
return ((string)(PrivateLateBoundObject["__DYNASTY"]));
}
}
-
+
[Browsable(true)]
public string RELPATH {
get {
return ((string)(PrivateLateBoundObject["__RELPATH"]));
}
}
-
+
[Browsable(true)]
public int PROPERTY_COUNT {
get {
return ((int)(PrivateLateBoundObject["__PROPERTY_COUNT"]));
}
}
-
+
[Browsable(true)]
public string[] DERIVATION {
get {
return ((string[])(PrivateLateBoundObject["__DERIVATION"]));
}
}
-
+
[Browsable(true)]
public string SERVER {
get {
return ((string)(PrivateLateBoundObject["__SERVER"]));
}
}
-
+
[Browsable(true)]
public string NAMESPACE {
get {
return ((string)(PrivateLateBoundObject["__NAMESPACE"]));
}
}
-
+
[Browsable(true)]
public string PATH {
get {