public static VmPathInfo[] GetVmPathInfoParallel(IVm[] vms, VmPathInfoToExclude infoToExclude) { ConcurrentBag <VmPathInfo> coll = new ConcurrentBag <VmPathInfo>(); Parallel.ForEach <IVm>((IEnumerable <IVm>)vms, (Action <IVm>)(vm => coll.Add(vm.GetVmPathInfo(infoToExclude)))); return(coll.ToArray()); }
public VmPathInfo[] GetPathInfoParallel(string[] vms, VmPathInfoToExclude vmPathInfoToExclude) { return(HyperVServiceCommon.GetVmPathInfoParallel(this.GetVms(vms), vmPathInfoToExclude)); }
public VmPathInfo[] GetAllVmPathInfoParallel(VmPathInfoToExclude vmPathInfoToExclude) { return(HyperVServiceCommon.GetVmPathInfoParallel(this.GetAllVms().ToArray <IVm>(), vmPathInfoToExclude)); }