예제 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="exportTemplateDbAccess">Export Template Db Access</param>
        /// <param name="exportSettingsDbAccess">Export Settings Db Access</param>
        /// <param name="projectDbAccess">Project Db Access</param>
        /// <param name="npcDbAccess">Npc Db Access</param>
        /// <param name="npcTemplateDbAccess">Npc Template Db Access</param>
        /// <param name="dialogDbAccess">Dialog Db Access</param>
        /// <param name="itemDbAccess">Item Db Access</param>
        /// <param name="itemTemplateDbAccess">Item Template Db Access</param>
        /// <param name="skillDbAccess">Skill Db Access</param>
        /// <param name="skillTemplateDbAccess">Skill Template Db Access</param>
        /// <param name="templatePlaceholderResolver">Template Placeholder Resolver</param>
        /// <param name="dialogFunctionDbAccess">Dialog Function Db Access</param>
        /// <param name="dialogFunctionGenerationConditionProvider">Dialog Function Generation Condition Provider</param>
        /// <param name="languageKeyDbAccess">Language Key Db Access</param>
        /// <param name="timelineService">Timeline Service</param>
        /// <param name="userManager">User Manager</param>
        /// <param name="logger">Logger</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        public ExportApiController(IExportDefaultTemplateProvider defaultTemplateProvider, IExportTemplateDbAccess exportTemplateDbAccess, IExportSettingsDbAccess exportSettingsDbAccess, IProjectDbAccess projectDbAccess,
                                   IKortistoNpcDbAccess npcDbAccess, IKortistoNpcTemplateDbAccess npcTemplateDbAccess, ITaleDbAccess dialogDbAccess, IStyrItemDbAccess itemDbAccess, IStyrItemTemplateDbAccess itemTemplateDbAccess,
                                   IEvneSkillDbAccess skillDbAccess, IEvneSkillTemplateDbAccess skillTemplateDbAccess, IExportTemplatePlaceholderResolver templatePlaceholderResolver, IDialogFunctionGenerationConditionDbAccess dialogFunctionDbAccess,
                                   IDialogFunctionGenerationConditionProvider dialogFunctionGenerationConditionProvider, ILanguageKeyDbAccess languageKeyDbAccess, ITimelineService timelineService, UserManager <GoNorthUser> userManager, ILogger <ExportApiController> logger,
                                   IStringLocalizerFactory localizerFactory)
        {
            _defaultTemplateProvider     = defaultTemplateProvider;
            _exportTemplateDbAccess      = exportTemplateDbAccess;
            _exportSettingsDbAccess      = exportSettingsDbAccess;
            _projectDbAccess             = projectDbAccess;
            _npcDbAccess                 = npcDbAccess;
            _npcTemplateDbAccess         = npcTemplateDbAccess;
            _dialogDbAccess              = dialogDbAccess;
            _itemDbAccess                = itemDbAccess;
            _itemTemplateDbAccess        = itemTemplateDbAccess;
            _skillDbAccess               = skillDbAccess;
            _skillTemplateDbAccess       = skillTemplateDbAccess;
            _templatePlaceholderResolver = templatePlaceholderResolver;
            _dialogFunctionDbAccess      = dialogFunctionDbAccess;
            _dialogFunctionGenerationConditionProvider = dialogFunctionGenerationConditionProvider;
            _languageKeyDbAccess = languageKeyDbAccess;
            _timelineService     = timelineService;
            _userManager         = userManager;
            _logger    = logger;
            _localizer = localizerFactory.Create(this.GetType());

            _exporters = new Dictionary <string, IObjectExporter>();
            _exporters.Add("script", new ScriptExporter(templatePlaceholderResolver, projectDbAccess, exportSettingsDbAccess));
            _exporters.Add("json", new JsonExporter());
            _exporters.Add("languagefile", new LanguageExporter(templatePlaceholderResolver, defaultTemplateProvider, projectDbAccess, exportSettingsDbAccess));
        }
예제 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="exportDefaultTemplateProvider">Export default template provider</param>
 /// <param name="userPreferencesDbAccess">User PReferences Database access</param>
 /// <param name="userManager">User Manager</param>
 /// <param name="exportSettings">Export settings</param>
 /// <param name="projectDbAccess">Project Db Access</param>
 public ExportController(IExportDefaultTemplateProvider exportDefaultTemplateProvider, IUserPreferencesDbAccess userPreferencesDbAccess, UserManager <GoNorthUser> userManager, IExportSettingsDbAccess exportSettings, IProjectDbAccess projectDbAccess)
 {
     _exportDefaultTemplateProvider = exportDefaultTemplateProvider;
     _userPreferencesDbAccess       = userPreferencesDbAccess;
     _userManager     = userManager;
     _exportSettings  = exportSettings;
     _projectDbAccess = projectDbAccess;
 }
예제 #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="placeholderResolver">Pkaceholder Resolver</param>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="projectDbAccess">Project Db Access</param>
        /// <param name="exportSettingsDbAccess">Export Settings Db Accesss</param>
        public LanguageExporter(IExportTemplatePlaceholderResolver placeholderResolver, IExportDefaultTemplateProvider defaultTemplateProvider, IProjectDbAccess projectDbAccess, IExportSettingsDbAccess exportSettingsDbAccess)
        {
            _placeholderResolver     = placeholderResolver;
            _defaultTemplateProvider = defaultTemplateProvider;
            _projectDbAccess         = projectDbAccess;
            _exportSettingsDbAccess  = exportSettingsDbAccess;

            _scriptExporter = new ScriptExporter(placeholderResolver, projectDbAccess, exportSettingsDbAccess);
        }
예제 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="exportDefaultTemplateProvider">Export default template provider</param>
 /// <param name="userPreferencesDbAccess">User PReferences Database access</param>
 /// <param name="userManager">User Manager</param>
 /// <param name="exportSettings">Export settings</param>
 /// <param name="userProjectAccess">User project Access</param>
 /// <param name="actionTranslator">Action translator</param>
 public ExportController(IExportDefaultTemplateProvider exportDefaultTemplateProvider, IUserPreferencesDbAccess userPreferencesDbAccess, UserManager <GoNorthUser> userManager, IExportSettingsDbAccess exportSettings, IUserProjectAccess userProjectAccess,
                         IActionTranslator actionTranslator)
 {
     _exportDefaultTemplateProvider = exportDefaultTemplateProvider;
     _userPreferencesDbAccess       = userPreferencesDbAccess;
     _userManager       = userManager;
     _exportSettings    = exportSettings;
     _userProjectAccess = userProjectAccess;
     _actionTranslator  = actionTranslator;
 }
예제 #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="exportDefaultTemplateProvider">Export default template provider</param>
 /// <param name="userPreferencesDbAccess">User PReferences Database access</param>
 /// <param name="userManager">User Manager</param>
 /// <param name="exportSettings">Export settings</param>
 /// <param name="userProjectAccess">User project Access</param>
 /// <param name="actionTranslator">Action translator</param>
 /// <param name="configuration">Configuration</param>
 public ExportController(IExportDefaultTemplateProvider exportDefaultTemplateProvider, IUserPreferencesDbAccess userPreferencesDbAccess, UserManager <GoNorthUser> userManager, IExportSettingsDbAccess exportSettings, IUserProjectAccess userProjectAccess,
                         IActionTranslator actionTranslator, IOptions <ConfigurationData> configuration)
 {
     _exportDefaultTemplateProvider = exportDefaultTemplateProvider;
     _userPreferencesDbAccess       = userPreferencesDbAccess;
     _userManager       = userManager;
     _exportSettings    = exportSettings;
     _userProjectAccess = userProjectAccess;
     _actionTranslator  = actionTranslator;
     _config            = configuration.Value.Misc;
 }
예제 #6
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="placeholderResolver">Pkaceholder Resolver</param>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="exportSettingsDbAccess">Export Settings Db Accesss</param>
        /// <param name="userProjectAccess">User project access</param>
        /// <param name="languageKeyReferenceCollector">Language key reference collector</param>
        public LanguageExporter(IExportTemplatePlaceholderResolver placeholderResolver, IExportDefaultTemplateProvider defaultTemplateProvider, IExportSettingsDbAccess exportSettingsDbAccess, IUserProjectAccess userProjectAccess,
                                ILanguageKeyReferenceCollector languageKeyReferenceCollector)
        {
            _placeholderResolver           = placeholderResolver;
            _defaultTemplateProvider       = defaultTemplateProvider;
            _exportSettingsDbAccess        = exportSettingsDbAccess;
            _userProjectAccess             = userProjectAccess;
            _languageKeyReferenceCollector = languageKeyReferenceCollector;

            _scriptExporter = new ScriptExporter(placeholderResolver, exportSettingsDbAccess, userProjectAccess);
        }
예제 #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 public CachedExportDefaultTemplateProvider(IExportDefaultTemplateProvider defaultTemplateProvider)
 {
     _defaultTemplateProvider = defaultTemplateProvider;
     _cachedExportTemplates   = new Dictionary <TemplateType, ExportTemplate>();
 }