示例#1
0
 public virtual UserStore InitializeUserStore()
 {
     var usersDataProvider = InitializeUsersDataProvider();
     var userStore = new UserStore(usersDataProvider)
     {
         LocalAdministratorApiKey = GetAppSetting("localAdministratorApiKey", string.Empty),
         HandleLocalRequestsAsAdmin = HandleLocalRequestsAsAdmin
     };
     userStore.Initialize();
     return userStore;
 }
 protected virtual IUserStore InitializeUserStore(INuGetWebApiSettings settings)
 {
     var usersDataProvider = InitializeUsersDataProvider(settings);
     var userStore = new UserStore(usersDataProvider)
     {
         LocalAdministratorApiKey = settings.LocalAdministratorApiKey,
         HandleLocalRequestsAsAdmin = settings.HandleLocalRequestsAsAdmin
     };
     userStore.Initialize();
     return userStore;
 }