public ApplicationsModule(IApplicationStore store, IApplicationFactory factory) : base("/applications") { this.RequiresAuthentication(); Get["/create"] = parameters => { return View["create"]; }; Post["/create"] = parameters => { var model = this.Bind<ApplicationModel>(); var application = factory.Create(model); store.Add(application); return Response.AsRedirect("~/applications/display/" + application.Id.ToString()); }; Get["/display/{id}"] = parameters => { return View["display", store.First(x => x.Id.ToString().Equals(parameters.id))]; }; Get["/list"] = parameters => { return View["list", store]; }; }
public AddBreweryPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) : base(navigationService, applicationStore, deviceService) { Title = Resources.AddBreweryPageTitle; SaveCommand = new DelegateCommand(OnSaveCommandExecuted); }
public ApplicationPartByIdDataLoader( IApplicationStore applicationStore, IBatchScheduler batchScheduler) : base(batchScheduler) { _applicationStore = applicationStore; }
/// <summary> /// Creates a new <see cref="OAuthRequestContextValidator"/>. /// </summary> /// <param name="appStore">The <see cref="IApplicationStore"/> to get registered applications.</param> /// <param name="scopeStore">The <see cref="IResourceAccessDelegateScopeStore"/> is get resource access delegate scope.</param> /// <param name="oauthGrantStore">The <see cref="IOAuthGrantStore"/> to get currently effective authorization code, access token and refresh token.</param> /// <param name="systemClock">The <see cref="ISystemClock"/> to provide standard time.</param> /// <exception cref="ArgumentNullException">Specified <paramref name="appStore"/> is null.</exception> /// <exception cref="ArgumentNullException">Specified <paramref name="scopeStore"/> is null.</exception> /// <exception cref="ArgumentNullException">Specified <paramref name="oauthGrantStore"/> is null.</exception> /// <exception cref="ArgumentNullException">Specified <paramref name="systemClock"/> is null.</exception> public OAuthContextValidator(IApplicationStore appStore, IDelegateScopeStore scopeStore, IOAuthGrantStore oauthGrantStore, ISystemClock systemClock) { ApplicationStore = Guard.ArgumentNotNull(appStore, nameof(appStore)); ScopeStore = Guard.ArgumentNotNull(scopeStore, nameof(scopeStore)); OAuthGrantStore = Guard.ArgumentNotNull(oauthGrantStore, nameof(oauthGrantStore)); SystemClock = Guard.ArgumentNotNull(systemClock, nameof(systemClock)); }
public ViewModelBase(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) { _applicationStore = applicationStore; _deviceService = deviceService; _navigationService = navigationService; }
public ApplicationsModule(IApplicationStore store, IApplicationFactory factory) : base("/applications") { this.RequiresAuthentication(); Get["/create"] = parameters => { return(View["create"]); }; Post["/create"] = parameters => { var model = this.Bind <ApplicationModel>(); var application = factory.Create(model); store.Add(application); return(Response.AsRedirect("~/applications/display/" + application.Id.ToString())); }; Get["/display/{id}"] = parameters => { return(View["display", store.First(x => x.Id.ToString().Equals(parameters.id))]); }; Get["/list"] = parameters => { return(View["list", store]); }; }
public BreweryBeersPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) : base(navigationService, applicationStore, deviceService) { Title = Resources.BreweryBeersPageTitle; Beers = new ObservableRangeCollection <Beer>(); BeerSelectedCommand = new DelegateCommand <Beer>(OnBeerSelectedCommandExecuted); }
public static bool IsDataLoaded(this IApplicationStore applicationStore) { if (applicationStore.Properties.TryGetValue(ApplicationStoreKeys.LOADED_DATA, out object result)) { return(Convert.ToBoolean(result)); } return(false); }
public ApiKeyAuthenticationHandler( IOptionsMonitor <ApiKeyAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IApplicationStore applicationStore) : base(options, logger, encoder, clock) { _applicationStore = applicationStore; }
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationStore appStore) { app .UseDeveloperExceptionPage() .UseAuthentication() .UseOAuthServer() .UseMvc(); //appStore.CreateAsync(new Application("foobarapp", "Foobar", "123-456-789", new Uri[] { new Uri("http://localhost:3721") }, ClientType.Confidential, "foobar")).Wait(); }
public TodoItemDetailViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IAppDataContext dataContext) : base(navigationService, applicationStore, deviceService) { _dataContext = dataContext; Title = Resources.TodoItemDetailTitle; SaveCommand = new DelegateCommand(OnSaveCommandExecuted); }
public BreweriesPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) : base(navigationService, applicationStore, deviceService) { _realm = Realm.GetInstance(Helpers.AppConstants.RealmConfiguration); Title = Resources.BreweriesPageTitle; Breweries = new ObservableRangeCollection <Brewer>(); BrewerySelectedCommand = new DelegateCommand <Brewer>(OnBrewerySelectedCommandExecuted); }
public MenuPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IAppDataContext context) : base(navigationService, applicationStore, deviceService) { _context = context; Title = Resources.MainPageTitle; Rooms = new ObservableRangeCollection <ChatRoom>(); RoomTappedCommand = new DelegateCommand <ChatRoom>(OnRoomTappedCommandExecuted); AddRoomCommand = new DelegateCommand(OnAddRoomCommandExecuted); }
public MainPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IPageDialogService pageDialogService, ILoggerFacade logger) : base(navigationService, applicationStore, deviceService) { _pageDialogService = pageDialogService; _logger = logger; Title = Resources.MainPageTitle; NavigateCommand = new DelegateCommand <string>(OnNavigateCommandExecuted); }
public ApplicationService( ILogger <ApplicationService> log, IOptions <ShipbotConfiguration> configuration, IApplicationStore applicationStore ) { _log = log; _configuration = configuration; _applicationStore = applicationStore; }
public MapPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) : base(navigationService, applicationStore, deviceService) { Title = "地图"; IsActiveChanged += HandleIsActiveTrue; IsActiveChanged += HandleIsActiveFalse; }
public async Task <ApplicationPart?> GetApplicationPartAsync( [Service] IApplicationStore store, [Parent] ApplicationPartComponent partComponent, CancellationToken cancellationToken) { Application?application = await store.GetByComponentPartIdAsync(partComponent.Id, cancellationToken); return(application?.Parts .FirstOrDefault(x => x.Components.Any(y => y.Id == partComponent.Id))); }
public ChatPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IAppDataContext context) : base(navigationService, applicationStore, deviceService) { _context = context; Messages = new ObservableRangeCollection <ChatMessage>(); RefreshCommand = new DelegateCommand(OnRefreshCommandExecuted, () => IsNotBusy).ObservesProperty(() => IsNotBusy); AddMessageCommand = new DelegateCommand(OnAddMessageCommandExecuted); AddMessageCompositeCommand = new CompositeCommand(); AddMessageCompositeCommand.RegisterCommand(AddMessageCommand); AddMessageCompositeCommand.RegisterCommand(RefreshCommand); }
public LoginPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IAppDataContext context, IPageDialogService pageDialogService) : base(navigationService, applicationStore, deviceService) { Title = "Login Page"; _context = context; _pageDialogService = pageDialogService; Model = new User() { Email = Settings.Current.EmailAddress ?? string.Empty, DisplayName = Settings.Current.DisplayName ?? string.Empty }; LoginCommand = new DelegateCommand(OnLoginCommandExecuted); }
public MainPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService, IAppDataContext dataContext, ICloudService cloudService) : base(navigationService, applicationStore, deviceService) { _cloudService = cloudService; _dataContext = dataContext; Title = Resources.MainPageTitle; TodoItems = new ObservableRangeCollection <TodoItem>(); AddItemCommand = new DelegateCommand(OnAddItemCommandExecuted); DeleteItemCommand = new DelegateCommand <TodoItem>(OnDeleteItemCommandExecuted); TodoItemTappedCommand = new DelegateCommand <TodoItem>(OnTodoItemTappedCommandExecuted); }
public ApplicationManager( IOptions <ApplicationOptions> options, IApplicationStore <TApplication> store, IPasswordHasher <TApplication> passwordHasher, IEnumerable <IApplicationValidator <TApplication> > applicationValidators, ILogger <ApplicationManager <TApplication> > logger, ApplicationErrorDescriber errorDescriber) { Options = options.Value; Store = store; PasswordHasher = passwordHasher; ApplicationValidators = applicationValidators; ErrorDescriber = errorDescriber; Logger = Logger; }
public ApplicationManager( IApplicationStore <TApplication> applicationStore, IEnumerable <IApplicationValidator <TApplication, TUser, TKey> > applicationValidators, IOptions <IdentityOptionsExtended> optionsAccessor, ILookupNormalizer keyNormalizer, IServiceProvider serviceProvider, ILogger <ApplicationManager <TApplication, TUser, TKey> > logger) { _applicationStore = applicationStore; _serviceProvider = serviceProvider; Logger = logger; Options = optionsAccessor?.Value ?? new IdentityOptionsExtended(); KeyNormalizer = keyNormalizer; ApplicationValidators = applicationValidators?.ToList() ?? Enumerable.Empty <IApplicationValidator <TApplication, TUser, TKey> >().ToList(); }
public ApplicationService( IApplicationStore appStore, IChangeLogService changeLogService, IApplicationPartDataLoader applicationPartByIdDataLoader, IApplicationPartComponentDataLoader applicationPartComponentByIdDataloader, IComponentStore compStore, IDataLoader <Guid, Component> componentById, ISchemaService schemaService) { _appStore = appStore; _changeLogService = changeLogService; _applicationPartByIdDataLoader = applicationPartByIdDataLoader; _applicationPartByIdDataloaderDataLoader = applicationPartComponentByIdDataloader; _compStore = compStore; _schemaService = schemaService; _componentById = componentById; }
public ApiKeyValidator(IApplicationStore applicationStore) { _applicationStore = applicationStore; }
public JwtOTPGrantValidator(IApplicationStore store) { this.mApplicationStore = store; }
public DefaultAuthorizationEndPointService(IApplicationStore applicationStore, IAuthorizationTokenStore authorizationTokenStore) { this.applicationStore = applicationStore; this.authorizationTokenStore = authorizationTokenStore; }
public ApplicationManager(IApplicationStore store, IApplicationEventQueries queries, IHttpContextAccessor httpContextAccessor) { Store = store ?? throw new ArgumentNullException(nameof(store)); Queries = queries; HttpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); }
public ApplicationController(IApplicationStore store) { _store = store ?? throw new ArgumentNullException(nameof(store)); }
public BeerPageViewModel(INavigationService navigationService, IApplicationStore applicationStore, IDeviceService deviceService) : base(navigationService, applicationStore, deviceService) { Title = Resources.BeerPageTitle; }
public ApiKeysQueryHandler(IApplicationStore applicationStore) { _applicationStore = applicationStore; }
public ApplicationController(IApplicationStore store) { mStore = store; }