/// <summary> /// Initializes a new instance of the <see cref="Machine"/> class for the given machine. /// </summary> /// <param name="location">The network location for the given machine.</param> /// <param name="specification">The hardware specification for the given machine.</param> public Machine( NetworkIdentifier location, HardwareSpecification specification) { { Enforce.Argument(() => location); Enforce.Argument(() => specification); } m_Location = location; m_Specification = specification; }
public void Create() { ulong maxPerProcessMemory = 10; ulong totalPhysicalMemory = 9; ulong totalVirtualMemory = 11; var disks = s_Disks; var hardware = new HardwareSpecification(maxPerProcessMemory, totalPhysicalMemory, totalVirtualMemory, disks); Assert.AreEqual(maxPerProcessMemory, hardware.PerProcessMemoryInKilobytes); Assert.AreEqual(totalPhysicalMemory, hardware.TotalPhysicalMemoryInKilobytes); Assert.AreEqual(totalVirtualMemory, hardware.TotalVirtualMemoryInKilobytes); Assert.AreSame(disks, hardware.Disks()); }
/// <summary> /// Initializes a new instance of the <see cref="Machine"/> class for the local machine. /// </summary> public Machine() : this(NetworkIdentifier.ForLocalMachine(), HardwareSpecification.ForLocalMachine()) { }