Example #1
0
 protected override void PreInitialize()
 {
     base.PreInitialize();
     _auditingStore = Substitute.For<IAuditingStore>();
     LocalIocManager.IocContainer.Register(
         Component.For<IAuditingStore>().UsingFactoryMethod(() => _auditingStore).LifestyleSingleton()
         );
 }
 public AuditingInterceptor(IAuditingConfiguration configuration, IAuditInfoProvider auditInfoProvider)
 {
     _configuration = configuration;
     _auditInfoProvider = auditInfoProvider;
     
     AbpSession = NullAbpSession.Instance;
     Logger = NullLogger.Instance;
     AuditingStore = SimpleLogAuditingStore.Instance;
 }
        public AuditingInterceptor(IAuditingConfiguration configuration, IAuditInfoProvider auditInfoProvider, IUnitOfWorkManager unitOfWorkManager)
        {
            _configuration = configuration;
            _auditInfoProvider = auditInfoProvider;
            _unitOfWorkManager = unitOfWorkManager;

            OwSession = NullOwSession.Instance;
            Logger = NullLogger.Instance;
            AuditingStore = SimpleLogAuditingStore.Instance;
        }
        public AuditingHelper(
            IAuditInfoProvider auditInfoProvider, 
            IAuditingConfiguration configuration, 
            IUnitOfWorkManager unitOfWorkManager)
        {
            _auditInfoProvider = auditInfoProvider;
            _configuration = configuration;
            _unitOfWorkManager = unitOfWorkManager;

            AbpSession = NullAbpSession.Instance;
            Logger = NullLogger.Instance;
            AuditingStore = SimpleLogAuditingStore.Instance;
        }
Example #5
0
        public AuditingHelper(
            IAuditSerializer auditSerializer,
            IOptions <AbpAuditingOptions> options,
            ICurrentUser currentUser,
            ICurrentTenant currentTenant,
            ICurrentClient currentClient,
            IClock clock,
            IAuditingStore auditingStore,
            ILogger <AuditingHelper> logger,
            IServiceProvider serviceProvider,
            ICorrelationIdProvider correlationIdProvider)
        {
            Options         = options.Value;
            AuditSerializer = auditSerializer;
            CurrentUser     = currentUser;
            CurrentTenant   = currentTenant;
            CurrentClient   = currentClient;
            Clock           = clock;
            AuditingStore   = auditingStore;

            Logger                = logger;
            ServiceProvider       = serviceProvider;
            CorrelationIdProvider = correlationIdProvider;
        }
Example #6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected AbpController()
 {
     AbpSession = NullAbpSession.Instance;
     Logger = NullLogger.Instance;
     LocalizationManager = NullLocalizationManager.Instance;
     PermissionChecker = NullPermissionChecker.Instance;
     AuditingStore = SimpleLogAuditingStore.Instance;
     EventBus = NullEventBus.Instance;
 }
Example #7
0
 protected AuditStore_Basic_Tests()
 {
     _auditingStore      = GetRequiredService <IAuditingStore>();
     _auditLogRepository = GetRequiredService <IAuditLogRepository>();
 }
Example #8
0
 protected override void AfterAddApplication(IServiceCollection services)
 {
     _auditingStore = Substitute.For <IAuditingStore>();
     services.Replace(ServiceDescriptor.Singleton(_auditingStore));
 }
Example #9
0
 protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
 {
     _auditingStore = Substitute.For <IAuditingStore>();
     services.Replace(ServiceDescriptor.Singleton(_auditingStore));
     base.ConfigureServices(context, services);
 }
Example #10
0
 public AuditTestPage_Tests()
 {
     _options       = ServiceProvider.GetRequiredService <IOptions <AbpAuditingOptions> >().Value;
     _auditingStore = ServiceProvider.GetRequiredService <IAuditingStore>();
 }
Example #11
0
 public AuditHelper(IAuditInfoProvider auditInfoProvider, IAuditingConfiguration configuration, IUnitOfWorkManager unitOfWorkManager, IAuditSerializer auditSerializer, IAuditingStore auditingStore)
 {
     _auditInfoProvider = auditInfoProvider;
     _configuration     = configuration;
     _unitOfWorkManager = unitOfWorkManager;
     _auditSerializer   = auditSerializer;
     _auditingStore     = auditingStore;
     Logger             = NullLogger.Instance;
 }
 public AuditingInterceptor(IAuditingStore auditingStore)
 {
     _auditingStore = auditingStore;
     AbpSession     = NullAbpSession.Instance;
 }
Example #13
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected AbpController()
 {
     AbpSession = NullAbpSession.Instance;
     Logger = NullLogger.Instance;
  
     AuditingStore = SimpleLogAuditingStore.Instance;
     EventBus = NullEventBus.Instance;
 }
 public MVCLogAttribute(IAuditingStore auditInfoService)
 {
     _auditInfoService = auditInfoService;
 }
 public PS_PayrollPeriodAppService(IRepository <PS_PayrollPeriod, int> repository, IRepository <PS_PayPeriod, int> payPeriodsRepo, IAuditLogRepository auditLogsRepo, IAuditingHelper auditingHelper, IAuditingStore auditingStore) : base(repository)
 {
     Repository     = repository;
     PayPeriodsRepo = payPeriodsRepo;
     AuditLogsRepo  = auditLogsRepo;
     AuditingHelper = auditingHelper;
     AuditingStore  = auditingStore;
 }
 /// <summary>
 /// Should save audits to a persistent store.
 /// </summary>
 /// <param name="auditingStore">Auditing store</param>
 /// <param name="auditInfo">Audit informations</param>
 public static void Save(this IAuditingStore auditingStore, AuditInfo auditInfo)
 {
     AsyncHelper.RunSync(() => auditingStore.SaveAsync(auditInfo));
 }
Example #17
0
 /// <summary>
 /// Should save audits to a persistent store.
 /// </summary>
 /// <param name="auditingStore">Auditing store</param>
 /// <param name="auditInfo">Audit informations</param>
 public static void Save <TTenantId, TUserId>(this IAuditingStore <TTenantId, TUserId> auditingStore, AuditInfo <TTenantId, TUserId> auditInfo)
     where TTenantId : struct
     where TUserId : struct
 {
     AsyncHelper.RunSync(() => auditingStore.SaveAsync(auditInfo));
 }
 public MVCLogAttribute(IAuditingStore auditInfoService)
 {
     _auditInfoService = auditInfoService;
 }