예제 #1
0
 public void IsProcessorActive(int index, string str, bool expectedResult)
 {
     Assert.Equal(expectedResult, ProcessAffinity.IsProcessorActive(ProcessAffinity.Parse(str), index));
 }
예제 #2
0
 public void Parse(string str, int maximumProcessorCount, bool concise)
 {
     Assert.Equal(Normalize(str), ProcessAffinity.ToString(ProcessAffinity.Parse(str), maximumProcessorCount, false, concise)?.Trim());
 }
예제 #3
0
 public void CountActiveProcessors(string str, int maximumProcessorCount, int expectedResult)
 {
     Assert.Equal(expectedResult, ProcessAffinity.CountActiveProcessors(ProcessAffinity.Parse(str), maximumProcessorCount));
 }
예제 #4
0
 public IsolationLimits WithAffinityMask(string value, CultureInfo cultureInfo = null)
 {
     return(new IsolationLimits(MaxMemory, MaxCpuUsage, ProcessAffinity.Parse(value)));
 }