Пример #1
0
        public LdapDirectoryPartHandler(
            IRepository<LdapDirectoryPartRecord> repository,
            IEncryptionService encryptionService,
            ILdapDirectoryCache ldapDirectoryCache)
        {
            this.encryptionService = encryptionService;
            this.ldapDirectoryCache = ldapDirectoryCache;

            Filters.Add(StorageFilter.For(repository));
            Filters.Add(new ActivatingFilter<LdapDirectoryPart>("LdapDirectory"));

            OnActivated<LdapDirectoryPart>(ComputedFieldsInitializerHandler);
            
            OnCreated<LdapDirectoryPart>(ModifiedHandler);
            OnUpdated<LdapDirectoryPart>(ModifiedHandler);
            OnRemoved<LdapDirectoryPart>(ModifiedHandler);
        }
Пример #2
0
 public ADTaskHandler(IScheduledTaskManager taskManager,
     ILdapDirectoryCache ldapDirectoryCache, IADUpdaterService myService, IContentManager contentManager)
 {
     _myService = myService;
     _contentManager = contentManager;
     this.ldapDirectoryCache = ldapDirectoryCache;
     _taskManager = taskManager;
     Logger = NullLogger.Instance;
     try
     {
         DateTime firstDate = DateTime.UtcNow.AddHours(1);
         ScheduleNextTask(firstDate);
     }
     catch (Exception e)
     {
         this.Logger.Error(e, e.Message);
     }
 }
Пример #3
0
        public LdapMembershipService(
            IOrchardServices orchardServices,
            IEncryptionService encryptionService,
            ILdapServiceFactory ldapServiceFactory,
            ILdapDirectoryCache ldapDirectoryCache,
            Lazy<IUserService> userService,
            IAppConfigurationAccessor appConfigurationAccessor)
        {
            this.orchardServices = orchardServices;
            this.encryptionService = encryptionService;
            this.ldapServiceFactory = ldapServiceFactory;
            this.ldapDirectoryCache = ldapDirectoryCache;
            this.userService = userService;
            this._appConfigurationAccessor = appConfigurationAccessor;
            originalMembershipService = new Lazy<IMembershipService>(() =>
                this.orchardServices.WorkContext.Resolve<IEnumerable<IMembershipService>>().Single(x => !(x is LdapMembershipService)));

            Logger = NullLogger.Instance;
            T = NullLocalizer.Instance;
        }