public uint Optimize(bool Analyze, bool Defrag, bool NormalPriority, bool ReTrim, bool RunAsJob, bool SlabConsolidate, bool TierOptimize, out ManagementPath CreatedStorageJob, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("Optimize"); inParams["Analyze"] = Analyze; inParams["Defrag"] = Defrag; inParams["NormalPriority"] = NormalPriority; inParams["ReTrim"] = ReTrim; inParams["RunAsJob"] = RunAsJob; inParams["SlabConsolidate"] = SlabConsolidate; inParams["TierOptimize"] = TierOptimize; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Optimize", inParams, null); CreatedStorageJob = null; if (outParams.Properties["CreatedStorageJob"] != null) { CreatedStorageJob = new ManagementPath(outParams.Properties["CreatedStorageJob"].Value as string); } ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { CreatedStorageJob = null; ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint Repair(bool OfflineScanAndFix, bool RunAsJob, bool Scan, bool SpotFix, out ManagementPath CreatedStorageJob, out ManagementBaseObject ExtendedStatus, out uint Output) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("Repair"); inParams["OfflineScanAndFix"] = OfflineScanAndFix; inParams["RunAsJob"] = RunAsJob; inParams["Scan"] = Scan; inParams["SpotFix"] = SpotFix; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Repair", inParams, null); CreatedStorageJob = null; if (outParams.Properties["CreatedStorageJob"] != null) { CreatedStorageJob = new ManagementPath(outParams.Properties["CreatedStorageJob"].Value as string); } ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; Output = Convert.ToUInt32(outParams.Properties["Output"].Value); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { CreatedStorageJob = null; ExtendedStatus = null; Output = Convert.ToUInt32(0); return(Convert.ToUInt32(0)); } }
public uint Format(uint AllocationUnitSize, bool Compress, bool DisableHeatGathering, string FileSystem, string FileSystemLabel, bool Force, bool Full, bool IsDAX, bool RunAsJob, bool SetIntegrityStreams, bool ShortFileNameSupport, bool UseLargeFRS, out ManagementPath CreatedStorageJob, out ManagementBaseObject ExtendedStatus, out ManagementBaseObject FormattedVolume) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("Format"); inParams[nameof(AllocationUnitSize)] = AllocationUnitSize; inParams["Compress"] = Compress; inParams["DisableHeatGathering"] = DisableHeatGathering; inParams[nameof(FileSystem)] = FileSystem; inParams[nameof(FileSystemLabel)] = FileSystemLabel; inParams["Force"] = Force; inParams["Full"] = Full; inParams["IsDAX"] = IsDAX; inParams["RunAsJob"] = RunAsJob; inParams["SetIntegrityStreams"] = SetIntegrityStreams; inParams["ShortFileNameSupport"] = ShortFileNameSupport; inParams["UseLargeFRS"] = UseLargeFRS; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Format", inParams, null); CreatedStorageJob = null; if (outParams.Properties["CreatedStorageJob"] != null) { CreatedStorageJob = new ManagementPath(outParams.Properties["CreatedStorageJob"].Value as string); } ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; FormattedVolume = (ManagementBaseObject)outParams.Properties["FormattedVolume"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { CreatedStorageJob = null; ExtendedStatus = null; FormattedVolume = null; return(Convert.ToUInt32(0)); } }
public uint ModifyPoolResources(string[] AllocationSettings, ManagementPath ChildPool, ManagementPath[] ParentPools, out ManagementPath Job) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("ModifyPoolResources"); inParams["AllocationSettings"] = AllocationSettings; inParams["ChildPool"] = ChildPool?.Path; if (ParentPools != null) { int len = ParentPools.Length; string[] arrProp = new string[len]; for (int iCounter = 0; iCounter < len; iCounter += 1) { arrProp[iCounter] = ((ManagementPath)ParentPools.GetValue(iCounter)).Path; } inParams["ParentPools"] = arrProp; } else { inParams["ParentPools"] = null; } ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("ModifyPoolResources", inParams, null); Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams["Job"] as string); } return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Job = null; return(Convert.ToUInt32(0)); } }
public uint ModifyResourceSettings(string[] ResourceSettings, out ManagementPath Job, out ManagementPath[] ResultingResourceSettings) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("ModifyResourceSettings"); inParams["ResourceSettings"] = ResourceSettings; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("ModifyResourceSettings", inParams, null); Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams["Job"] as string); } ResultingResourceSettings = null; if (outParams.Properties["ResultingResourceSettings"] != null) { int len = ((Array)outParams.Properties["ResultingResourceSettings"].Value).Length; ManagementPath[] arrToRet = new ManagementPath[len]; for (int iCounter = 0; iCounter < len; iCounter += 1) { arrToRet[iCounter] = new ManagementPath(((Array)outParams.Properties["ResultingResourceSettings"].Value).GetValue(iCounter).ToString()); } ResultingResourceSettings = arrToRet; } return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Job = null; ResultingResourceSettings = null; return(Convert.ToUInt32(0)); } }
public uint RemoveResourceSettings(ManagementPath[] ResourceSettings, out ManagementPath Job) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("RemoveResourceSettings"); if (ResourceSettings != null) { int len = ResourceSettings.Length; string[] arrProp = new string[len]; for (int iCounter = 0; iCounter < len; iCounter += 1) { arrProp[iCounter] = ((ManagementPath)ResourceSettings.GetValue(iCounter)).Path; } inParams["ResourceSettings"] = arrProp; } else { inParams["ResourceSettings"] = null; } ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("RemoveResourceSettings", inParams, null); Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams["Job"] as string); } return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Job = null; return(Convert.ToUInt32(0)); } }
public uint Clear(bool RemoveData, bool RemoveOEM, bool RunAsJob, bool Sanitize, bool ZeroOutEntireDisk, out ManagementPath CreatedStorageJob, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("Clear"); inParams["RemoveData"] = RemoveData; inParams["RemoveOEM"] = RemoveOEM; inParams["RunAsJob"] = RunAsJob; inParams["Sanitize"] = Sanitize; inParams["ZeroOutEntireDisk"] = ZeroOutEntireDisk; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Clear", inParams, null); CreatedStorageJob = null; if (outParams.Properties["CreatedStorageJob"] != null) { CreatedStorageJob = new ManagementPath(outParams.Properties["CreatedStorageJob"].ToString()); } ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { CreatedStorageJob = null; ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint DefineSystem(ManagementPath ReferenceConfiguration, string[] ResourceSettings, string SystemSettings, out ManagementPath Job, out ManagementPath ResultingSystem) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("DefineSystem"); inParams["ReferenceConfiguration"] = ReferenceConfiguration?.Path; inParams["ResourceSettings"] = ResourceSettings; inParams["SystemSettings"] = SystemSettings; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("DefineSystem", inParams, null); Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams["Job"] as string); } ResultingSystem = null; if (outParams.Properties["ResultingSystem"] != null) { ResultingSystem = new ManagementPath(outParams["ResultingSystem"] as string); } return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Job = null; ResultingSystem = null; return(Convert.ToUInt32(0)); } }
public uint ShowMetricsByClass(ManagementPath Definition, ManagementPath Subject, out ManagementPath[] DefinitionList, out ushort[] MetricCollectionEnabled, out string[] MetricNames) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("ShowMetricsByClass"); inParams["Definition"] = Definition?.Path; inParams["Subject"] = Subject?.Path; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("ShowMetricsByClass", inParams, null); DefinitionList = null; if (outParams.Properties["DefinitionList"] != null) { int len = ((Array)outParams.Properties["DefinitionList"].Value).Length; ManagementPath[] arrToRet = new ManagementPath[len]; for (int iCounter = 0; iCounter < len; iCounter += 1) { arrToRet[iCounter] = new ManagementPath(((Array)outParams.Properties["DefinitionList"].Value).GetValue(iCounter).ToString()); } DefinitionList = arrToRet; } MetricCollectionEnabled = (ushort[])outParams.Properties["MetricCollectionEnabled"].Value; MetricNames = (string[])outParams.Properties["MetricNames"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { DefinitionList = null; MetricCollectionEnabled = null; MetricNames = null; return(Convert.ToUInt32(0)); } }
public uint GetMetricValues(ushort Count, ManagementPath Definition, ushort Range, out ManagementPath[] Values) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("GetMetricValues"); inParams["Count"] = Count; inParams["Definition"] = Definition?.Path; inParams["Range"] = Range; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("GetMetricValues", inParams, null); Values = null; if (outParams.Properties["Values"] != null) { int len = ((Array)outParams.Properties["Values"].Value).Length; ManagementPath[] arrToRet = new ManagementPath[len]; for (int iCounter = 0; iCounter < len; iCounter += 1) { arrToRet[iCounter] = new ManagementPath(((Array)outParams.Properties["Values"].Value).GetValue(iCounter).ToString()); } Values = arrToRet; } return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Values = null; return(Convert.ToUInt32(0)); } }
public uint CreateVolume(string AccessPath, uint AllocationUnitSize, ushort FileSystem, string FriendlyName, bool RunAsJob, out ManagementPath CreatedStorageJob, out ManagementBaseObject CreatedVolume, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("CreateVolume"); inParams["AccessPath"] = AccessPath; inParams["AllocationUnitSize"] = AllocationUnitSize; inParams["FileSystem"] = FileSystem; inParams[nameof(FriendlyName)] = FriendlyName; inParams["RunAsJob"] = RunAsJob; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("CreateVolume", inParams, null); CreatedStorageJob = null; if (outParams.Properties["CreatedStorageJob"] != null) { CreatedStorageJob = new ManagementPath(outParams.Properties["CreatedStorageJob"].ToString()); } CreatedVolume = (ManagementBaseObject)outParams.Properties["CreatedVolume"].Value; ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { CreatedStorageJob = null; CreatedVolume = null; ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint GetVirtualDiskChanges(ulong ByteLength, ulong ByteOffset, string LimitId, string Path, string TargetSnapshotId, out ulong[] ChangedByteLengths, out ulong[] ChangedByteOffsets, out ManagementPath Job, out ulong ProcessedByteLength) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("GetVirtualDiskChanges"); inParams["ByteLength"] = ByteLength; inParams["ByteOffset"] = ByteOffset; inParams["LimitId"] = LimitId; inParams["Path"] = Path; inParams["TargetSnapshotId"] = TargetSnapshotId; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("GetVirtualDiskChanges", inParams, null); ChangedByteLengths = (ulong[])outParams.Properties["ChangedByteLengths"].Value; ChangedByteOffsets = (ulong[])outParams.Properties["ChangedByteOffsets"].Value; Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams.Properties["Job"].Value as string); } ProcessedByteLength = Convert.ToUInt64(outParams.Properties["ProcessedByteLength"].Value); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ChangedByteLengths = null; ChangedByteOffsets = null; Job = null; ProcessedByteLength = Convert.ToUInt64(0); return(Convert.ToUInt32(0)); } }
public uint CreateSnapshot(ManagementPath AffectedSystem, ref ManagementPath ResultingSnapshot, string SnapshotSettings, ushort SnapshotType, out ManagementPath Job) { if (IsEmbedded == false) { using (ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("CreateSnapshot")) { inParams["AffectedSystem"] = AffectedSystem?.Path; inParams["ResultingSnapshot"] = ResultingSnapshot?.Path; inParams["SnapshotSettings"] = SnapshotSettings; inParams["SnapshotType"] = SnapshotType; using (ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("CreateSnapshot", inParams, null)) { Job = null; if (outParams.Properties["Job"] != null) { Job = new ManagementPath(outParams["Job"] as string); } ResultingSnapshot = (ManagementPath)outParams.Properties["ResultingSnapshot"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } } } else { Job = null; return(Convert.ToUInt32(0)); } }
public uint DetachVirtualHardDisk() { if (IsEmbedded == false) { ManagementBaseObject inParams = null; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("DetachVirtualHardDisk", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint StartService() { if (IsEmbedded == false) { ManagementBaseObject inParams = null; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("StartService", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint KillJob(bool DeleteOnKill) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("KillJob"); inParams["DeleteOnKill"] = DeleteOnKill; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("KillJob", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint QuiesceDevice(bool Quiesce) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("QuiesceDevice"); inParams["Quiesce"] = Quiesce; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("QuiesceDevice", inParams, null); return(System.Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(System.Convert.ToUInt32(0)); } }
public uint CalculatePossibleReserve(ushort ProcessorCount) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("CalculatePossibleReserve"); inParams["ProcessorCount"] = ProcessorCount; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("CalculatePossibleReserve", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint Refresh(out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = null; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Refresh", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint GetAttributes(out bool VolumeScrubEnabled) { if (IsEmbedded == false) { ManagementBaseObject inParams = null; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("GetAttributes", inParams, null); VolumeScrubEnabled = Convert.ToBoolean(outParams.Properties["VolumeScrubEnabled"].Value); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { VolumeScrubEnabled = Convert.ToBoolean(0); return(Convert.ToUInt32(0)); } }
public uint SetPowerState(ushort PowerState, System.DateTime Time) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("SetPowerState"); inParams["PowerState"] = PowerState; inParams["Time"] = ToDmtfDateTime(Time); ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("SetPowerState", inParams, null); return(System.Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(System.Convert.ToUInt32(0)); } }
public uint RequestStateChange(ushort RequestedState, DateTime TimeoutPeriod) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("RequestStateChange"); inParams["RequestedState"] = RequestedState; inParams["TimeoutPeriod"] = ToDmtfDateTime(TimeoutPeriod); ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("RequestStateChange", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint GetErrorEx(out string[] Errors) { if (IsEmbedded == false) { ManagementBaseObject inParams = null; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("GetErrorEx", inParams, null); Errors = (string[])outParams.Properties["Errors"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { Errors = null; return(Convert.ToUInt32(0)); } }
public uint SetFileSystemLabel(string FileSystemLabel, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("SetFileSystemLabel"); inParams[nameof(FileSystemLabel)] = FileSystemLabel; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("SetFileSystemLabel", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint Initialize(ushort PartitionStyle, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("Initialize"); inParams[nameof(PartitionStyle)] = PartitionStyle; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("Initialize", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint ControlSampleTimes(DateTime PreferredSampleInterval, bool RestartGathering, DateTime StartSampleTime) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("ControlSampleTimes"); inParams["PreferredSampleInterval"] = ToDmtfDateTime(PreferredSampleInterval); inParams["RestartGathering"] = RestartGathering; inParams["StartSampleTime"] = ToDmtfDateTime(StartSampleTime); ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("ControlSampleTimes", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint RemoveAccessPath(string AccessPath, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("RemoveAccessPath"); inParams["AccessPath"] = AccessPath; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("RemoveAccessPath", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint SetAttributes(bool EnableVolumeScrub, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("SetAttributes"); inParams["EnableVolumeScrub"] = EnableVolumeScrub; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("SetAttributes", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }
public uint ControlMetricsByClass(ManagementPath Definition, ushort MetricCollectionEnabled, ManagementPath Subject) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("ControlMetricsByClass"); inParams["Definition"] = Definition?.Path; inParams["MetricCollectionEnabled"] = MetricCollectionEnabled; inParams["Subject"] = Subject?.Path; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("ControlMetricsByClass", inParams, null); return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { return(Convert.ToUInt32(0)); } }
public uint SetDedupMode(uint DedupMode, out ManagementBaseObject ExtendedStatus) { if (IsEmbedded == false) { ManagementBaseObject inParams = PrivateLateBoundObject.GetMethodParameters("SetDedupMode"); inParams[nameof(DedupMode)] = DedupMode; ManagementBaseObject outParams = PrivateLateBoundObject.InvokeMethod("SetDedupMode", inParams, null); ExtendedStatus = (ManagementBaseObject)outParams.Properties["ExtendedStatus"].Value; return(Convert.ToUInt32(outParams.Properties["ReturnValue"].Value)); } else { ExtendedStatus = null; return(Convert.ToUInt32(0)); } }