Mercurial > repos > IBDev-IBBoard.WarFoundry.API
annotate api/WarFoundryLoader.cs @ 247:874c5f0906c9
Re #152: Test and fix extensibility of current schemas
* Allow any element within category (lax processing)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 11 Mar 2010 20:57:49 +0000 |
parents | a36a0e9cc05d |
children |
rev | line source |
---|---|
104
2f3cafb69799
Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents:
102
diff
changeset
|
1 // This file (WarFoundryLoader.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2007, 2008, 2009 IBBoard. |
0 | 2 // |
104
2f3cafb69799
Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents:
102
diff
changeset
|
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
0 | 4 |
5 using System; | |
6 using ICSharpCode.SharpZipLib.Zip; | |
7 | |
8 namespace IBBoard.WarFoundry.API | |
9 { | |
10 public class WarFoundryLoader | |
11 { | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
12 private static AbstractWarFoundryLoader loader; |
0 | 13 |
14 /// <summary> | |
15 /// Gets the default <see cref="WarFoundryLoader"/> used to load WarFoundry data files. | |
16 /// </summary> | |
17 /// <returns> | |
18 /// The default <see cref="WarFoundryLoader"/> | |
19 /// </returns> | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
20 public static AbstractWarFoundryLoader GetDefault() |
0 | 21 { |
22 if (loader == null) | |
23 { | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
24 loader = new DefaultWarFoundryLoader(); |
0 | 25 } |
26 | |
27 return loader; | |
28 } | |
29 | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
30 public static void SetDefault(AbstractWarFoundryLoader newLoader) |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
31 { |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
32 loader = newLoader; |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
33 } |
0 | 34 |
144
721891008b5c
Fixes #22: Add functionality to get failed file loads and reason
IBBoard <dev@ibboard.co.uk>
parents:
141
diff
changeset
|
35 private WarFoundryLoader() |
0 | 36 { |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
37 //Hide constructor |
0 | 38 } |
39 } | |
40 } |