Changeset 1767
- Timestamp:
- 2/8/2010 7:09:55 AM (2 years ago)
- Location:
- branches/eraser6/CodeReview
- Files:
-
- 6 edited
-
Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs (modified) (1 diff)
-
Eraser.Manager/DirectExecutor.cs (modified) (2 diffs)
-
Eraser.Manager/Method.cs (modified) (4 diffs)
-
Eraser.Manager/PRNG.cs (modified) (1 diff)
-
Eraser.Manager/Schedule.cs (modified) (4 diffs)
-
Eraser.Manager/Task.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs
r1745 r1767 110 110 //less. 111 111 if (erasureLength != long.MaxValue) 112 throw new ArgumentException( S._("The amount of data erased should not be " +113 "limited, since this is a self-limiting erasure method.") );112 throw new ArgumentException("The amount of data erased should not be " + 113 "limited, since this is a self-limiting erasure method."); 114 114 115 115 //If the target stream is shorter than or equal to 32kb, just forward it to -
branches/eraser6/CodeReview/Eraser.Manager/DirectExecutor.cs
r1765 r1767 263 263 EraseFilesystemObject(task, fileSystemObjectTarget); 264 264 else 265 throw new ArgumentException( S._("Unknown erasure target."));265 throw new ArgumentException("Unknown erasure target."); 266 266 } 267 267 catch (FatalException) … … 341 341 Environment.OSVersion.Version >= new Version(6, 0)) 342 342 { 343 t hrow new UnauthorizedAccessException(S._("The program does not have the " +344 " required permissions to erase the unused space on disk. Run the program" +345 " as an administrator and retry the operation."));343 task.Log.LastSessionEntries.Add(new LogEntry(S._("The program does not have " + 344 "the required permissions to erase the unused space on disk. Run the " + 345 "program as an administrator and retry the operation."), LogLevel.Error)); 346 346 } 347 347 else 348 throw new UnauthorizedAccessException(S._("The program does not have the " + 349 "required permissions to erase the unused space on disk.")); 348 { 349 task.Log.LastSessionEntries.Add(new LogEntry(S._("The program does not have " + 350 "the required permissions to erase the unused space on disk"), 351 LogLevel.Error)); 352 } 350 353 } 351 354 -
branches/eraser6/CodeReview/Eraser.Manager/Method.cs
r1681 r1767 378 378 public override long CalculateEraseDataSize(ICollection<string> paths, long targetSize) 379 379 { 380 throw new InvalidOperationException( S._("The DefaultMethod class should never " +381 "be used and should instead be replaced before execution!") );380 throw new InvalidOperationException("The DefaultMethod class should never " + 381 "be used and should instead be replaced before execution!"); 382 382 } 383 383 … … 385 385 ErasureMethodProgressFunction callback) 386 386 { 387 throw new InvalidOperationException( S._("The DefaultMethod class should never " +388 "be used and should instead be replaced before execution!") );387 throw new InvalidOperationException("The DefaultMethod class should never " + 388 "be used and should instead be replaced before execution!"); 389 389 } 390 390 } … … 473 473 //Check for a valid constructor. 474 474 if (ctor == null) 475 throw new ArgumentException( S._("Registered erasure methods must contain " +475 throw new ArgumentException("Registered erasure methods must contain " + 476 476 "a parameterless constructor that is called whenever clients request " + 477 477 "for an instance of the method. If a constructor requires parameters, " + 478 "specify it in the parameters parameter.") );478 "specify it in the parameters parameter."); 479 479 480 480 //Insert the entry … … 498 498 { 499 499 if (!ManagerLibrary.Instance.ErasureMethodManager.methods.ContainsKey(value)) 500 throw new ArgumentException( S._("The GUID of the erasure method to remove " +501 "refers to an invalid erasure method.") );500 throw new ArgumentException("The GUID of the erasure method to remove " + 501 "refers to an invalid erasure method."); 502 502 503 503 ManagerLibrary.Instance.ErasureMethodManager.methods.Remove(value); -
branches/eraser6/CodeReview/Eraser.Manager/PRNG.cs
r1681 r1767 104 104 if (minValue > maxValue) 105 105 throw new ArgumentOutOfRangeException("minValue", minValue, 106 S._("minValue is greater than maxValue"));106 "minValue is greater than maxValue"); 107 107 else if (minValue == maxValue) 108 108 return minValue; -
branches/eraser6/CodeReview/Eraser.Manager/Schedule.cs
r1681 r1767 273 273 if (ScheduleType != RecurringScheduleUnit.Daily && ScheduleType != RecurringScheduleUnit.Weekly && 274 274 ScheduleType != RecurringScheduleUnit.Monthly) 275 throw new InvalidOperationException( S._("The ScheduleUnit of the schedule " +276 "does not require a frequency value, this field would contain garbage.") );275 throw new InvalidOperationException("The ScheduleUnit of the schedule " + 276 "does not require a frequency value, this field would contain garbage."); 277 277 278 278 return frequency; … … 314 314 { 315 315 if (ScheduleType != RecurringScheduleUnit.Weekly) 316 throw new InvalidOperationException( S._("The ScheduleUnit of the schedule " +317 "does not require the WeeklySchedule value, this field would contain garbage") );316 throw new InvalidOperationException("The ScheduleUnit of the schedule " + 317 "does not require the WeeklySchedule value, this field would contain garbage"); 318 318 319 319 return weeklySchedule; … … 340 340 { 341 341 if (ScheduleType != RecurringScheduleUnit.Monthly) 342 throw new InvalidOperationException( S._("The ScheduleUnit of the schedule does " +343 "not require the MonthlySchedule value, this field would contain garbage") );342 throw new InvalidOperationException("The ScheduleUnit of the schedule does " + 343 "not require the MonthlySchedule value, this field would contain garbage"); 344 344 345 345 return monthlySchedule; … … 470 470 { 471 471 if (ScheduleType != RecurringScheduleUnit.Weekly) 472 throw new ArgumentException( S._("The ScheduleUnit of the schedule does " +473 "not use the WeeklySchedule value, this field would contain garbage") );472 throw new ArgumentException("The ScheduleUnit of the schedule does " + 473 "not use the WeeklySchedule value, this field would contain garbage"); 474 474 return ((int)weeklySchedule & (1 << (int)date.DayOfWeek)) != 0; 475 475 } -
branches/eraser6/CodeReview/Eraser.Manager/Task.cs
r1765 r1767 183 183 { 184 184 if (value.Owner != null) 185 throw new ArgumentException( S._("The schedule provided can only " +186 "belong to one task at a time") );185 throw new ArgumentException("The schedule provided can only " + 186 "belong to one task at a time"); 187 187 188 188 if (schedule is RecurringSchedule)
Note: See TracChangeset
for help on using the changeset viewer.
