comparison API/Factories/DummyWarFoundryFactory.cs @ 337:3c4a6403a88c

* Fix capitalisation so that new files are in the namespace no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 03 Apr 2011 18:50:32 +0000
parents
children 22561233df69
comparison
equal deleted inserted replaced
336:3631c1493c7f 337:3c4a6403a88c
1 // This file (DummyWarFoundryFactory.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2010 IBBoard
2 //
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.
4
5 using IBBoard.WarFoundry.API.Factories;
6 using IBBoard.WarFoundry.API.Objects;
7 using System.IO;
8 using System.Collections.Generic;
9
10 namespace IBBoard.WarFoundry.API.Factories
11 {
12 ///<summary>
13 ///A dummy factory for use with <see cref="WarFoundryStagedLoadingObject"/>s that implements the bare minimum of the methods but won't load anything
14 ///</summary>
15 public class DummyWarFoundryFactory : IWarFoundryFactory
16 {
17 public event SingleArgMethodInvoker<GameSystem> GameSystemLoaded;
18
19 public event SingleArgMethodInvoker<Race> RaceLoaded;
20
21 public event SingleArgMethodInvoker<Army> ArmyLoaded;
22
23 public DummyWarFoundryFactory()
24 {
25 //Public constructor
26 }
27
28 public void CompleteLoading(IWarFoundryStagedLoadObject obj)
29 {
30 obj.SetAsFullyLoaded();
31 }
32
33 public bool CanHandleFileFormat(FileInfo file)
34 {
35 return false;
36 }
37
38 public bool CanHandleFileAsRace(FileInfo file)
39 {
40 return false;
41 }
42
43 public bool CanHandleFileAsGameSystem(FileInfo file)
44 {
45 return false;
46 }
47
48 public bool CanHandleFileAsArmy(FileInfo file)
49 {
50 return false;
51 }
52
53 public ICollection<IWarFoundryObject> CreateObjectsFromFile(FileInfo file)
54 {
55 return new List<IWarFoundryObject>();
56 }
57 }
58 }
59