예제 #1
0
 public GameController(
     IPlatformsFactory platformsFactory,
     ICutPartsFactory cutPartsFactory,
     IPlatfromPlacerService platfromPlacerService,
     CommonSettingsModel commonSettingsModel,
     IPlatformCutterService platformCutterService,
     SignalBus signalBus)
 {
     this.platformsFactory      = platformsFactory;
     this.cutPartsFactory       = cutPartsFactory;
     this.commonSettingsModel   = commonSettingsModel;
     this.platfromPlacerService = platfromPlacerService;
     this.platformCutterService = platformCutterService;
     this.signalBus             = signalBus;
 }
예제 #2
0
        protected Task <CommonSettingsModel> PrepareCommonSettingsModel()
        {
            var tenantId       = _tenantContext.ActiveTenantScopeConfiguration;
            var commonSettings = _settingService.LoadSetting <CommonSettings>(tenantId);

            var model = new CommonSettingsModel
            {
                LogoPictureId          = commonSettings.LogoPictureId,
                UseResponseCompression = commonSettings.UseResponseCompression,
            };

            if (tenantId <= 0)
            {
                return(Task.FromResult(model));
            }

            //fill in overridden values
            model.LogoPictureId_OverrideForTenant          = _settingService.SettingExists(commonSettings, x => x.LogoPictureId, tenantId);
            model.UseResponseCompression_OverrideForTenant = _settingService.SettingExists(commonSettings, x => x.UseResponseCompression, tenantId);

            return(Task.FromResult(model));
        }
예제 #3
0
 public CutPartsFactory(CommonSettingsModel commonSettingsModel,
                        CommonPrefabsModel commonPrefabsModel)
 {
     this.commonSettingsModel = commonSettingsModel;
     this.commonPrefabsModel  = commonPrefabsModel;
 }