Mercurial > repos > IBBoard.WarFoundry.API
comparison api/Factories/IWarFoundryFactory.cs @ 14:0770e5cbba7c
Closes #21 - File loading in order
* Reworked LoadFiles to smaller methods for readability (also re #10) and structure
* Now determine expected load return before loading then load all "expected GameSystem" before "expected Race"
* Make "can load as race/game system/army" methods public in interface
Re #22 - Get errored file loading
* Created FileLoadFailure class and made LoadFiles return a list of them
Also
* Some code cleanup
* Change to DictionaryUtils calls
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 25 Jan 2009 14:03:20 +0000 |
parents | 613bc5eaac59 |
children | 306558904c2a |
comparison
equal
deleted
inserted
replaced
13:ad8eaed12e66 | 14:0770e5cbba7c |
---|---|
42 /// A <see cref="FileInfo"/> for the file to check support for. | 42 /// A <see cref="FileInfo"/> for the file to check support for. |
43 /// </param> | 43 /// </param> |
44 /// <returns> | 44 /// <returns> |
45 /// <code>true</code> if the file appears to be supported for loading by this factory, else returns <code>false</code> | 45 /// <code>true</code> if the file appears to be supported for loading by this factory, else returns <code>false</code> |
46 /// </returns> | 46 /// </returns> |
47 bool CanHandleFileFormat(FileInfo file); | 47 bool CanHandleFileFormat(FileInfo file); |
48 | |
49 /// <summary> | |
50 /// Checks if the factory thinks it can handle the supplied file as a Race. Checks can be performed on file extension or some basic check of file content, or some other method. | |
51 /// </summary> | |
52 /// <param name="file"> | |
53 /// A <see cref="FileInfo"/> for the file to check support for as a file containing Race information. | |
54 /// </param> | |
55 /// <returns> | |
56 /// <code>true</code> if the file appears to be supported for loading by this factory as a Race, else returns <code>false</code> | |
57 /// </returns> | |
58 bool CanHandleFileAsRace(FileInfo file); | |
59 | |
60 /// <summary> | |
61 /// Checks if the factory thinks it can handle the supplied file as a GameSystem. Checks can be performed on file extension or some basic check of file content, or some other method. | |
62 /// </summary> | |
63 /// <param name="file"> | |
64 /// A <see cref="FileInfo"/> for the file to check support for as a file containing GameSystem information. | |
65 /// </param> | |
66 /// <returns> | |
67 /// <code>true</code> if the file appears to be supported for loading by this factory as a GameSystem, else returns <code>false</code> | |
68 /// </returns> | |
69 bool CanHandleFileAsGameSystem(FileInfo file); | |
70 | |
71 /// <summary> | |
72 /// Checks if the factory thinks it can handle the supplied file as a Army. Checks can be performed on file extension or some basic check of file content, or some other method. | |
73 /// </summary> | |
74 /// <param name="file"> | |
75 /// A <see cref="FileInfo"/> for the file to check support for as a file containing Army information. | |
76 /// </param> | |
77 /// <returns> | |
78 /// <code>true</code> if the file appears to be supported for loading by this factory as a Army, else returns <code>false</code> | |
79 /// </returns> | |
80 bool CanHandleFileAsArmy(FileInfo file); | |
48 | 81 |
49 /// <summary> | 82 /// <summary> |
50 /// Reads the data from the supplied file and returns it as a collection of loadable objects. | 83 /// Reads the data from the supplied file and returns it as a collection of loadable objects. |
51 /// </summary> | 84 /// </summary> |
52 /// <param name="file"> | 85 /// <param name="file"> |