| | 1 | | using System; |
| | 2 | | using DCL.Builder; |
| | 3 | |
|
| | 4 | | namespace DCL.Builder |
| | 5 | | { |
| | 6 | | internal interface ISectionFactory |
| | 7 | | { |
| | 8 | | SectionBase GetSectionController(SectionId id); |
| | 9 | | } |
| | 10 | |
|
| | 11 | | internal class SectionFactory : ISectionFactory |
| | 12 | | { |
| | 13 | | SectionBase ISectionFactory.GetSectionController(SectionId id) |
| | 14 | | { |
| 0 | 15 | | SectionBase result = null; |
| | 16 | | switch (id) |
| | 17 | | { |
| | 18 | | case SectionId.SCENES: |
| 0 | 19 | | result = new SectionScenesController(); |
| 0 | 20 | | break; |
| | 21 | | case SectionId.PROJECTS: |
| 0 | 22 | | result = new SectionProjectController(); |
| 0 | 23 | | break; |
| | 24 | | case SectionId.LAND: |
| 0 | 25 | | result = new SectionLandController(); |
| 0 | 26 | | break; |
| | 27 | | case SectionId.SETTINGS_PROJECT_GENERAL: |
| 0 | 28 | | result = new SectionSceneGeneralSettingsController(); |
| 0 | 29 | | break; |
| | 30 | | case SectionId.SETTINGS_PROJECT_CONTRIBUTORS: |
| 0 | 31 | | result = new SectionSceneContributorsSettingsController(); |
| 0 | 32 | | break; |
| | 33 | | case SectionId.SETTINGS_PROJECT_ADMIN: |
| 0 | 34 | | result = new SectionSceneAdminsSettingsController(); |
| | 35 | | break; |
| | 36 | | } |
| | 37 | |
|
| 0 | 38 | | return result; |
| | 39 | | } |
| | 40 | | } |
| | 41 | | } |