private void CreateServiceHost(IEventService instance) { var guid = Guid.NewGuid(); host = new ServiceHost(instance, GetUri(guid)); host.AddServiceEndpoint( typeof(IEventService), GetBinding(), "EventService"); #if !NET35 var discoveryBehavior = new ServiceDiscoveryBehavior(); host.Description.Behaviors.Add(discoveryBehavior); host.AddServiceEndpoint(new UdpDiscoveryEndpoint()); discoveryBehavior.AnnouncementEndpoints.Add(new UdpAnnouncementEndpoint()); #else discoverer = new Discovery.ServiceDiscoverer(); StartDiscoverer(discoverer, guid); #endif host.Description.Behaviors.Add(new ServiceThrottlingBehavior { MaxConcurrentSessions = 1000 }); host.Description.Endpoints[0].Contract.Operations[0].Behaviors.Add(new EncryptionBehavior { EncryptionKey = encryptionKey }); host.Opened += (s, e) => IsStarted = true; host.Closed += (s, e) => IsStarted = false; }
public virtual void Start(IEventService instance) { if (host != null) throw new NotSupportedException("Service has already started."); CreateServiceHost(instance); host.Open(); }
public AuthorizeResponseGenerator(ILogger<AuthorizeResponseGenerator> logger, ITokenService tokenService, IAuthorizationCodeStore authorizationCodes, IEventService events) { _logger = logger; _tokenService = tokenService; _authorizationCodes = authorizationCodes; _events = events; }
/// <summary> /// 经纪人管理初始化 /// </summary> /// <param name="clientInfoService">clientInfoService</param> /// <param name="workContext">workContext</param> /// <param name="brokerService">brokerService</param> /// <param name="partnerlistService">partnerlistService</param> /// <param name="recommendagentService">recommendagentService</param> /// <param name="roleService">roleService</param> /// <param name="MessageService">MessageService</param> /// <param name="userService">userService</param> public BrokerInfoController(IClientInfoService clientInfoService, IWorkContext workContext, IBrokerService brokerService, IPartnerListService partnerlistService, IRecommendAgentService recommendagentService, IRoleService roleService, IMessageDetailService MessageService, IUserService userService, IBrokeAccountService brokerAccountService, IEventOrderService eventOrderService, IInviteCodeService inviteCodeService, ILevelService levelService, IAgentBillService agentBillService, IEventService eventService ) { _clientInfoService = clientInfoService; _workContext = workContext; _brokerService = brokerService; _partnerlistService = partnerlistService; _recommendagentService = recommendagentService; _roleService = roleService; _MessageService = MessageService; _userService = userService; _brokerAccountService = brokerAccountService; _eventOrderService = eventOrderService; _inviteCodeService = inviteCodeService; _levelService = levelService; _agentBillService = agentBillService; _eventService = eventService; }
public MyBlobsController() { this.permissionService = new PermissionService(this.Context); this.blobService = new BlobService(this.Context, CloudStorageAccount.Parse(ConfigReader.GetConfigValue("DataConnectionString")), ConfigReader.GetConfigValue("MainBlobContanier")); this.blobSetService = new BlobSetService(this.Context); this.eventService = new EventService(this.Context); }
public CommunityController(IMessageService messageService,ISecurityService securityService, IEventService eventService) : base(securityService) { _messageService = messageService; _securityService = securityService; _eventService = eventService; }
public EventResultHandler(IUserService userService, IEventService eventService, IFilterService filterService) { _userService = userService; _eventService = eventService; _filterService = filterService; }
public MyBlobsController(IPermissionService permissionService, IBlobService blobService, IBlobSetService blobSetService, IEventService eventService) { this.permissionService = permissionService; this.blobService = blobService; this.blobSetService = blobSetService; this.eventService = eventService; }
public EventController(ISecurityService securityService, IEventService eventService, IMessageService messageService) : base(securityService) { _securityService = securityService; _eventService = eventService; _messageService = messageService; }
public AccessTokenValidationController(TokenValidator validator, IdentityServerOptions options, ILocalizationService localizationService, IEventService events) { _validator = validator; _options = options; _localizationService = localizationService; _events = events; }
public EventsController(IUserProfileService profileService, IEventService eventService, IFacebookService facebookService, IMediaService mediaService) { _profileService = profileService; _eventService = eventService; _facebookService = facebookService; _mediaService = mediaService; }
public EventDetailsViewModel(ILocalStorageService localStorageService, INetworkConnectionService networkConnectionService, IMessageDialogService messageDialogService, IEventService eventService) { _localStorageService = localStorageService; _networkConnectionService = networkConnectionService; _messageDialogService = messageDialogService; _eventService = eventService; }
public EventController(IEventService eventService, IActivityService activityService, IUserService userService, IEmailService emailService) { this.eventService = eventService; this.activityService = activityService; this.userService = userService; this.emailService = emailService; }
public EventController(IOrchardServices services, IEventService eventService) { T = NullLocalizer.Instance; _eventService = eventService; _services = services; }
public AuthenticationController( OwinEnvironmentService owin, IViewService viewService, IUserService userService, IdentityServerOptions idSvrOptions, IClientStore clientStore, IEventService eventService, ILocalizationService localizationService, SessionCookie sessionCookie, MessageCookie<SignInMessage> signInMessageCookie, MessageCookie<SignOutMessage> signOutMessageCookie, LastUserNameCookie lastUsernameCookie, AntiForgeryToken antiForgeryToken) { this.context = new OwinContext(owin.Environment); this.viewService = viewService; this.userService = userService; this.options = idSvrOptions; this.clientStore = clientStore; this.eventService = eventService; this.localizationService = localizationService; this.sessionCookie = sessionCookie; this.signInMessageCookie = signInMessageCookie; this.signOutMessageCookie = signOutMessageCookie; this.lastUsernameCookie = lastUsernameCookie; this.antiForgeryToken = antiForgeryToken; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultTokenService" /> class. This overloaded constructor is deprecated and will be removed in 3.0.0. /// </summary> /// <param name="options">The options.</param> /// <param name="claimsProvider">The claims provider.</param> /// <param name="tokenHandles">The token handles.</param> /// <param name="signingService">The signing service.</param> /// <param name="events">The events service.</param> public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events) { _options = options; _claimsProvider = claimsProvider; _tokenHandles = tokenHandles; _signingService = signingService; _events = events; }
public ClientSecretValidator(IClientStore clients, IEnumerable<ISecretParser> parsers, IEnumerable<ISecretValidator> validators, OwinEnvironmentService environment, IEventService events) { _clients = clients; _parsers = parsers; _validators = validators; _environment = environment; _events = events; }
public override void Start(IEventService instance) { if (port < 1 || port > 65535) throw new ArgumentOutOfRangeException("port"); if (ipAddress == null) throw new ArgumentNullException("ipaddress"); base.Start(instance); }
/// <summary> /// Initializes a new instance of the <see cref="TokenEndpointController" /> class. /// </summary> /// <param name="options">The options.</param> /// <param name="requestValidator">The request validator.</param> /// <param name="clientValidator">The client validator.</param> /// <param name="generator">The generator.</param> /// <param name="events">The events service.</param> public TokenEndpointController(IdentityServerOptions options, TokenRequestValidator requestValidator, ClientSecretValidator clientValidator, TokenResponseGenerator generator, IEventService events) { _requestValidator = requestValidator; _clientValidator = clientValidator; _generator = generator; _options = options; _events = events; }
public EventServiceTests() { var settings = new Settings(); var eventRepository = new EventRepository(settings); _eventService = new EventService(eventRepository); Thread.CurrentPrincipal = new GenericPrincipal(UserIdentity.Anonymous, null); }
public ClientSecretValidator(IClientStore clients, SecretParser parser, SecretValidator validator, IEventService events, ILoggerFactory loggerFactory) { _clients = clients; _parser = parser; _validator = validator; _events = events; _logger = loggerFactory.CreateLogger<ClientSecretValidator>(); }
public EventController(IEventService eventService , IExcelService excelService , IGameService gameService) { _eventService = eventService; _excelService = excelService; _gameService = gameService; }
public CalendarService(IContentManager contentManager, ICategoryService categoryService, IEventService eventService) { _eventService = eventService; _categoryService = categoryService; _contentManager = contentManager; }
public EventController( IEventService eventService, ILocationService locationService ) { _eventService = eventService; _locationService = locationService; }
public ClientSecretValidator(IClientStore clients, SecretParser parser, SecretValidator validator, OwinEnvironmentService environment, IEventService events) { _clients = clients; _parser = parser; _validator = validator; _environment = environment; _events = events; }
public IntrospectionEndpoint(ScopeSecretValidator scopeSecretValidator, IIntrospectionRequestValidator requestValidator, IIntrospectionResponseGenerator generator, IEventService events, ILogger<IntrospectionEndpoint> logger) { _scopeSecretValidator = scopeSecretValidator; _requestValidator = requestValidator; _generator = generator; _events = events; _logger = logger; }
public ScopeSecretValidator(IScopeStore scopes, IEnumerable<ISecretParser> parsers, IEnumerable<ISecretValidator> validators, OwinEnvironmentService environment, IEventService events) { _scopes = scopes; _parsers = parsers; _validators = validators; _environment = environment; _events = events; }
public ScopeSecretValidator(IScopeStore scopes, SecretParser parsers, SecretValidator validator, IEventService events, ILogger<ScopeSecretValidator> logger) { _scopes = scopes; _parser = parsers; _validator = validator; _events = events; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="UserInfoEndpointController"/> class. /// </summary> /// <param name="options">The options.</param> /// <param name="tokenValidator">The token validator.</param> /// <param name="generator">The generator.</param> /// <param name="tokenUsageValidator">The token usage validator.</param> /// <param name="events">The event service</param> public UserInfoEndpointController(IdentityServerOptions options, TokenValidator tokenValidator, UserInfoResponseGenerator generator, BearerTokenUsageValidator tokenUsageValidator, IEventService events) { _tokenValidator = tokenValidator; _generator = generator; _options = options; _tokenUsageValidator = tokenUsageValidator; _events = events; }
public static void MyClassInitialize(TestContext testContext) { container = TestManager.ConfigureUnityContainer("unity"); UserService = container.Resolve<IUserService>(); EventService = container.Resolve<IEventService>(); GroupService = container.Resolve<IGroupService>(); }
public static async Task RaiseRefreshTokenIssuedEventAsync(this IEventService events, string id, RefreshToken token) { var evt = new Event <RefreshTokenDetails>( EventConstants.Categories.TokenService, "Refresh token issued", EventTypes.Information, EventConstants.Ids.RefreshTokenIssued); evt.DetailsFunc = () => new RefreshTokenDetails { HandleId = id, ClientId = token.ClientId, Scopes = token.Scopes, SubjectId = token.SubjectId, Lifetime = token.Lifetime, Version = token.Version }; await events.RaiseEventAsync(evt); }
public AccountController( CustomUserManager userManager, SignInManager <UserModel> signInManager, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, UrlEncoder urlEncoder, IConfiguration configuration ) { _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _urlEncoder = urlEncoder; _configuration = configuration; }
public AccountController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events //,TestUserStore users = null ) { // if the TestUserStore is not in DI, then we'll just use the global users collection // this is where you would plug in your own custom identity management library (e.g. ASP.NET Identity) //_users = users ?? new TestUserStore(TestUsers.Users); _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; }
public static async Task RaiseAuthorizationCodeIssuedEventAsync(this IEventService events, string id, AuthorizationCode code) { var evt = new Event <AuthorizationCodeDetails>( EventConstants.Categories.TokenService, "Authorization code issued", EventTypes.Information, EventConstants.Ids.AuthorizationCodeIssued); evt.DetailsFunc = () => new AuthorizationCodeDetails { HandleId = id, ClientId = code.ClientId, Scopes = code.Scopes, SubjectId = code.SubjectId, RedirectUri = code.RedirectUri, Lifetime = code.Client.AuthorizationCodeLifetime }; await events.RaiseEventAsync(evt); }
public static void RaiseLocalLoginSuccessEvent(this IEventService events, IDictionary <string, object> env, string username, SignInMessage signInMessage, AuthenticateResult authResult) { if (events == null) { throw new ArgumentNullException("events"); } var evt = new LocalAuthenticationEvent() { Id = EventConstants.Ids.SuccessfulLocalLogin, EventType = Events.EventType.Success, Message = Resources.Events.LocalLoginSuccess, SubjectId = authResult.User.GetSubjectId(), SignInMessage = signInMessage, LoginUserName = username }; evt.ApplyEnvironment(env); events.Raise(evt); }
public AccountController( IClientStore clientStore, IEventService eventService, IIdentityServerInteractionService interactionService, IEmailSender emailSender, IAuthenticationSchemeProvider schemeProvider, SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager, ILogger <AccountController> logger, IHttpContextAccessor httpContextAccessor) { _clientStore = clientStore; _eventService = eventService; _interactionService = interactionService; _schemeProvider = schemeProvider; _signInManager = signInManager; _userManager = userManager; _emailSender = emailSender; _logger = logger; }
public MainMessage HandleMessage(MainMessage msg) { EventDataMsg dataMsg = msg.EventMsg.EventDataMsg; if (dataMsg == null) { return(ISystemService.CreateErrorMessage(msg.MsgId, 0, 0, "Invalid msg type.")); } EventResponse response; if (msg.EventMsg.EventDataMsg.AppTypeCase != EventDataMsg.AppTypeOneofCase.None) { try { response = new EventResponse(); byte[] responseData = _api.Services.App.HandleEvent(msg); if (responseData != null) { response.Data = ByteString.CopyFrom(responseData); } } catch (EventErrorException e) { _log.Error(e); response = IEventService.CreateErrorResponse(msg.MsgId, 0, 0, e.Message); } } else { const string err_msg = "Main server does not handle events of this type."; _log.Error(err_msg); response = IEventService.CreateErrorResponse(msg.MsgId, 0, 0, err_msg); } response = _maskHandler.Handle(msg.ClientId, dataMsg, response); MainMessage responseMsg = new MainMessage(); responseMsg.EventMsg = new EventMsg(); responseMsg.EventMsg.EventResponse = response; return(responseMsg); }
private void Edit(EventDisplayModel eventDisplayModel, IEnumerable <ParticipantBaseModel> allParticipants) { EventManageViewModel viewModel = new EventManageViewModel(eventDisplayModel, allParticipants); EventManageControl control = new EventManageControl(viewModel); Window window = WindowFactory.CreateByContentsSize(control); viewModel.InfoViewModel.EventEdited += (s, e) => { EventEditModel eventEditModel = e.Event; EventEditDTO eventEditDTO = Mapper.Map <EventEditModel, EventEditDTO>(eventEditModel); using (IEventService service = factory.CreateEventService()) { ServiceMessage serviceMessage = service.Update(eventEditDTO); RaiseReceivedMessageEvent(serviceMessage); if (serviceMessage.IsSuccessful) { Notify(); } } }; viewModel.EventParticipantViewModel.EventEdited += (s, e) => { EventEditModel eventEditModel = e.Event; EventEditDTO eventEditDTO = Mapper.Map <EventEditModel, EventEditDTO>(eventEditModel); using (IEventService service = factory.CreateEventService()) { ServiceMessage serviceMessage = service.UpdateParticipants(eventEditDTO); RaiseReceivedMessageEvent(serviceMessage); if (serviceMessage.IsSuccessful) { Notify(); } } }; window.Show(); }
public ImportProcess(int millisecondsToSleep, IIntervalCalculator intervalCalculator, IHashingAlgorithm hashingAlgorithm, IApiEndPointService apiEndPointService, INewRelicService newRelicService, IRootObjectService rootObjectService, IEventService eventService) { _millisecondsToSleep = millisecondsToSleep; _intervalCalculator = intervalCalculator; _hashingAlgorithm = hashingAlgorithm; _newRelicService = newRelicService; _rootObjectService = rootObjectService; _eventService = eventService; _apiEndPointService = apiEndPointService; HistoricalEvents = _eventService.GetEvents()?.ToList(); HistoricalWorkLoad = new Stack <NewRelicHttpRequest>(); CurrentWorkLoad = new Stack <NewRelicHttpRequest>(); Console.WriteLine("ImportProcess created."); }
public PersonController(IRepository <Person> personRepository, IRepositoryWithTypedId <User, Guid> userRepository, IRepositoryWithTypedId <SeminarRole, string> seminarRoleRepository , IRepository <SeminarPerson> seminarPersonRepository, IRepository <Seminar> seminarRepository, IRepositoryWithTypedId <Agribusiness.Core.Domain.Membership, Guid> membershipRepository , IPictureService pictureService, IPersonService personService, IFirmService firmService, IRegistrationService registrationService , IvCardService vCardService, IEventService eventService, IRepositoryFactory repositoryFactory) { _personRepository = personRepository; _userRepository = userRepository; _seminarRoleRepository = seminarRoleRepository; _seminarPersonRepository = seminarPersonRepository; _seminarRepository = seminarRepository; _membershipRepository = membershipRepository; _pictureService = pictureService; _personService = personService; _firmService = firmService; _registrationService = registrationService; _vCardService = vCardService; _eventService = eventService; _repositoryFactory = repositoryFactory; _membershipService = new AccountMembershipService(); }
public static async Task RaiseExternalLoginSuccessEventAsync(this IEventService events, ExternalIdentity externalIdentity, string signInMessageId, SignInMessage signInMessage, AuthenticateResult authResult) { var evt = new Event <ExternalLoginDetails>( EventConstants.Categories.Authentication, Resources.Events.ExternalLoginSuccess, EventTypes.Success, EventConstants.Ids.ExternalLoginSuccess, new ExternalLoginDetails { SubjectId = authResult.HasSubject ? authResult.User.GetSubjectId() : null, Name = authResult.User.Identity.Name, SignInId = signInMessageId, SignInMessage = signInMessage, PartialLogin = authResult.IsPartialSignIn, Provider = externalIdentity.Provider, ProviderId = externalIdentity.ProviderId, }); await events.RaiseEventAsync(evt); }
public AccountController( SignInManager <UserIdentity> signInManager, IUserAppService userAppService, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, INotificationHandler <DomainNotification> notifications, IMediatorHandler bus, IConfiguration configuration) { Bus = bus; _signInManager = signInManager; _userAppService = userAppService; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _configuration = configuration; _notifications = (DomainNotificationHandler)notifications; }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager, IPersistedGrantService persistedGrantService, SignInManager <ApplicationUser> signInManager, ILoggerFactory loggerFactory, IIdentityServerInteractionService interaction, IClientStore clientStore, ILdapUserStore userStore, IEventService events) { _userManager = userManager; _roleManager = roleManager; _persistedGrantService = persistedGrantService; _signInManager = signInManager; _logger = loggerFactory.CreateLogger <AccountController>(); _interaction = interaction; _clientStore = clientStore; _userStore = userStore; _events = events; }
public AccountController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, UrlEncoder urlEncoder, IStringLocalizer <AccountController> localizer, IOptions <AccountOptions> options) { _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _urlEncoder = urlEncoder; _localizer = localizer; _options = options; }
protected AuthorizeEndpointBase( IEventService events, ILogger <AuthorizeEndpointBase> logger, IdentityServerOptions options, IAuthorizeRequestValidator validator, IAuthorizeInteractionResponseGenerator interactionGenerator, IAuthorizeResponseGenerator authorizeResponseGenerator, IUserSession userSession, IConsentMessageStore consentResponseStore, IAuthorizationParametersMessageStore authorizationParametersMessageStore = null) { _events = events; _options = options; Logger = logger; _validator = validator; _interactionGenerator = interactionGenerator; _authorizeResponseGenerator = authorizeResponseGenerator; UserSession = userSession; _consentResponseStore = consentResponseStore; _authorizationParametersMessageStore = authorizationParametersMessageStore; }
public AccountController( IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, UserManager <User> userManager, SignInManager <User> signInManager, IMapper mapper, IEmailSender emailSender) { // if the TestUserStore is not in DI, then we'll just use the global users collection // this is where you would plug in your own custom identity management library (e.g. ASP.NET Identity) _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _userManager = userManager; _signInManager = signInManager; _mapper = mapper; _emailSender = emailSender; }
public AccountController(IIdentityServerInteractionService interaction, ILdapUserStore <LdapUser> users, IEventService events, ILoginManager <LdapUser> login, IEmailService mail, IViewRenderService viewRenderService, SigningCredentials signingCredentials) { this._interaction = interaction; this._users = users; this._events = events; this._login = login; this._mail = mail; this._viewRenderService = viewRenderService; this._signingCredentials = signingCredentials; this._tokenValidationParameters = new TokenValidationParameters { ValidIssuer = "https://account.vcp.sh", ValidateAudience = false, IssuerSigningKey = this._signingCredentials.Key, ValidateIssuerSigningKey = true, ValidateIssuer = true, ValidateLifetime = true, ValidateTokenReplay = true }; }
public AuthingController( SignInManager <AppUser> SignInManager, UserManager <AppUser> userManager, IIdentityServerInteractionService interaction, IUserSession userSession, IStringLocalizer <AuthingController> localizer, IEventService events, UserDbContext _db, IEmailSender emailSender, UrlEncoder urlEncoder) { l = localizer; _userSession = userSession; _interaction = interaction; _SignInManager = SignInManager; _userManager = userManager; _events = events; db = _db; _emailSender = emailSender; _urlEncoder = urlEncoder; }
public ActivityController(IConfiguration configuration, ApplicationDbContext context, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <CustomController> logger, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, IHostingEnvironment env) : base( configuration, context, userManager, signInManager, logger, interaction, clientStore, schemeProvider, events, env) { }
public ResourceOwnerPasswordValidator( UserManager <User> userManager, IDeviceRepository deviceRepository, IDeviceService deviceService, IUserService userService, IEventService eventService, IOrganizationDuoWebTokenProvider organizationDuoWebTokenProvider, IOrganizationRepository organizationRepository, IOrganizationUserRepository organizationUserRepository, IApplicationCacheService applicationCacheService, IMailService mailService, ILogger <ResourceOwnerPasswordValidator> logger, CurrentContext currentContext, GlobalSettings globalSettings) : base(userManager, deviceRepository, deviceService, userService, eventService, organizationDuoWebTokenProvider, organizationRepository, organizationUserRepository, applicationCacheService, mailService, logger, currentContext, globalSettings) { _userManager = userManager; _userService = userService; }
public CipherService( ICipherRepository cipherRepository, IFolderRepository folderRepository, IUserRepository userRepository, IOrganizationRepository organizationRepository, IOrganizationUserRepository organizationUserRepository, ICollectionCipherRepository collectionCipherRepository, IPushNotificationService pushService, IAttachmentStorageService attachmentStorageService, IEventService eventService) { _cipherRepository = cipherRepository; _folderRepository = folderRepository; _userRepository = userRepository; _organizationRepository = organizationRepository; _organizationUserRepository = organizationUserRepository; _collectionCipherRepository = collectionCipherRepository; _pushService = pushService; _attachmentStorageService = attachmentStorageService; _eventService = eventService; }
public LocalWallpaperManager(ILogger logger, IThreadManager threadManager, IEventService eventService, WallpaperApiClient wallpaperApiClient) { _wallpaper = new Dictionary <Guid, LocalWallpaper>(); _cacheDirectory = new DirectoryInfo( Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Wallpaper", "ImageCache")); _logger = logger; _wallpaperApiClient = wallpaperApiClient; _downloaderQueue = new BlockingCollection <LocalWallpaper>(); _downloader = new WallpaperDownloader(logger, _downloaderQueue, _cacheDirectory, _wallpaperApiClient); threadManager.Start(_downloader); eventService.Register(this); }
public AccountController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, ApplicationDbContext dbContext, IEmailService emailService, ILogger <AccountController> logger) { _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _dbContext = dbContext; _emailService = emailService; _logger = logger; }
public AccountController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <AccountController> logger, //Added from Quickstart template IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; //Added from Quickstart template _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; }
public ApiResourceController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IIdentityServerInteractionService interaction, IClientStoreExtended clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, IEmailSender emailSender, ILogger <ApiResourceController> logger, IResourceStoreExtended resourceStore) { _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _logger = logger; _emailSender = emailSender; _resourceStoreExtended = resourceStore; }
public AccountController( LoveMirroringContext LMcontext, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, ILogger <AccountController> logger, IActionContextAccessor accessor) { _LMcontext = LMcontext; _userManager = userManager; _signInManager = signInManager; _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; _logger = logger; _accessor = accessor; }
public ViewPageViewModel() { _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _cipherService = ServiceContainer.Resolve <ICipherService>("cipherService"); _userService = ServiceContainer.Resolve <IUserService>("userService"); _totpService = ServiceContainer.Resolve <ITotpService>("totpService"); _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _auditService = ServiceContainer.Resolve <IAuditService>("auditService"); _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService"); _eventService = ServiceContainer.Resolve <IEventService>("eventService"); CopyCommand = new Command <string>((id) => CopyAsync(id, null)); CopyUriCommand = new Command <LoginUriView>(CopyUri); CopyFieldCommand = new Command <FieldView>(CopyField); LaunchUriCommand = new Command <LoginUriView>(LaunchUri); TogglePasswordCommand = new Command(TogglePassword); ToggleCardCodeCommand = new Command(ToggleCardCode); CheckPasswordCommand = new Command(CheckPasswordAsync); DownloadAttachmentCommand = new Command <AttachmentView>(DownloadAttachmentAsync); PageTitle = AppResources.ViewItem; }
public IdentityServerMiddlewareConfiguration(IAppEnvironmentProvider appEnvironmentProvider, IScopesProvider scopesProvider, ICertificateProvider certificateProvider, IDependencyManager dependencyManager, IRedirectUriValidator redirectUriValidator, IEventService eventService) { if (appEnvironmentProvider == null) { throw new ArgumentNullException(nameof(appEnvironmentProvider)); } if (scopesProvider == null) { throw new ArgumentNullException(nameof(scopesProvider)); } if (certificateProvider == null) { throw new ArgumentNullException(nameof(certificateProvider)); } if (dependencyManager == null) { throw new ArgumentNullException(nameof(dependencyManager)); } if (redirectUriValidator == null) { throw new ArgumentNullException(nameof(redirectUriValidator)); } if (eventService == null) { throw new ArgumentNullException(nameof(eventService)); } _appEnvironmentProvider = appEnvironmentProvider; _scopesProvider = scopesProvider; _certificateProvider = certificateProvider; _dependencyManager = dependencyManager; _redirectUriValidator = redirectUriValidator; _eventService = eventService; }
public static List <EventRecord> UpdateEventEntries( IList <EventImportRow> ImportEventEntries, IList <EventConferenceTrackRecord> CurrentConferenceTracks, IList <EventConferenceRoomRecord> CurrentConferenceRooms, IList <EventConferenceDayRecord> CurrentConferenceDays, IEventService service ) { var eventRecords = service.FindAllAsync().Result; var patch = new PatchDefinition <EventImportRow, EventRecord>( (source, list) => list.SingleOrDefault(a => a.SourceEventId == source.EventId) ); patch.Map(s => s.EventId, t => t.SourceEventId) .Map(s => s.Slug, t => t.Slug) .Map(s => s.Title.Split('|')[0], t => t.Title) .Map(s => (s.Title + '|').Split('|')[1], t => t.SubTitle) .Map(s => s.Abstract, t => t.Abstract) .Map( s => CurrentConferenceTracks.Single(a => a.Name == s.ConferenceTrack).Id, t => t.ConferenceTrackId) .Map( s => CurrentConferenceRooms.Single(a => a.Name == s.ConferenceRoom).Id, t => t.ConferenceRoomId) .Map( s => CurrentConferenceDays.Single(a => a.Name == s.ConferenceDayName).Id, t => t.ConferenceDayId) .Map(s => s.Description, t => t.Description) .Map(s => s.Duration, t => t.Duration) .Map(s => s.StartTime, t => t.StartTime) .Map(s => s.EndTime, t => t.EndTime) .Map(s => s.PanelHosts, t => t.PanelHosts); var diff = patch.Patch(ImportEventEntries, eventRecords); service.ApplyPatchOperationAsync(diff).Wait(); return(diff.Where(a => a.Entity.IsDeleted == 0).Select(a => a.Entity).ToList()); }
public ProjectExplorerWindow(IServiceProvider serviceProvider) { InitializeComponent(); this.dockPanel = serviceProvider.GetService <IMainForm>().MainPanel; this.serviceProvider = serviceProvider; this.TabText = this.Text; // // This window is a singleton, so we never want it to be closed, // just hidden. // this.HideOnClose = true; this.vsToolStripExtender.SetStyle( this.toolStrip, VisualStudioToolStripExtender.VsVersion.Vs2015, this.vs2015LightTheme); this.treeView.Nodes.Add(this.rootNode); this.mainForm = serviceProvider.GetService <IMainForm>(); this.eventService = serviceProvider.GetService <IEventService>(); this.jobService = serviceProvider.GetService <IJobService>(); this.projectInventoryService = serviceProvider.GetService <ProjectInventoryService>(); this.settingsRepository = serviceProvider.GetService <ConnectionSettingsRepository>(); this.authService = serviceProvider.GetService <IAuthorizationAdapter>(); this.remoteDesktopService = serviceProvider.GetService <IRemoteDesktopService>(); this.eventService.BindAsyncHandler <ProjectInventoryService.ProjectAddedEvent>(OnProjectAdded); this.eventService.BindHandler <ProjectInventoryService.ProjectDeletedEvent>(OnProjectDeleted); this.eventService.BindHandler <RemoteDesktopConnectionSuceededEvent>(OnRdpConnectionSucceeded); this.eventService.BindHandler <RemoteDesktopWindowClosedEvent>(OnRdpConnectionClosed); this.Commands = new CommandContainer <IProjectExplorerNode>( this, this.contextMenu.Items, this.serviceProvider); }