Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultClientPermissionsService" /> class.
        /// </summary>
        /// <param name="permissionsStore">The permissions store.</param>
        /// <param name="clientStore">The client store.</param>
        /// <param name="scopeStore">The scope store.</param>
        /// <param name="localizationService">The localization service.</param>
        /// <exception cref="System.ArgumentNullException">permissionsStore
        /// or
        /// clientStore
        /// or
        /// scopeStore</exception>
        public DefaultClientPermissionsService(
            IPermissionsStore permissionsStore,
            IClientStore clientStore,
            IScopeStore scopeStore,
            ILocalizationService localizationService)
        {
            if (permissionsStore == null)
            {
                throw new ArgumentNullException("permissionsStore");
            }
            if (clientStore == null)
            {
                throw new ArgumentNullException("clientStore");
            }
            if (scopeStore == null)
            {
                throw new ArgumentNullException("scopeStore");
            }
            if (localizationService == null)
            {
                throw new ArgumentNullException("localizationService");
            }

            this.permissionsStore    = permissionsStore;
            this.clientStore         = clientStore;
            this.scopeStore          = scopeStore;
            this.localizationService = localizationService;
        }
Esempio n. 2
0
 public IServiceProviderMock()
 {
     _permissionsStore    = PermissionStoreFactoryMock.GetPermissionStore(ConfigFilePath);
     _serviceProvider     = new Mock <IServiceProvider>();
     _serviceScope        = new Mock <IServiceScope>();
     _serviceScopeFactory = new Mock <IServiceScopeFactory>();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultClientPermissionsService"/> class.
        /// </summary>
        /// <param name="permissionsStore">The permissions store.</param>
        /// <param name="clientStore">The client store.</param>
        /// <param name="scopeStore">The scope store.</param>
        /// <exception cref="System.ArgumentNullException">
        /// permissionsStore
        /// or
        /// clientStore
        /// or
        /// scopeStore
        /// </exception>
        public DefaultClientPermissionsService(
            IPermissionsStore permissionsStore, 
            IClientStore clientStore, 
            IScopeStore scopeStore)
        {
            if (permissionsStore == null) throw new ArgumentNullException("permissionsStore");
            if (clientStore == null) throw new ArgumentNullException("clientStore");
            if (scopeStore == null) throw new ArgumentNullException("scopeStore");

            this.permissionsStore = permissionsStore;
            this.clientStore = clientStore;
            this.scopeStore = scopeStore;
        }
Esempio n. 4
0
 public GraphExplorerPermissionsController(IPermissionsStore permissionsStore)
 {
     _permissionsStore = permissionsStore;
 }
 public PermissionsStoreShould()
 {
     _permissionsStore = PermissionStoreFactoryMock.GetPermissionStore(ConfigFilePath);
 }