/// <summary> /// Initalizes a new instance of <see cref="HardDrive"/> class. /// </summary> /// <param name="capacity">The capacity.</param> /// <param name="driveType">The Drive type.</param> /// <param name="readSpeed">The read speed.</param> /// <param name="writeSpeed">The write speed.</param> public HardDrive(double capacity, HardDriveType driveType, double readSpeed, double writeSpeed) { Capacity = capacity; DriveType = driveType; ReadSpeed = readSpeed; WriteSpeed = writeSpeed; }
public IQueryable <HardDrive> GetHardDrivesForApi(string driveBrand, string driveType) { HardDriveType hardDriveType = (HardDriveType)Enum.Parse(typeof(HardDriveType), driveType); HardDriveBrandType hardDriveBrandType = (HardDriveBrandType)Enum.Parse(typeof(HardDriveBrandType), driveBrand); return(this.Context.HardDrives.Where(hd => hd.DriveBrand == hardDriveBrandType && hd.DriveType == hardDriveType)); }
public Laptop (int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) { this.BatteryLife = batteryLife; this.Ram = ram; this.HardDriveSpace = hardDriveSpace; this.HardDrive = hardDrive; this.Processor = processor; this.Core = core; this.Price = price; }
} //Speed in MB /// <summary> /// Initializes a new HardDrive /// </summary> /// <param name="capacity">Size in GB</param> /// <param name="type">The type of the HardDrive, either SSD to HDD</param> /// <param name="readSpeed">The read speed</param> /// <param name="writeSpeed">The write speed</param> public HardDrive(int capacity, HardDriveType type, int readSpeed, int writeSpeed) { if (capacity < 0) { throw new ArgumentOutOfRangeException("Capacity must be a positive value"); } if (readSpeed < 0) { throw new ArgumentOutOfRangeException("Read Speed must be a positive value"); } if (writeSpeed < 0) { throw new ArgumentOutOfRangeException("Write Speed must be a positive value"); } Capacity = capacity; Type = type; ReadSpeed = readSpeed; WriteSpeed = writeSpeed; }
public Drive(HardDriveType type, int capacity) { Type = type; Capacity = capacity; }
public AsusLaptop(string mouse, int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) : base (batteryLife, ram, hardDriveSpace, hardDrive, processor, core, price) { this.Mouse = mouse; }
public HewlettPackardLaptop(string joystick, int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) : base (batteryLife, ram, hardDriveSpace, hardDrive, processor, core, price) { this.Joystick = joystick; }