コード例 #1
0
 public AuthMvcController(IUserReposytory repo, IAppDataReposytory appDataRepo,
                          ISessionHelper sessionHelper)
 {
     _userReposytory = repo;
     _appDataReposytory = appDataRepo;
     _sessionHelper = sessionHelper;
 }
コード例 #2
0
ファイル: CPUController.cs プロジェクト: Trigun27/rsoi_lab2
 public CpuController(ICpuRepository cpuRepository, IManRepository manRepository,
                      ISessionHelper sessionHelper)
 {
     _cpuRepository = cpuRepository;
     _manRepository = manRepository;
     _sessionHelper = sessionHelper;
 }
コード例 #3
0
ファイル: UserController.cs プロジェクト: nogalskisam/Fyl
 public UserController(ITenantService tenantService, ISessionDetails session, ISessionHelper sessionHelper, IHttpContextHelper httpContextHelper)
 {
     _session = session;
     _sessionHelper = sessionHelper;
     _httpContextHelper = httpContextHelper;
     _tenantService = tenantService;
 }
コード例 #4
0
ファイル: UserController.cs プロジェクト: nogalskisam/Fyl
 public UserController(ILandlordService landlordService, ISessionDetails session, ISessionHelper sessionHelper, IHttpContextHelper httpContextHelper)
 {
     _session = session;
     _sessionHelper = sessionHelper;
     _httpContextHelper = httpContextHelper;
     _landlordService = landlordService;
 }
コード例 #5
0
ファイル: ManController.cs プロジェクト: Trigun27/rsoi_lab2
 public ManController(IManRepository repo, ICpuRepository cpuRepo,
                      ISessionHelper sessionHelper)
 {
     _manRepository = repo;
     _cpuRepository = cpuRepo;
     _sessionHelper = sessionHelper;
 }
コード例 #6
0
ファイル: AuthenHelper.cs プロジェクト: huutoannht/mart
 public AuthenHelper(ISessionHelper sessionHelper, ICryptoHelper cryptoHelper, IServiceHelper serviceHelper, ICacheHelper cacheHelper)
 {
     _httpContext = HttpContext.Current;
     _sessionHelper = sessionHelper;
     _cryptoHelper = cryptoHelper;
     _serviceHelper = serviceHelper;
     _cacheHelper = cacheHelper;
 }
コード例 #7
0
 public TournamentRegistrationController(IPlayerRegistrationMatchingHelper playerRegMetchHelper, ITournamentRegistrationHelper tournamentRegHelper,
     IMatchedPlayersModelBuilder matchedPlayerModelBuilder, ITournamentRegistrationDbHelper tournamentRegDbHelper, ISessionHelper sessionHelper,
     IRankingHelper rankingHelper, IBaseDbHelper dbHelper)
 {
     _playerRegMatchHelper = playerRegMetchHelper;
     _tournamentRegHelper = tournamentRegHelper;
     _matchedPlayerModelBuilder = matchedPlayerModelBuilder;
     _tournamentRegDbHelper = tournamentRegDbHelper;
     _dbHelper = dbHelper;
     _sessionHelper = sessionHelper;
     _rankingHelper = rankingHelper;
 }
コード例 #8
0
        static void Main(string[] args)
        {
            _sessionHelper = new InMemorySessionHelper();

            object templateId;

            using (var session = _sessionHelper.OpenSession())
            {
                using (var transaction = session.BeginTransaction())
                {
                    var companyId = session.Save(new Company("Company"));

                    var template = new Template
                    {
                        Name    = "Template",
                        Company = session.Load <Company>(companyId)
                    };
                    template.AddField(new Field("FieldOne"));
                    template.AddField(new Field("FieldTwo"));

                    templateId = session.Save(template);

                    transaction.Commit();
                }
            }

            using (var session = _sessionHelper.OpenSession())
            {
                var template = session
                               .QueryOver <Template>()
                               .Fetch(x => x.Company).Eager
                               .Fetch(x => x.Fields).Eager
                               .Where(x => x.Id == (Guid)templateId)
                               .SingleOrDefault();

                Console.WriteLine($"Name: {template.Name}");
                Console.WriteLine($"Company: {template.Company.Name}");
                Console.WriteLine($"Fields: {string.Join(", ", template.Fields.Select(f => f.Name))}");
            }
        }
コード例 #9
0
 public PageService(
     IEnumerable <IElementValidator> validators,
     IPageHelper pageHelper,
     ISessionHelper sessionHelper,
     IAddressService addressService,
     IFileUploadService fileUploadService,
     IStreetService streetService,
     IOrganisationService organisationService,
     IDistributedCacheWrapper distributedCache,
     IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration,
     IWebHostEnvironment environment,
     ISuccessPageFactory successPageFactory,
     IPageFactory pageFactory,
     IBookingService bookingService,
     ISchemaFactory schemaFactory,
     IMappingService mappingService,
     IPayService payService,
     IIncomingDataHelper incomingDataHelper,
     IActionsWorkflow actionsWorkflow)
 {
     _validators                = validators;
     _pageHelper                = pageHelper;
     _sessionHelper             = sessionHelper;
     _streetService             = streetService;
     _addressService            = addressService;
     _bookingService            = bookingService;
     _organisationService       = organisationService;
     _fileUploadService         = fileUploadService;
     _distributedCache          = distributedCache;
     _schemaFactory             = schemaFactory;
     _successPageContentFactory = successPageFactory;
     _pageContentFactory        = pageFactory;
     _environment               = environment;
     _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value;
     _payService         = payService;
     _mappingService     = mappingService;
     _incomingDataHelper = incomingDataHelper;
     _actionsWorkflow    = actionsWorkflow;
 }
コード例 #10
0
 public AdminController(IRoleService roleService,
                        IUserService userService,
                        ICategoryService categoryService,
                        IBlogService blogService,
                        IMediaService mediaService,
                        ISettingsService settingsService,
                        IWidgetService widgetService,
                        ISessionHelper sessionHelper,
                        ICacheHelper cacheHelper,
                        IMapper mapper)
 {
     _roleService     = roleService;
     _userService     = userService;
     _categoryService = categoryService;
     _blogService     = blogService;
     _mediaService    = mediaService;
     _settingsService = settingsService;
     _widgetService   = widgetService;
     _sessionHelper   = sessionHelper;
     _cacheHelper     = cacheHelper;
     _mapper          = mapper;
 }
コード例 #11
0
 public AccountController(
     UserManager <GLAAUser> userManager,
     SignInManager <GLAAUser> signInManager,
     RoleManager <GLAARole> roleManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     ILicenceApplicationPostDataHandler licencePostDataHandler,
     ILicenceApplicationViewModelBuilder licenceApplicationViewModelBuilder,
     ISessionHelper session,
     IEmailService emailService,
     IConfiguration configuration)
 {
     _userManager                            = userManager;
     _signInManager                          = signInManager;
     _emailSender                            = emailSender;
     _roleManager                            = roleManager;
     _logger                                 = logger;
     this.emailService                       = emailService;
     this.licencePostDataHandler             = licencePostDataHandler;
     this.licenceApplicationViewModelBuilder = licenceApplicationViewModelBuilder;
     this.session                            = session;
     this.configuration                      = configuration;
 }
コード例 #12
0
 public RestrictCombinedFileSizeValidator(ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache)
 {
     _sessionHelper    = sessionHelper;
     _distributedCache = distributedCache;
 }
コード例 #13
0
 public BaseHttpService(IConfiguration configuration, HttpClient httpClient, ISessionHelper sessionHelper)
 {
     _configuration = configuration;
     _httpClient    = httpClient;
     _sessionHelper = sessionHelper;
 }
コード例 #14
0
 public LoginViewModel(ISessionHelper sessionHelper, IEventAggregator events)
 {
     _sessionHelper = sessionHelper;
     _events        = events;
 }
コード例 #15
0
ファイル: Store.cs プロジェクト: darkpchela/CourseProject
 public Store(ICollectionsManager collectionsManager, IItemsManager itemsManager, IItemsCrudService itemsCrudService, ICollectionsCrudService collectionsCrudService, ISessionHelper sessionHelper, IMapper mapper)
 {
     this.collectionsManager     = collectionsManager;
     this.itemsManager           = itemsManager;
     this.itemsCrudService       = itemsCrudService;
     this.collectionsCrudService = collectionsCrudService;
     this.sessionHelper          = sessionHelper;
     this.mapper = mapper;
 }
コード例 #16
0
        /// <summary>
        /// Login application user.
        /// </summary>
        /// <param name="stubbedSwedishUserContext">
        /// The stubbed swedish user context, if required.
        /// </param>
        protected void LoginApplicationUser(IUserContext stubbedSwedishApplicationUserContext, IUserContext stubbedApplicationUserContext)
        {
            // Set session helper for handling HttpContext data.
            HttpContext contextBase = GetShimHttpContext();

            sessionHelper = new HttpContextSessionHelper(contextBase);


            // Login application user
            try
            {
                CoreData.UserManager.LoginApplicationUser();
            }
            catch (TimeoutException)
            {
                // Try Once more if service is turned off...
                Thread.Sleep(20000);
                CoreData.UserManager.LoginApplicationUser();
            }

            //if (stubbedApplicationUserContext.IsNotNull() && stubbedSwedishApplicationUserContext.IsNotNull())
            //{
            //    // Set session settings.
            //    SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey, stubbedApplicationUserContext);
            //    SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.EnglishLocale, stubbedApplicationUserContext);
            //    SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.SwedishLocale, stubbedSwedishApplicationUserContext);
            //    SessionHelper.SetInSession(DyntaxaTestSettings.Default.LanguageContextString, DyntaxaTestSettings.Default.EnglishLocale);
            //    SessionHelper.SetInSession(DyntaxaTestSettings.Default.LanguageContextIdString, DyntaxaTestSettings.Default.EnglishLocaleId);

            //}
            // Get cash settings.
            //applicationUserContext = CacheHelper.GetFromCache<IUserContext>(DyntaxaSettings.Default.ApplicationContextCacheKey);
            //IUserContext applicationUserContextEN = CacheHelper.GetFromCache<IUserContext>(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.EnglishLocale);
            //IUserContext applicationUserContextSV = CacheHelper.GetFromCache<IUserContext>(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.SwedishLocale);

            // If we use stubbed object we have to set application context for swedish also, if we use login to DB this is not needed.
            if (applicationUserContextSV.IsNull() && stubbedSwedishApplicationUserContext != null)
            {
                applicationUserContextSV = stubbedSwedishApplicationUserContext;
            }
            else if (stubbedSwedishApplicationUserContext == null)
            {
                applicationUserContextSV = CoreData.UserManager.GetApplicationContext("sv-SE");
                applicationUserContext   = CoreData.UserManager.GetApplicationContext();
            }

            // Set session settings.
            //SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey, applicationUserContext);
            //SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.EnglishLocale, applicationUserContextEN);
            //SessionHelper.SetInSession(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.SwedishLocale, applicationUserContextSV);
            //CacheHelper.SetInCache(DyntaxaSettings.Default.ApplicationContextCacheKey + DyntaxaTestSettings.Default.SwedishLocale, applicationUserContextSV);

            //// Set Session start parameters that will be set in Global.asax.cs-Session_Start(object sender, EventArgs e)
            //SessionHelper.SetInSession(DyntaxaTestSettings.Default.LanguageContextString, SpeciesIdentificationTestSettings.Default.EnglishLocale);

            //// Set language that will be set in Global.asax.cs-Application_BeginRequest(object sender, EventArgs e)
            //Thread.CurrentThread.CurrentUICulture = new CultureInfo(SessionHelper.GetFromSession<string>(SpeciesIdentificationTestSettings.Default.LanguageContextString));
            //Thread.CurrentThread.CurrentCulture = new CultureInfo(SessionHelper.GetFromSession<string>(SpeciesIdentificationTestSettings.Default.LanguageContextString));

            // Set Session start parameters that will be set in Global.asax.cs-Session_Start(object sender, EventArgs e)
            //SessionHelper.SetInSession(DyntaxaTestSettings.Default.LanguageContextString, DyntaxaTestSettings.Default.EnglishLocale);

            // Set language that will be set in Global.asax.cs-Application_BeginRequest(object sender, EventArgs e)
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(DyntaxaTestSettings.Default.EnglishLocale);
            Thread.CurrentThread.CurrentCulture   = new CultureInfo(DyntaxaTestSettings.Default.EnglishLocale);
            SessionTaxonId = TaxonIdTuple.Create(100047.ToString(), 100047);
        }
コード例 #17
0
 public UserController(ISessionHelper sessionHelper)
 {
     _sessionHelper = sessionHelper;
 }
コード例 #18
0
 public MultipleFileUploadElementValidator(ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache)
 {
     _sessionHelper    = sessionHelper;
     _distributedCache = distributedCache;
 }
コード例 #19
0
ファイル: AccountController.cs プロジェクト: simhaonline/CPM
 public AccountController(ISessionHelper sessionHelper, IAccountService accountService, IHasher hasher)
 {
     _sessionHelper  = sessionHelper;
     _accountService = accountService;
     _hasher         = hasher;
 }
コード例 #20
0
 public PaymentWorkflow(IPayService payService, ISubmitService submitService, IMappingService mappingService, ISessionHelper sessionHelper)
 {
     _submitService  = submitService;
     _mappingService = mappingService;
     _sessionHelper  = sessionHelper;
     _payService     = payService;
 }
コード例 #21
0
 public BoatModel(IHttpClientFactory clientFactory, ISessionHelper sessionHelper)
 {
     this.clientFactory = clientFactory;
     this.sessionHelper = sessionHelper;
     Boats = new List <Boat>();
 }
コード例 #22
0
ファイル: BenchSuite.cs プロジェクト: gobixm/learn
 public BenchSuite(ISessionHelper sessionHelper, ISessionFactoryBuilder sessionFactoryBuilder)
 {
     _sessionHelper = sessionHelper;
     _sessionFactoryBuilder = sessionFactoryBuilder;
 }
コード例 #23
0
 public GenericRepository(ISessionHelper sessionHelper)
 {
     this.sessionHelper = sessionHelper;
 }
コード例 #24
0
 public DefaultDocumentService(IDocumentRepository documentRepository, ISessionHelper sessionHelper)
 {
     _documentRepository = documentRepository;
     _sessionHelper      = sessionHelper;
 }
コード例 #25
0
ファイル: ItemHub.cs プロジェクト: darkpchela/CourseProject
 public ItemHub(ILikesManager likesManager, ICommentsManager commentsManager, ISessionHelper sessionHelper) : base()
 {
     this.likesManager    = likesManager;
     this.commentsManager = commentsManager;
     this.sessionHelper   = sessionHelper;
 }
コード例 #26
0
ファイル: CartController.cs プロジェクト: 42ama/Boorger-Shop
 public CartController(BoorgerdbContext context, [FromServices] ISessionHelper sessionHelper)
 {
     db = context;
     this.sessionHelper = sessionHelper;
 }
コード例 #27
0
 public ManController(ISessionHelper sessionHelper)
 {
     _sessionHelper = sessionHelper;
 }
コード例 #28
0
 public SubmitWorkflow(ISubmitService submitService, IMappingService mappingService, ISessionHelper sessionHelper)
 {
     _submitService  = submitService;
     _mappingService = mappingService;
     _sessionHelper  = sessionHelper;
 }
コード例 #29
0
 public Preview(IOffersService offersService, ISessionHelper sessionHelper)
 {
     this.offersService = offersService;
     _sessionHelper     = sessionHelper;
 }
コード例 #30
0
 public FormAnswersProvider(ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache)
 {
     _sessionHelper    = sessionHelper;
     _distributedCache = distributedCache;
 }
 // Called by test
 public TaxonNameController(IUserDataSource userDataSourceRepository, ITaxonDataSource taxonDataSourceRepository, ISessionHelper session)
     : base(userDataSourceRepository, taxonDataSourceRepository, session)
 {
     _taxonNameViewManager = new TaxonNameViewManager(CoreData.UserManager.GetCurrentUser());
 }
コード例 #32
0
ファイル: UserController.cs プロジェクト: Trigun27/rsoi_lab2
 public UserController(IUserReposytory userRepo, ISessionHelper sessionHelper)
 {
     _userReposytory = userRepo;
     _sessionHelper = sessionHelper;
 }
コード例 #33
0
 public PublicRegisterController(IPublicRegisterViewModelBuilder publicRegisterViewModelBuilder, ISessionHelper sessionHelper)
 {
     this.publicRegisterViewModelBuilder = publicRegisterViewModelBuilder;
     SessionHelper = sessionHelper;
 }
コード例 #34
0
ファイル: Question.cshtml.cs プロジェクト: amoraitis/trying
 public QuestionModel(ISessionHelper sessionHelper)
 {
     this.sessionHelper = sessionHelper;
 }
コード例 #35
0
 public AccountController(Context context, IUserHelper userHelper = null, ISessionHelper sessionHelper = null)
     : base(context, userHelper, sessionHelper)
 {
 }
コード例 #36
0
 public TwitterController(ITwitterIntegration twitterIntegration, ISessionHelper sessionHelper)
 {
     _twitterIntegration = twitterIntegration;
     _sessionHelper      = sessionHelper;
 }
コード例 #37
0
 public LoginModel(IHttpClientFactory clientFactory, ISessionHelper sessionHelper)
 {
     this.clientFactory = clientFactory;
     this.sessionHelper = sessionHelper;
 }
コード例 #38
0
 public SkillController(Context context, IUserHelper userHelper = null, ISessionHelper sessionHelper = null)
     : base(context, null, null)
 {
 }
コード例 #39
0
 public AuthMvcController(ISessionHelper sessionHelper)
 {
    _sessionHelper = sessionHelper;
 }
コード例 #40
0
 public LoginController(IUserManager userManager, ISessionHelper sessionHelper)
 {
     _usermanager   = userManager;
     _sessionHelper = sessionHelper;
 }
コード例 #41
0
 public ProductsController(BoorgerdbContext context, IHostingEnvironment appEnvironment, [FromServices] ILogProvider logger, [FromServices] ISessionHelper sessionHelper)
 {
     db = context;
     this.appEnvironment = appEnvironment;
     this.sessionHelper  = sessionHelper;
     this.logger         = logger;
     logger.Setup(db);
 }
コード例 #42
0
 public ServicesFactory(ISessionHelper sessionHelper)
 {
     _sessionHelper = sessionHelper;
 }