internal RamInfoViewModel(IInfoFormatter format, ILogger <RamInfoViewModel> logger) { this.format = format; this.logger = logger; this.LeftMouseCommand = new RelayCommand(this.Open); this.RightMouseCommand = new RelayCommand(this.Open); }
public DriveViewModel(DriveInfo driveInfo, IInfoFormatter format, ILoggerFactory loggerFactory) { this.driveInfo = driveInfo ?? throw new ArgumentNullException(nameof(driveInfo)); this.infoFormatter = format ?? throw new ArgumentNullException(nameof(format)); this.LeftMouseCommand = new RelayCommand(this.Open); this.RightMouseCommand = new RelayCommand(this.Properties); var label = driveInfo.Name; if (label.EndsWith("\\", StringComparison.OrdinalIgnoreCase)) { label = label[0..^ 1];