Mercurial > repos > IBDev-IBBoard.WarFoundry.API
comparison API/AbstractWarFoundryLoader.cs @ 419:71fceea2725b
Code tidy-up - remove warnings
* Add missing GetHashcode() implementations
* Remove unused exception variables
* Use unused event
* Remove dead code
* Properly override some methods
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 25 Sep 2011 20:52:27 +0100 |
parents | 3c4a6403a88c |
children | 86725e88052e |
comparison
equal
deleted
inserted
replaced
418:6798a59c1b49 | 419:71fceea2725b |
---|---|
127 /// <returns> | 127 /// <returns> |
128 /// A <see cref="List"/> of <see cref="FileLoadFailure"/> for files that failed to load | 128 /// A <see cref="List"/> of <see cref="FileLoadFailure"/> for files that failed to load |
129 /// </returns> | 129 /// </returns> |
130 public List<FileLoadFailure> LoadFiles() | 130 public List<FileLoadFailure> LoadFiles() |
131 { | 131 { |
132 OnFileLoadingStarted(); | |
132 PrepareForFileLoad(); | 133 PrepareForFileLoad(); |
133 Dictionary<FileInfo, IWarFoundryFactory> loadableRaces = new Dictionary<FileInfo, IWarFoundryFactory>(); | 134 Dictionary<FileInfo, IWarFoundryFactory> loadableRaces = new Dictionary<FileInfo, IWarFoundryFactory>(); |
134 Dictionary<FileInfo, IWarFoundryFactory> loadableGameSystems = new Dictionary<FileInfo, IWarFoundryFactory>(); | 135 Dictionary<FileInfo, IWarFoundryFactory> loadableGameSystems = new Dictionary<FileInfo, IWarFoundryFactory>(); |
135 List<FileLoadFailure> failedLoads = FillLoadableFiles(loadableRaces, loadableGameSystems); | 136 List<FileLoadFailure> failedLoads = FillLoadableFiles(loadableRaces, loadableGameSystems); |
136 failedLoads.AddRange(LoadGameSystems(loadableGameSystems)); | 137 failedLoads.AddRange(LoadGameSystems(loadableGameSystems)); |
138 OnFileLoadingFinished(failedLoads); | 139 OnFileLoadingFinished(failedLoads); |
139 FinishFileLoad(); | 140 FinishFileLoad(); |
140 return failedLoads; | 141 return failedLoads; |
141 } | 142 } |
142 | 143 |
144 private void OnFileLoadingStarted() | |
145 { | |
146 if (FileLoadingStarted != null) | |
147 { | |
148 FileLoadingStarted(); | |
149 } | |
150 } | |
151 | |
143 private void OnFileLoadingFinished(List<FileLoadFailure> failures) | 152 private void OnFileLoadingFinished(List<FileLoadFailure> failures) |
144 { | 153 { |
145 if (FileLoadingFinished != null) | 154 if (FileLoadingFinished != null) |
146 { | 155 { |
147 FileLoadingFinished(failures); | 156 FileLoadingFinished(failures); |