public static List <ProcessorSettingData> GetProcessorSettingDataList(VirtualSystemSettingData VirtualSystemSettingData) { return (VirtualSystemSettingDataComponent.GetInstances() .Cast <VirtualSystemSettingDataComponent>() .Where((sds) => string.Compare(sds.GroupComponent.Path, VirtualSystemSettingData.Path.Path, true, CultureInfo.InvariantCulture) == 0 && string.Compare(sds.PartComponent.ClassName, $"Msvm_{nameof(ProcessorSettingData)}", true, CultureInfo.InvariantCulture) == 0) .Select((sds) => new ProcessorSettingData(sds.PartComponent)) .ToList()); }
public static GuestServiceInterfaceComponentSettingData GetGuestServiceInterfaceComponentSettingData(VirtualSystemSettingData VirtualSystemSettingData) { return (VirtualSystemSettingDataComponent.GetInstances() .Cast <VirtualSystemSettingDataComponent>() .Where((sds) => string.Compare(sds.GroupComponent.Path, VirtualSystemSettingData.Path.Path, true, CultureInfo.InvariantCulture) == 0 && string.Compare(sds.PartComponent.ClassName, $"Msvm_{nameof(GuestServiceInterfaceComponentSettingData)}", true, CultureInfo.InvariantCulture) == 0) .Select((sds) => new GuestServiceInterfaceComponentSettingData(sds.PartComponent)) .ToList() .First()); }
public static List <EthernetPortAllocationSettingData> GetEthernetPortAllocationSettingData(VirtualSystemSettingData VirtualSystemSettingData, ushort ResourceType, string ResourceSubType) { return (VirtualSystemSettingDataComponent.GetInstances() .Cast <VirtualSystemSettingDataComponent>() .Where((sds) => string.Compare(sds.GroupComponent.Path, VirtualSystemSettingData.Path.Path, true, CultureInfo.InvariantCulture) == 0 && string.Compare(sds.PartComponent.ClassName, $"Msvm_{nameof(EthernetPortAllocationSettingData)}", true, CultureInfo.InvariantCulture) == 0) .Select((sds) => new EthernetPortAllocationSettingData(sds.PartComponent)) .ToList() .Where((rasd) => rasd.ResourceType == ResourceType && string.Compare(rasd.ResourceSubType, ResourceSubType, true, CultureInfo.InvariantCulture) == 0) .ToList()); }