Created
March 29, 2011 10:19
-
-
Save acken/892133 to your computer and use it in GitHub Desktop.
Clever use of interfaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void setInitialUsedSpace() | |
| { | |
| _sizeCalculator.Calculate().ToList() | |
| .ForEach(calculation => DecreaseUsedSpaceForVolume(calculation.Key).With(calculation.Value)); | |
| _volumes.ForEach(x => logInitialSize(x)); | |
| } | |
| private void handle(UploadFinishedMessage message) | |
| { | |
| var task = message.Task; | |
| IncreaseUsedSpaceForVolume(task.StorageVolumeID).With(task.FileSize); | |
| } | |
| private void handle(RemoveFinishedMessage message) | |
| { | |
| var task = message.Task; | |
| DecreaseUsedSpaceForVolume(task.StorageVolumeID).With(task.FileSize); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment