示例#1
0
 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());
 }
示例#2
0
 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());
 }
示例#3
0
 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());
 }